Q: Server 3.2.1 (10.9.5) – Postgres won't start
After upgrading from Server 3.1.2 (Mavericks 10.9.3) to Server 3.2.1 (Mavericks 10.9.5), I cannot start Postgres:
# serveradmin start postgres
postgres:error = "CANNOT_START_SERVICE_TIMEOUT_ERR"
Here is what I see in system.log:
Sep 18 18:36:20 server com.apple.serverd[78]: ERROR: SMJobSubmit: The operation couldn’t be completed. (kSMErrorDomainLaunchd error 9 - The job dictionary specifies that it is disabled.)
Sep 18 18:36:20 server serveradmin[2249]: servermgr_postgres: waiting for postgres to respond
Sep 18 18:36:24 server serveradmin[2249]: servermgr_postgres: Timed out trying to start postgres.
Sep 18 18:36:24 server serveradmin[2249]: posting dist not
Not sure what to do from here. Postgres was running fine under 10.9.3.
Rusty
Posted on Sep 18, 2014 3:38 PM
Indeed, I think this is a bug.
I worked around it for now by changing unix_socket_directory to unix_socket_directories in /Library/Server/PostgreSQL/Config/org.postgresql.postgres.plist.
Afterward, I also had to pg_upgrade my data directory to 9.3 (I am guessing this was missed by the Server.app migrator because postgres wouldn't launch during migration due to this bug.)
That was somewhat involved, but I did it like this (in my example, I have a clone of the previous system with the previous postgres version on a volume called OlderClone):
ditto /Library/Server/PostgreSQL/Data /Library/Server/PostgreSQL/DataOld rm -rf /Library/Server/PostgreSQL/Data/* [as the _postgres user]: /Applications/Server.app/Contents/ServerRoot/usr/bin/initdb /Library/Server/PostgreSQL/Data -E utf8 mv /Volumes/OlderClone/Applications/Server.app/Contents/ServerRoot/usr/bin/postgres /Volumes/OlderClone/Applications/Server.app/Contents/ServerRoot/usr/bin/postgres_off mv /Volumes/OlderClone/Applications/Server.app/Contents/ServerRoot/usr/bin/postgres_real /Volumes/OlderClone/Applications/Server.app/Contents/ServerRoot/usr/bin/postgres [as the _postgres user]: /Applications/Server.app/Contents/ServerRoot/usr/bin/pg_upgrade -b /Volumes/OlderClone/Applications/Server.app/Contents/ServerRoot/usr/bin -B /Applications/Server.app/Contents/ServerRoot/usr/bin -d /Library/Server/PostgreSQL/DataOld -D /Library/Server/PostgreSQL/Data mv /Volumes/OlderClone/Applications/Server.app/Contents/ServerRoot/usr/bin/postgres /Volumes/OlderClone/Applications/Server.app/Contents/ServerRoot/usr/bin/postgres_real mv /Volumes/OlderClone/Applications/Server.app/Contents/ServerRoot/usr/bin/postgres_off /Volumes/OlderClone/Applications/Server.app/Contents/ServerRoot/usr/bin/postgres
Anyway, I have postgres running, but I think I'll file this as a radar.
Posted on Sep 18, 2014 6:50 PM