【问题标题】:BlueHost - No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"BlueHost - 没有这样的文件或目录服务器是否在本地运行并接受 Unix 域套接字“/tmp/.s.PGSQL.5432”上的连接
【发布时间】:2014-06-18 08:01:04
【问题描述】:

我目前正在尝试在 BlueHost 上运行我的应用程序。

我已经克隆、设置和安装了应用程序。

当我尝试rails s 时,应用程序可以在http://my.domain.com:3000 上运行

但它是回报

could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

我正在为数据库使用 PG,但我不确定为什么会发生这种情况。

【问题讨论】:

  • 那么数据库服务器是否正在运行并侦听端口 5432 并接受连接?
  • @DrColossos - 如何检查数据库服务器是否正在运行?
  • 我不知道 bluehost 做什么/提供/... 但是在普通的 linux 机器上,我会执行 sudo service postgresql status 来查看它是否正在运行。如果它正在运行,我会检查 postgresql.conf 文件以查看它是否在所需的地址上侦听。

标签: ruby-on-rails ruby postgresql pg bluehost


【解决方案1】:

经过一些研究,这是因为我需要手动重新配置 PG 用户和数据库。它就像魅力一样工作。非常感谢各位。

【讨论】:

  • 你应该解释你做了什么,以便其他有同样问题的人可以解决他们的问题。
猜你喜欢
  • 1970-01-01
  • 2021-04-21
  • 1970-01-01
  • 2015-08-13
  • 1970-01-01
  • 2020-11-14
  • 2019-01-24
  • 1970-01-01
相关资源
最近更新 更多