我在一个现场网站(以及相应的开发网站)上遇到了一个奇怪的错误,Postgres数据库无法启动。这个问题突然发生,我不知道是什么原因导致的。
尝试在终端中启动时出现了可怕的“不接受5432连接”的错误提示。
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
有没有任何想法可以尝试下一步,或者是什么原因导致了这个问题?
make-ssl-cert generate-default-snakeoil --force-overwrite
。我之前也遇到了同样的问题,这个方法解决了它。 - BANJOSA