【问题标题】:psycopg2.OperationalError: could not connect to server: Connection refused - Same code works from one system but not from anotherpsycopg2.OperationalError:无法连接到服务器:连接被拒绝 - 相同的代码适用于一个系统,但不适用于另一个系统
【发布时间】:2020-11-19 18:17:45
【问题描述】:

我正在尝试连接到 redshift,并且相同的代码(相同的主机、用户、数据库名称、密码、端口)在一台计算机上工作,但从另一台计算机上抛出 connection refused 错误。两个系统都首先连接到 VPN 并尝试连接到数据库。不确定是否需要使用 IP 更新任何配置文件?不知道可能是什么原因。

psycopg2.OperationalError: could not connect to server: Connection refused
Is server running on host xxx.xx.xx.xx and accepting TCP/IP connections on port YYYY

【问题讨论】:

    标签: postgresql amazon-redshift psycopg2


    【解决方案1】:

    “连接被拒绝”意味着它甚至无法获取数据库以尝试与其建立连接。无论发生什么都发生在网络级别,而不是在数据库中。

    【讨论】:

    • 修复了这个。 VPN 出了点问题。
    猜你喜欢
    • 2018-10-12
    • 1970-01-01
    • 2021-08-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-01-24
    相关资源
    最近更新 更多