Mac OSX Lion Postgres不接受/tmp/.s.PGSQL.5432上的连接 [英] Mac OSX Lion Postgres does not accept connections on /tmp/.s.PGSQL.5432
问题描述
我在Postgres的Homebrew安装中遇到一个常见的Mac OSX错误,
没有这样的文件或目录
服务器是否在本地运行并且在Unix域套接字 /tmp/.s.PGSQL.5432上接受
连接?
这显然是由于系统上有多次安装。但是,通常的步骤并不能解决问题。
我可以成功启动Postgres并运行:
ps auxw | grep post
返回..
euanmillar 847 0.0 0.0 2432768 588 s000 R + 11:19 am 0:00.00 grep postgres
euanmillar 845 0.0 0.0 0.0 2439324 448 ?? Ss 11:19 am 0:00.00 postgres:
统计信息收集程序
euanmillar 844 0.0 0.0 2443176 1520 ?? Ss 11:19 am 0:00.00 postgres:
autovacuum启动程序
euanmillar 843 0.0 0.0 2443044 544 ?? Ss 11:19 am 0:00.00 postgres:wal writer process
euanmillar 842 0.0 0.0 2443044 584 ?? Ss 11:19 am 0:00.00 postgres:编写者进程
euanmillar 841 0.0 0.0 2443044 596 ?? Ss 11:19 am 0:00.00 postgres:checkpointer process
euanmillar 839 0.0 0.0 2443044 3616 s000 S 11:19 am 0:00.02 / us
所以看起来好像在运行postgres。
我在postgresql.conf的以下几行中进行了注释
端口= 5432
unix_socket_directory ='/ var / pgsql_socket'
unix_socket_permissions = 0777
,在var / pgsql_socket /中,我确实有一个隐藏文件.s.PGSQL.5432
<我在这里尝试了许多帖子的解决方案。这似乎特别相似:
https://dba.stackexchange.com/questions/21587/postgresql-is-running-locally-but-i-cannot-connect-why
但是区别是我确实有一个'/ var / pgsql_socket'目录,所有人都对它感兴趣。我已经使用Homebrew完全删除并重新安装了Postgres,但仍然遇到相同的问题。
您需要删除postmaster.pid,应位于以下路径中:
/usr/local/var/postgres/postmaster.pid
I'm getting a common Mac OSX error for Homebrew installations of Postgres,
No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
This is apparently due to there being multiple installs on the system. However, the usual steps are not resolving things.
I can successfully start Postgres and running:
ps auxw | grep post
returns ..
euanmillar 847 0.0 0.0 2432768 588 s000 R+ 11:19am 0:00.00 grep postgres
euanmillar 845 0.0 0.0 2439324 448 ?? Ss 11:19am 0:00.00 postgres:
stats collector process
euanmillar 844 0.0 0.0 2443176 1520 ?? Ss 11:19am 0:00.00 postgres:
autovacuum launcher process
euanmillar 843 0.0 0.0 2443044 544 ?? Ss 11:19am 0:00.00 postgres: wal writer process
euanmillar 842 0.0 0.0 2443044 584 ?? Ss 11:19am 0:00.00 postgres: writer process
euanmillar 841 0.0 0.0 2443044 596 ?? Ss 11:19am 0:00.00 postgres: checkpointer process
euanmillar 839 0.0 0.0 2443044 3616 s000 S 11:19am 0:00.02 /us
so it looks like postgres is running.
I have commented in the following lines in postgresql.conf
port = 5432
unix_socket_directory = '/var/pgsql_socket'
unix_socket_permissions = 0777
and in var/pgsql_socket/ I do have a hidden file .s.PGSQL.5432
I have tried solutions to many of the posts here. This one especially seems similar:
https://dba.stackexchange.com/questions/21587/postgresql-is-running-locally-but-i-cannot-connect-why
But the difference is that I do have a '/var/pgsql_socket' directory which is CHOWN-ed to everyone. I have used Homebrew to completely remove and re-install Postgres and still I have the same issue.
You need to remove the postmaster.pid, which should be in the following path:
/usr/local/var/postgres/postmaster.pid
这篇关于Mac OSX Lion Postgres不接受/tmp/.s.PGSQL.5432上的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!