Tableau 桌面未连接到 AWS 实例上的数据库服务器

Tableau desktop not connecting to DB server on AWS instance

我的 postgres 数据库在 AWS 实例 运行 windows 服务器 2012 中。 我的画面桌面在本地机器上。

使用外部实例 IP 和默认 postgres 端口 5432 连接到数据库时,显示错误

    Unable to connect to the ODBC Data Source. 
    Check that the necessary drivers are installed and that the connection     properties are valid.
    Unable to connect to the server "ec2-xx.xx.xx.xx.ap-south-1.compute.amazonaws.com".
 Check that the server is running and that you have access privileges to the requested database.

我已经确认:-

  1. 为所有传入端口配置了 AWS 安全组

  2. Windows 服务器 2012 防火墙正在接受所有入站流量。

  3. 我的本地桌面允许将流量发送到远程 server.And 我可以 telnet hostIP/hostname PORT 成功。

  4. Postgres 服务 运行 在 5432 端口上。

根据您提到的几点,我建议您查看是否安装了 postgres 所需的驱动程序。另外,如果可能的话,您暂时可以在 tableau 桌面上临时安装任何客户端,如 sqldeveloper(稍后您可以删除它)。

现在因为您可以远程登录 IP 5432,您可以从客户端测试您的连接,如果这不起作用,您知道问题出在配置上,否则我们需要深入研究。

看来我没有为 postgres 正确设置 pg_hba.conf 文件。允许来自所有外部 IP 的连接请求让我解决问题。

在文件末尾添加行,

host all postgres 0.0.0.0 md5