【问题标题】:Google cloud Instance ruby - Is the server running on host "" and accepting TCP/IP connections on port 5432?Google cloud Instance ruby​​ - 服务器是否在主机“”上运行并接受端口 5432 上的 TCP/IP 连接?
【发布时间】:2016-05-30 17:56:07
【问题描述】:

我正在尝试在谷歌云上部署一个 ruby​​ 应用程序。运行 rake db:migrate 时出现此错误。

服务器是否在主机“###.###.#.###”上运行并接受端口 5432 上的 TCP/IP 连接?

我检查了其他答案并有人建议

  • postgresql.conf - 更改:listen_address = '*'
  • pg_hba.conf - 添加:

    # IPv4 remote connections (all users and IP addresses):
    host    all             all             0.0.0.0/0                md5 
    
  • postgresql.conf - 检查:端口为 5432。

这些都没有解决问题。有没有人有任何其他想法?我是谷歌云的新手,不确定我可以发布什么代码来提供帮助。如果有任何代码可以帮助您解决问题,请发表评论,我会发布。谢谢

【问题讨论】:

    标签: ruby postgresql google-cloud-platform


    【解决方案1】:

    根据您遇到的错误,确保没有防火墙(例如 iptablesGoogle Cloud network properties 没有打开端口 5432 会阻止您的服务器系统甚至为给定端口建立连接。

    【讨论】:

      猜你喜欢
      • 2018-12-17
      • 2018-01-20
      • 2017-06-09
      • 1970-01-01
      • 1970-01-01
      • 2018-06-22
      • 2021-11-29
      • 2020-12-17
      • 1970-01-01
      相关资源
      最近更新 更多