

# 教程：为 SAP HANA 设置监控
<a name="appinsights-tutorial-sap-hana"></a>

本教程演示了如何配置 CloudWatch Application Insights 来为 SAP HANA 数据库设置监控。您可以使用 CloudWatch Application Insights 自动控制面板可视化呈现问题详细信息、加快故障排除速度及缩短 SAP HANA 数据库的平均解决时间 (MTTR)。

**Topics**
+ [支持的环境](#appinsights-tutorial-sap-hana-supported-environments)
+ [支持的操作系统](#appinsights-tutorial-sap-hana-supported-os)
+ [功能](#appinsights-tutorial-sap-hana-features)
+ [先决条件](#appinsights-tutorial-sap-hana-prerequisites)
+ [设置监控](#appinsights-tutorial-sap-hana-set-up)
+ [管理监控](#appinsights-tutorial-sap-hana-manage)
+ [排查检测到的问题](#appinsights-tutorial-sap-hana-troubleshooting)
+ [异常检测](#appinsights-tutorial-sap-hana-troubleshooting-anomaly-detection)
+ [排查 Application Insights 的问题](#appinsights-tutorial-sap-hana-troubleshooting-health-dashboard)

## 支持的环境
<a name="appinsights-tutorial-sap-hana-supported-environments"></a>

CloudWatch Application Insights 支持部署用于以下系统和模式的 AWS 资源。您提供并安装 SAP HANA 数据库软件和支持的 SAP 应用程序软件。
+ **单个 Amazon EC2 实例上的 SAP HANA 数据库** – 采用单节点、纵向扩展架构的 SAP HANA，内存高达 24TB。
+ **多个 Amazon EC2 实例上的 SAP HANA 数据库** – 采用多节点、横向扩展架构的 SAP HANA。
+ **跨可用区 SAP HANA 数据库高可用性设置** – 使用 SUSE/RHEL 集群在两个可用区中配置了高可用性的 SAP HANA。

**注意**  
CloudWatch Application Insights 仅支持单个 SID HANA 环境。如果连接了多个 HANA SID，则只会为第一个检测到的 SID 设置监控。

## 支持的操作系统
<a name="appinsights-tutorial-sap-hana-supported-os"></a>

CloudWatch Application Insights for SAP HANA 在以下操作系统中支持 x86-64 架构：
+ SuSE Linux 12 SP4 For SAP
+ SuSE Linux 12 SP5 For SAP
+ SUSE Linux 15
+ SuSE Linux 15 SP1
+ SuSE Linux 15 SP2
+ SuSE Linux 15 For SAP
+ SuSE Linux 15 SP1 For SAP
+ SuSE Linux 15 SP2 For SAP
+ SuSE Linux 15 SP3 For SAP
+ SuSE Linux 15 SP4 For SAP
+ SuSE Linux 15 SP5 For SAP
+ 适用于 SAP 的 RedHat Linux 8.6（包含高可用性和更新服务）
+ 适用于 SAP 的 RedHat Linux 8.5（包含高可用性和更新服务）
+ 适用于 SAP 的 RedHat Linux 8.4（包含高可用性和更新服务）
+ 适用于 SAP 的 RedHat Linux 8.3（包含高可用性和更新服务）
+ RedHat Linux 8.2 For SAP（包含高可用性和更新服务）
+ RedHat Linux 8.1 For SAP（包含高可用性和更新服务）
+ RedHat Linux 7.9 For SAP（包含高可用性和更新服务）

## 功能
<a name="appinsights-tutorial-sap-hana-features"></a>

CloudWatch Application Insights for SAP HANA 具有以下功能：
+ SAP HANA 工作负载自动检测 
+ 基于静态阈值自动创建 SAP HANA 告警
+ 基于异常检测自动创建 SAP HANA 告警
+ 自动识别 SAP HANA 日志模式 
+ SAP HANA 健康控制面板
+ SAP HANA 问题控制面板

## 先决条件
<a name="appinsights-tutorial-sap-hana-prerequisites"></a>

您必须完成以下必需任务才能使用 CloudWatch Application Insights 配置 SAP HANA 数据库：
+ **SAP HANA** – 在 Amazon EC2 实例上安装处于运行状态且可访问的 SAP HANA 数据库 2.0 SPS05。
+ **SAP HANA 数据库用户** – 必须在 SYSTEM 数据库和所有租户中创建具有监控角色的数据库用户。

**示例**  
以下 SQL 命令将创建具有监控角色的用户。

  ```
  su - <sid>adm
  hdbsql -u SYSTEM -p <SYSTEMDB password> -d SYSTEMDB
  CREATE USER CW_HANADB_EXPORTER_USER PASSWORD <Monitoring user password> NO FORCE_FIRST_PASSWORD_CHANGE;
  CREATE ROLE CW_HANADB_EXPORTER_ROLE;
  GRANT MONITORING TO CW_HANADB_EXPORTER_ROLE;
  GRANT CW_HANADB_EXPORTER_ROLE TO CW_HANADB_EXPORTER_USER;
  ```
+ **Python 3.8** – 在操作系统上安装 Python 3.8 或更高版本。使用最新的 Python 版本。如果未在操作系统中检测到 Python3，则将安装 Python 3.6。

  有关更多信息，请参阅[installation example](#install)。
**注意**  
SuSE Linux 15 SP4、RedHat Linux 8.6 及更高版本的操作系统需要手动安装 Python 3.8 或更高版本。
+ **Pip3** – 在操作系统中安装安装程序 pip3。如果未在操作系统中检测到 pip3，则安装该程序。
+ **hdbclient** – CloudWatch Application Insights 使用 python 驱动连接到 SAP HANA 数据库。如果未在 python3 下安装客户端，则请确保 `/hana/shared/SID/hdbclient/` 下有 hdbclient tar 文件版本 `2.10 or later`。
+ **Amazon CloudWatch 代理** – 确保 Amazon EC2 实例上没有运行预先已有的 CloudWatch 代理。如果您安装了 CloudWatch 代理，请确保从现有 CloudWatch 代理配置文件中删除您在 CloudWatch Application Insights 中使用的资源的配置，以避免合并冲突。有关更多信息，请参阅 [手动创建或编辑 CloudWatch 代理配置文件](CloudWatch-Agent-Configuration-File-Details.md)。
+ **AWS Systems Manager 启用** – 在实例上安装 SSM Agent，并且实例必须启用了 SSM。有关如何安装 SSM Agent 的信息，请参阅《AWS Systems Manager 用户指南》**中的[使用 SSM Agent](https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-agent.html)。
+ **Amazon EC2 实例角色** – 要配置数据库，您必须附加以下 Amazon EC2 实例角色。
  + 要启用 Systems Manager，您必须附加 `AmazonSSMManagedInstanceCore` 角色。有关更多信息，请参阅 [AWS Systems Manager 基于身份的策略示例](https://docs.aws.amazon.com/systems-manager/latest/userguide/auth-and-access-control-iam-identity-based-access-control.html)。
  + 要启用通过 CloudWatch 发出实例指标和日志，您必须附加 `CloudWatchAgentServerPolicy`。有关更多信息，请参阅[创建用于 CloudWatch 代理的 IAM 角色和用户](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/create-iam-roles-for-cloudwatch-agent.html)
  + 要读取存储在 AWS Secrets Manager 中的密码，您必须将以下 IAM 内联策略附加到 Amazon EC2 实例角色。有关内联策略的更多信息，请参阅 *AWS Identity and Access Management 用户指南*中的[内联策略](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html)。

------
#### [ JSON ]

****  

    ```
    {
        "Version":"2012-10-17",		 	 	 
        "Statement": [
            {
                "Sid": "VisualEditor0",
                "Effect": "Allow",
                "Action": [
                    "secretsmanager:GetSecretValue"
                ],
                "Resource": "arn:aws:secretsmanager:*:*:secret:ApplicationInsights-*"
            }
        ]
    }
    ```

------
+ **AWS Resource Groups** – 要将应用程序添加到 CloudWatch Application Insights，您必须创建一个包含应用程序堆栈所用的所有相关 AWS 资源的资源组。这包括运行 SAP HANA 数据库的 Amazon EC2 实例和 Amazon EBS 卷。如果每个账户有多个数据库，我们建议您创建一个资源组，而且该资源组包含每个 SAP HANA 数据库系统的 AWS 资源。
+ **IAM 权限** – 对于非管理员用户：
  +  您必须创建允许 Application Insights 创建服务相关角色的 AWS Identity and Access Management（IAM）policy，并将其附加到您的用户身份。有关附加策略的步骤，请参阅 [CloudWatch Application Insights 的 IAM 策略](appinsights-iam.md)。
  + 用户必须有在 AWS Secrets Manager 中创建密钥的权限，以存储数据库用户凭证。有关更多信息，请参阅[示例：创建密钥的权限](https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html#auth-and-access_examples_create)。

------
#### [ JSON ]

****  

    ```
    {
      "Version":"2012-10-17",		 	 	 
      "Statement": [
        {
          "Effect": "Allow",
          "Action": [
            "secretsmanager:CreateSecret"
          ],
          "Resource": "arn:aws:secretsmanager:*:*:secret:ApplicationInsights-*"
        }
      ]
    }
    ```

------
+ **服务相关角色** – Application Insights 使用 AWS Identity and Access Management（IAM）服务相关角色。当您在 Application Insights 控制台中创建首个 Application Insights 应用程序时，将会为您创建服务相关角色。有关更多信息，请参阅 [在 CloudWatch Application Insights 中使用服务相关角色](CHAP_using-service-linked-roles-appinsights.md)。

## 设置 SAP HANA 数据库以进行监控
<a name="appinsights-tutorial-sap-hana-set-up"></a>

要为 SAP HANA 数据库设置监控，请执行以下步骤

1. 打开 [CloudWatch 控制台](https://console.aws.amazon.com/cloudwatch)。

1. 从左侧导航窗格中，选择 **Insights** 下的 **Application Insights**。

1. **Application Insights** 页面会显示使用 Application Insights 监控的应用程序列表以及每个应用程序的监控状态。在右上角，选择 **Add an application**（添加应用程序）。

1. 在 **Specify application details**（指定应用程序详细信息）页面上，从 **Resource group**（资源组）下的下拉列表中选择包含 SAP HANA 数据库资源的 AWS 资源组。如果尚未为应用程序创建资源组，则可以在 **Resource group**（资源组）下拉列表下选择 **Create new resource group**（创建新资源组）来创建一个资源组。有关创建资源组的更多信息，请参阅 [https://docs.aws.amazon.com/ARG/latest/userguide/resource-groups.html](https://docs.aws.amazon.com/ARG/latest/userguide/resource-groups.html)

1. 在 **Monitor CloudWatch Events**（监控 CloudWatch Events）下，选中复选框将 Application Insights 监控与 CloudWatch Events 集成，以获取 Amazon EBS、Amazon EC2、AWS CodeDeploy、Amazon ECS、AWS Health API 和通知、Amazon RDS、Amazon S3 和 AWS Step Functions 中的洞察。

1. 在 **Integrate with AWS Systems Manager OpsCenter**（与 OpsCenter 集成）下，选中 **Generate AWS Systems Manager OpsCenter OpsItems for remedial actions**（生成 OpsCenter OpsItems 以采取修复措施）旁边的复选框，以在检测到所选应用程序的问题时查看问题及接收通知。要跟踪为解析与 AWS 资源相关的操作工作项 (OpsItem) 而执行的操作，请提供 SNS 主题 ARN。

1. 您可以选择输入标签以帮助您标识和整理资源。CloudWatch Application Insights 支持基于标签和基于 CloudFormation 堆栈的资源组（Application Auto Scaling 组除外）。有关更多信息，请参阅 *AWS Resource Groups 和标签用户指南*中的[标签编辑器](https://docs.aws.amazon.com/ARG/latest/userguide/tag-editor.html)。

1. 选择 **Next**（下一步）继续设置监控。

1. **查看检测到的组件**页面上列出了 CloudWatch Application Insights 自动检测到的受监控组件及其工作负载。

   1. 要将工作负载添加到包含检测到的 SAP HANA 单节点工作负载的组件，请选择该组件，然后选择**编辑组件**。
**注意**  
包含检测到的 SAP HANA 多节点或 HANA 高可用性工作负载的组件仅支持一个组件上一个工作负载。  
![\[CloudWatch Application Insights 控制台的“查看要监控的组件”页面：选择要编辑的组件。\]](http://docs.aws.amazon.com/zh_cn/AmazonCloudWatch/latest/monitoring/images/appinsights-multiapp-hana-review.png)

   1. 要添加新的工作负载，请选择**添加新工作负载**。  
![\[CloudWatch Application Insights 控制台的“编辑组件”部分：选择用于添加工作负载的左下角按钮。\]](http://docs.aws.amazon.com/zh_cn/AmazonCloudWatch/latest/monitoring/images/appinsights-multiapp-hana-edit.png)

   1. 编辑工作负载完成后，选择**保存更改**。

1. 选择**下一步**。

1. 在**指定组件详细信息**页面上，输入用户名和密码。

1. 查看应用程序监控配置，然后选择 **Submit**（提交）。

1. 此时将打开应用程序详细信息页面，您可以在该页面中查看**应用程序摘要**、**受监控组件和工作负载**的列表以及**未受监控的组件和工作负载**。如果您选择组件或工作负载旁边的单选按钮，还可以查看**配置历史记录**、**日志模式**和已创建的任何**标签**。提交配置时，您的账户会为 SAP HANA 系统部署所有指标和告警，这最多可能需要 2 个小时。

## 管理对 SAP HANA 数据库的监控
<a name="appinsights-tutorial-sap-hana-manage"></a>

您可以执行以下步骤来管理 SAP HANA 数据库的用户凭证、指标和日志路径：

1. 打开 [CloudWatch 控制台](https://console.aws.amazon.com/cloudwatch)。

1. 从左侧导航窗格中，选择 **Insights** 下的 **Application Insights**。

1. **Application Insights** 页面会显示使用 Application Insights 监控的应用程序列表以及每个应用程序的监控状态。

1. 在 **Monitored components**（已监控组件）下，选择组件名称旁边的单选按钮。然后，选择 **Manage monitoring**（管理监控）。

1. 在 **EC2 instance group logs**（EC2 实例组日志）下，您可以更新现有的日志路径、日志模式集和日志组名称。此外，您可以额外添加最多三个 **Application logs**（应用程序日志）。

1. 在 **Metrics**（指标）下，您可以根据自己的要求选择 SAP HANA 指标。SAP HANA 指标名称的前缀是 `hanadb`。每个组件可以添加最多 40 个指标。

1. 在 **HANA configuration**（HANA 配置）下，输入 SAP HANA 数据库的密码和用户名，即 Amazon CloudWatch 代理连接到 SAP HANA 数据库时使用的用户名和密码。

1. 在**Custom alarms**（自定义告警）下，您可以添加可由 CloudWatch Application Insights 监控的额外告警。

1. 查看应用程序监控配置并选择 **Submit**（提交）。提交配置时，您的账户会为 SAP HANA 系统更新所有指标和告警，这最多可能需要 2 个小时。

## 查看和排查 CloudWatch Application Insights 检测到的问题
<a name="appinsights-tutorial-sap-hana-troubleshooting"></a>

以下各节提供了一些步骤，可帮助您解决在 Application Insights 上为 SAP HANA 配置监控时出现的常见问题排查情况。

**Topics**
+ [SAP HANA 数据库达到内存分配限制](#appinsights-tutorial-sap-hana-troubleshooting-memory)
+ [磁盘已满事件](#appinsights-tutorial-sap-hana-troubleshooting-disk-full)
+ [SAP HANA 备份停止运行](#appinsights-tutorial-sap-hana-troubleshooting-backup-stopped)

### SAP HANA 数据库达到内存分配限制
<a name="appinsights-tutorial-sap-hana-troubleshooting-memory"></a>

**说明**  
由于内存压力过大，由 SAP HANA 数据库提供支持的 SAP 应用程序发生故障，导致应用程序性能下降。

**解决方案**  
您可以检查动态创建的控制面板（显示相关指标和日志文件片段），找出导致问题的应用程序层。在以下示例中，问题可能是 SAP HANA 系统中数据负载过大。

![\[超出内存分配。\]](http://docs.aws.amazon.com/zh_cn/AmazonCloudWatch/latest/monitoring/images/appinsights-memory-allocation-1.png)


已用内存分配超过总内存分配限制的 80% 的阈值。

![\[日志组显示内存不足。\]](http://docs.aws.amazon.com/zh_cn/AmazonCloudWatch/latest/monitoring/images/appinsights-memory-allocation-2.png)


日志组显示方案 `BNR-DATA` 和表 `IMDBMASTER_30003` 内存不足。此外，日志组会显示问题发生的确切时间、当前全局位置限制、共享内存、代码大小和 OOM 预留分配大小。

![\[日志组文本。\]](http://docs.aws.amazon.com/zh_cn/AmazonCloudWatch/latest/monitoring/images/appinsights-memory-allocation-3.png)


### 磁盘已满事件
<a name="appinsights-tutorial-sap-hana-troubleshooting-disk-full"></a>

**说明**  
由 SAP HANA 数据库提供支持的 SAP 应用程序停止响应，导致无法访问数据库。

**解决方案**  
您可以检查动态创建的控制面板（显示相关指标和日志文件片段），找出导致问题的数据库层。在以下示例中，问题可能是管理员无法启用自动日志备份，导致 sap/hana/log 目录填满。

![\[日志组显示内存不足。\]](http://docs.aws.amazon.com/zh_cn/AmazonCloudWatch/latest/monitoring/images/appinsights-disk-full-1.png)


问题控制面板中的日志组小组件显示 `DISKFULL` 事件。

![\[日志组显示内存不足。\]](http://docs.aws.amazon.com/zh_cn/AmazonCloudWatch/latest/monitoring/images/appinsights-disk-full-2.png)


### SAP HANA 备份停止运行
<a name="appinsights-tutorial-sap-hana-troubleshooting-backup-stopped"></a>

**说明**  
由 SAP HANA 数据库提供支持的 SAP 应用程序已停止工作。

**解决方案**  
您可以检查动态创建的控制面板（显示相关指标和日志文件片段），找出导致问题的数据库层。

问题控制面板中的日志组小组件显示 `ACCESS DENIED` 事件。其中包括其他信息，如 S3 存储桶、S3 存储桶文件夹和 S3 存储桶区域。

![\[日志组显示内存不足。\]](http://docs.aws.amazon.com/zh_cn/AmazonCloudWatch/latest/monitoring/images/appinsights-backup-stopped-2.png)


## SAP HANA 的异常检测
<a name="appinsights-tutorial-sap-hana-troubleshooting-anomaly-detection"></a>

对于特定的 SAP HANA 指标（例如线程数量），CloudWatch 应用统计和机器学习算法来定义阈值。这些算法只需最少的用户干预，即可持续分析 SAP HANA 数据库的指标，确定正常基线和表面异常。算法会生成一个异常检测模型，该模型生成表示正常指标行为的预期值范围。

异常检测算法将指标的季节性变化和趋势变化考虑在内。季节性变化可以是每小时、每天或每周，如以下 SAP HANA CPU 使用率示例所示。

![\[日志组显示内存不足。\]](http://docs.aws.amazon.com/zh_cn/AmazonCloudWatch/latest/monitoring/images/appinsights-anomaly-detection.png)


创建模型后，CloudWatch 异常检测会持续评估模型并对其进行调整，以确保模型尽可能准确。这包括重新训练模型，以便模型在指标值随着时间的推移而变化或突然发生变化时作出调整。此外还包括用于改进季节性、峰值或稀疏指标模型的预测器。

## 排查 Application Insights for SAP HANA 的问题
<a name="appinsights-tutorial-sap-hana-troubleshooting-health-dashboard"></a>

本节提供了帮助您解决 Application Insights 控制面板返回的常见错误的步骤。

### 无法添加超过 60 个监控的指标
<a name="cant-add-greater-sixty-metrics"></a>

输出内容显示以下错误。

```
Component cannot have more than 60 monitored metrics
```

**根本原因** – 当前的指标限制为每个组件 60 个受监控指标。

**解决方法** – 要保持在限制以下，请删除不必要的指标。

### 载入过程之后未显示 SAP 指标
<a name="no-sap-metrics-appear"></a>

使用以下信息了解 SAP 指标在载入过程后未显示在控制面板上的原因。第一步是使用 AWS 管理控制台 或 Amazon EC2 实例的导出程序日志来排查 SAP 指标不显示的原因。接下来，查看错误输出以找到解决方法。

#### 排查载入后 SAP 指标不显示的原因
<a name="w2aac26c20c27c27b7b5"></a>

您可以使用 AWS 管理控制台 或 Amazon EC2 实例的导出程序日志进行问题排查。

------
#### [ AWS 管理控制台 ]

**使用控制台排查载入后不显示 SAP 指标的问题**

1. 访问 [https://console.aws.amazon.com/systems-manager/](https://console.aws.amazon.com/systems-manager/)，打开 AWS Systems Manager 控制台。

1. 在左侧导航窗格中，选择**状态管理器**。

1. 在**关联**下，检查文档 `AWSEC2-ApplicationInsightsCloudwatchAgentInstallAndConfigure` 的状态。如果状态为 `Failed`，则在**执行 ID** 下，选择失败的 ID 并查看输出。

1. 在**关联**下，检查文档 `AWS-ConfigureAWSPackage` 的状态。如果状态为 `Failed`，则在**执行 ID** 下，选择失败的 ID 并查看输出。

------
#### [ Exporter logs from Amazon EC2 instance ]

**使用导出程序日志排查载入后不显示 SAP 指标的问题**

1. 连接到运行 SAP HANA 数据库的 Amazon EC2 实例。

1. <a name="step-find-short-name"></a>使用以下命令查找用于 `WORKLOAD_SHORT_NAME` 的正确命名约定。您将在以下两个步骤中使用此短名称。

   ```
   sudo systemctl | grep exporter
   ```
**注意**  
Application Insights 根据正在运行的工作负载在服务名称中添加后缀 `WORKLOAD_SHORT_NAME`。SAP HANA 单节点、多节点和高可用性部署的短名称为 `HANA_SN`、`HANA_MN` 和 `HANA_HA`。

1. 要检查导出器管理器服务日志中是否存在错误，请运行以下命令，将 `WORKLOAD_SHORT_NAME` 替换为您在 [Step 2](#step-find-short-name) 中找到的短名称。

   ```
   sudo journalctl -e --unit=prometheus-hanadb_exporter_manager_WORKLOAD_SHORT_NAME.service
   ```

1. 如果导出程序管理器服务日志未显示错误，则请运行以下命令检查导出程序服务日志中是否存在错误。

   ```
   sudo journalctl -e --unit=prometheus-hanadb_exporter_WORKLOAD_SHORT_NAME.service
   ```

------

#### 解决载入后 SAP 指标未显示的常见根本原因
<a name="resolve-root-causes-sap-metrics"></a>

以下示例描述了如何解决载入后 SAP 指标未显示的常见根本原因。
+ 输出内容显示以下错误。

  ```
  Reading json config file path: /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d/default ...
  Reading json config file path: /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d/ssm_AmazonCloudWatch-ApplicationInsights-SSMParameterForTESTCWEC2INSTANCEi0d88867f1f3e36285.tmp ...
  2023/11/30 22:25:17 Failed to merge multiple json config files.
  2023/11/30 22:25:17 Failed to merge multiple json config files.
  2023/11/30 22:25:17 Under path : /metrics/append_dimensions | Error : Different values are specified for append_dimensions
  2023/11/30 22:25:17 Under path : /metrics/metrics_collected/disk | Error : Different values are specified for disk
  2023/11/30 22:25:17 Under path : /metrics/metrics_collected/mem | Error : Different values are specified for mem
  2023/11/30 22:25:17 Configuration validation first phase failed. Agent version: 1.0. Verify the JSON input is only using features supported by this version.
  ```

  **解决方案** – Application Insights 尝试配置与现有 CloudWatch 代理配置文件中预配置指标相同的指标。删除 `/opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.d/` 下现有的文件，或从现有 CloudWatch 代理配置文件中删除导致冲突的指标。
+ 输出内容显示以下错误。

  ```
  Unable to find a host with system database, for more info rerun using -v
  ```

  **解决方案** – 用户名、密码或数据库端口可能不正确。验证用户名、密码和端口是否有效，然后重新运行载入过程。
+ 输出内容显示以下错误。

  ```
  This hdbcli installer is not compatible with your Python interpreter
  ```

  **分辨率** – 升级 pip3 和 wheel，如以下 Python 3.6 示例所示。

  ```
  python3.6 -m pip install --upgrade pip setuptools wheel
  ```
+ 输出内容显示以下错误。

  ```
  Unable to install hdbcli using pip3. Please try to install it
  ```

  **解决方案** – 确保您已遵循 `hdbclient` 先决条件或在 pip3 下手动安装 `hdbclient`。
+ 输出内容显示以下错误。

  ```
  Package 'boto3' requires a different Python: 3.6.15 not in '>= 3.7'
  ```

  **解决方案** – 此操作系统版本需要 Python 3.8 或更高版本。检查 Python 3.8 的先决条件并进行安装。
+ 输出内容显示以下安装错误之一。

  ```
  Can not execute `setup.py` since setuptools is not available in the build environment
  ```

  或者

  ```
  [SSL: CERTIFICATE_VERIFY_FAILED]
  ```

  **解决方法** – 使用 SUSE Linux 命令安装 Python，如以下示例所示。以下示例安装了最新版本的 [Python 3.8](https://www.python.org/downloads/)。

  ```
  wget https://www.python.org/ftp/python/3.8.<LATEST_RELEASE>/Python-3.8.<LATEST_RELEASE>.tgz
  tar xf Python-3.*
  cd Python-3.*/
  sudo zypper install make gcc-c++ gcc automake autoconf libtool
  sudo zypper install zlib-devel
  sudo zypper install libopenssl-devel libffi-devel
  ./configure --with-ensurepip=install 
  sudo make
  sudo make install
  sudo su 
  python3.8 -m pip install --upgrade pip setuptools wheel
  ```