1.启动GP报错:
[gpadmin@master ~]$ gpstart -a
......................................................
Command was: 'env GPSESSID=0000000000 GPERA=None $GPHOME/bin/pg_ctl -D /data/master/gpseg-1 -l /data/master/gpseg-1/pg_log/startup.log -w -t 600 -o " -p 5432 -b 1 -z 0 --silent-mode=true -i -M master -C -1 -x 0 -c gp_role=utility " start'
rc=1, stdout='waiting for server to start...... stopped waiting
', stderr='pg_ctl: PID file
"/data/master/gpseg-1/postmaster.pid" does not exist
pg_ctl:
could not start server
Examine the
log output.
有时启动gp的时候,莫名的就报错了,进不去数据库
postmaster.pid" does not exist,/data/master/gpseg-1路径是我定义的master上的数据地址。
2.查看启动日志:
[gpadmin@master ~]$ cat /data/master/gpseg-1/pg_log/startup.log
...................................................
2016-10-08 15:26:06.770995 GMT,,,p2966,th1103554336,,,,0,,,seg-1,,,,,"FATAL","55000","data directory ""/data/master/gpseg-1"" has group or world access","Permissions should be u=rwx (0700).",,,,,,,"checkDataDir","postmaster.c",1763,
2016-10-09 00:59:06.211826 GMT,,,p3390,th2021295904,,,,0,,,seg-1,,,,,"FATAL","55000","data directory ""/data/master/gpseg-1"" has group or world access","
Permissions should be u=rwx (0700)
.",,,,,,,"checkDataDir","postmaster.c",1763,
红色部分说明是文件权限问题
3.修改权限为700:
[gpadmin@master master]$
chmod -R 700 *
[gpadmin@master master]$ gpstart -a
............................................................................................
20161009:09:07:34:003507 gpstart:master:gpadmin-[INFO]:-Database successfully started