PostgreSQL 启动失败
* Starting PostgreSQL 9.1 database server * Removed stale pid file.
The PostgreSQL server failed to start. Please check the log output:
2015-03-05 15:41:57 GMT FATAL: could not remove old lock file "postmaster.pid": Operation not permitted
2015-03-05 15:41:57 GMT HINT: The file seems accidentally left over, but it could not be removed. Please remove the file by hand and try again.
解决方式:
root@db38bdb26696: /var/lib/postgresql/9.1/main# ls
PG_VERSION base global pg_clog pg_multixact pg_notify pg_serial pg_stat_tmp pg_subtrans pg_tblspc pg_twophase pg_xlog postmaster.opts postmaster.pid server.crt server.key
删除 postmaster.pid
rm postmaster.pid
root@db38bdb26696:/var/run/postgresql# ll
total 16
drwxrwsr-x 2 postgres postgres 4096 Mar 5 23:43 ./
drwxr-xr-x 11 root root 4096 Feb 9 15:10 ../
srwxrwxrwx 1 postgres postgres 0 Mar 5 23:43 .s.PGSQL.5432=
-rw------- 1 postgres postgres 70 Mar 5 23:43 .s.PGSQL.5432.lock
-rw------- 1 postgres postgres 5 Mar 5 23:43 9.1-main.pid
删除 .s.PGSQL.5432= 和 .s.PGSQL.5432.lock
再重启动就ok了
sudo /etc/init.d/postgresql start
* Starting PostgreSQL 9.1 database server
猜你喜欢
转载自amspring.iteye.com/blog/2189239
今日推荐
周排行