【问题标题】:Tableau desktop not connecting to DB server on AWS instanceTableau 桌面未连接到 AWS 实例上的数据库服务器
【发布时间】:2017-02-10 14:20:48
【问题描述】:

我的 postgres 数据库位于运行 windows server 2012 的 AWS 实例中。 我的桌面在本地机器上。

使用外部实例 IP 和默认 postgres PORT 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 server 2012 防火墙正在接受所有入站流量。

  3. 我的本​​地桌面允许向远程服务器发送流量。我可以telnet hostIP/hostname PORT 成功。

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

【问题讨论】:

    标签: amazon-web-services amazon-ec2 tableau-api windows2012


    【解决方案1】:

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

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

    【讨论】:

    • 我假设通过建议“安装所需的驱动程序”您的意思是询问,驱动程序已安装在 AWS 服务器中。是的,驱动程序已安装在 AWS 服务器中。@Niceha
    • 你也可以更具体的在桌面桌面上安装sql客户端。
    • @angrysmit : SQL 客户端是例如你可以使用 sql 开发者工具,如果你可以从这个工具查询你的服务器。这将确保你有连接和访问数据库。然后你用来连接的数据库链接或凭据有问题
    【解决方案2】:

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

    在文件末尾添加一行,

    host all postgres 0.0.0.0 md5
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-07-09
      • 2020-05-19
      • 1970-01-01
      • 2018-10-10
      • 2018-12-01
      • 1970-01-01
      相关资源
      最近更新 更多