04-10-2015 10:26 AM
sudo service cloudera-scm-server-db start returns an error:
pg_ctl: could not start server
FATAL: "/var/run/postgresql/.s.PGSQL.7432.lock": Permission denied
If postgresql is started independantly, it starts ok. Only when it is started as a part of CM, it returns the above error.
04-10-2015 07:06 PM
Starting postgresql by itself will run it on port 5432 (if using the defaults).
The "Embedded DB" for Cloudera Manager uses the version of postgres installed on the system. It just runs it under a different configuration for the data directory and port (7432).
It could be a stale lock file. It could also be the permissions on the lock file are such that the lock cannot be deleted.
1. Confirm if the postgres server is running:
ps -ef | grep bin/postgres
If you see this process running, the database is already started.
/usr/bin/postgres -D /var/lib/cloudera-scm-server-db/data
2. If the process is already running, try stopping it gracefully. If you have to, then kill it. (use "kill <pid>" a couple times before going for "kill -9")
3. Delete the existing lock file, from root if necessary.
4. Restart the cloudera-scm-server-db
04-10-2015 07:12 PM
04-13-2015 08:19 AM