启动Postgres时出错

时间:2015-07-15 10:55:56

标签: postgresql ubuntu-14.04

我在Postgres数据库不想启动的实时网站(以及它的相应开发网站)上遇到了一个奇怪的错误。这个问题突然发生了,我不知道是什么原因引起的。

尝试在终端中启动会给予可怕的“不接受5432连接”#39;

sudo -u postgres psql
psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

如果我尝试重新启动postgres:

service postgresql restart
 * Restarting PostgreSQL 9.1 database server                                                                                                                                                                    * The PostgreSQL server failed to start. Please check the log output:
2015-07-15 13:49:24 EEST LOG:  database system was interrupted; last known up at 2015-07-12 20:02:18 EEST
2015-07-15 13:49:24 EEST FATAL:  could not open file "/etc/ssl/certs/ssl-cert-snakeoil.pem": Permission denied
2015-07-15 13:49:24 EEST LOG:  startup process (PID 11172) exited with exit code 1
2015-07-15 13:49:24 EEST LOG:  aborting startup due to startup process failure

关于下一步尝试的内容,或者可能导致这种情况的任何想法?

1 个答案:

答案 0 :(得分:0)

就我而言,一些ubuntu / postgres升级将文件的权限更改为600。

将其更改为644可解决问题,我可以启动postgre守护程序。

chmod 644 /etc/ssl/certs7ssl-cert-snakeoil.pem