

# Babelfish 问题排查
<a name="babelfish-troubleshooting"></a>

下文介绍了某些 Babelfish 数据库集群问题的排查思路和解决方法。

**Topics**
+ [连接失败](#babelfish-troubleshooting-connectivity)

## 连接失败
<a name="babelfish-troubleshooting-connectivity"></a>

导致新 Aurora 数据库集群与 Babelfish 连接失败的常见原因包括：
+ **安全组不允许访问** – 如果您在连接到 Babelfish 时遇到问题，请确保将 IP 地址添加到原定设置的 Amazon EC2 安全组中。您可以使用 [https://checkip.amazonaws.com/](https://checkip.amazonaws.com/) 以确定您的 IP 地址，然后将其添加到 TDS 端口和 PostgreSQL 端口的入站规则中。有关更多信息，请参阅《*Amazon EC2 用户指南*》中的[向安全组添加规则](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/working-with-security-groups.html#adding-security-group-rule.html)。
+ **SSL 配置不匹配** – 如果在 Aurora PostgreSQL 上启用 `rds.force_ssl` 参数（设置为 1），则客户端必须通过 SSL 连接到 Babelfish。如果您的客户端设置不正确，则您会看到错误消息，如下所示：

  ```
  Cannot connect to your-Babelfish-DB-cluster, 1433
  ---------------------
  ADDITIONAL INFORMATION:
  no pg_hba_conf entry for host "256.256.256.256", user "your-user-name",
  "database babelfish_db", SSL off (Microsoft SQL Server, Error: 33557097)
  ...
  ```

  此错误表明您的本地客户端和 Babelfish 数据库集群之间可能存在 SSL 配置问题，并且集群要求客户端使用 SSL（其 `rds.force_ssl` 参数设置为 1）。有关配置 SSL 的更多信息，请参阅《Amazon RDS 用户指南》**中的[将 SSL 与 PostgreSQL 数据库实例结合使用](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/PostgreSQL.Concepts.General.SSL.html#PostgreSQL.Concepts.General.SSL.Status)。

  如果您使用 SQL Server Management Studio (SSMS) 连接到 Babelfish 并且看到此错误，则可以选择 Connection Properties（连接属性）窗格中的 **Encrypt connection**（加密连接）和 **Trust server certificate**（信任服务器证书）连接选项，然后重试。这些设置处理 SSMS 的 SSL 连接要求。

有关 Aurora 连接问题排查的更多信息，请参阅 [无法连接到 Amazon RDS 数据库实例](CHAP_Troubleshooting.md#CHAP_Troubleshooting.Connecting)。