Fixing Server PostgreSQL Services

A few weeks ago, my hard drive died on me. I hadn't backed up in a while, so I used DataRescue to recover most of my drive (and replaced anything it marked as corrupt) followed by a clean install and migration from the recovered data. However, I don't think it did a great job with permissions. I think I've fixed most of it, but I'm having some issues with Server. In the logs, I see the following message constantly:


Aug 8 01:20:28 shakespeare com.apple.launchd[1] (com.apple.postgres[491]): Exited with code: 2

Aug 8 01:20:28 shakespeare com.apple.launchd[1] (com.apple.postgres): Throttling respawn: Will start in 10 seconds


In Server, it can't load the settings for several services (wiki, profile manager, mail) and gives me the following message:


An error occurred on the server while reading settings.

The error occurred while reading settings for the Mail service.


At the same time, in the console I see:


Aug 8 22:27:51 shakespeare.local collabd[18403]: [CSConnectionPool:152 8481000 +0ms] Could not open a connection to Postgres. Please make sure it is running and has the correct access.


I've also seen other postgre related log messages:


Aug 7 23:51:28 shakespeare.local sudo[1248]: root : user NOT in sudoers ; TTY=unknown ; PWD=/ ; USER=_postgres ; COMMAND=/Applications/Server.app/Contents/ServerRoot/usr/bin/initdb --encoding UTF8 -D /Library/Server/PostgreSQL For Server Services/Data

Aug 7 23:51:43 shakespeare.local serveradmin[1918]: servermgr_postgres_server: waiting for postgres to respond



From all of this, I sermize that it's a permissions issue related to the user _postgres. Does anyone know how to fix this? Which file's permissions should I look at?

MacBook Pro (13-inch Mid 2009), OS X Mountain Lion (10.8.4)

Posted on Aug 8, 2013 7:32 PM

Reply
16 replies

Aug 30, 2014 8:35 AM in response to sohilr

My output also shows permission denied:

/Library/Server/PostgreSQL:

total 0

drwxr-xr-x 4 216 216 - 136 Feb 9 2014 .

drwxr-xr-x 26 0 0 - 884 Aug 30 08:20 ..

drwxr-xr-x 3 216 216 - 102 Feb 9 2014 Config

drwx------ 18 216 216 - 612 Aug 29 09:35 Data



/Library/Server/PostgreSQL For Server Services:

ls: PostgreSQL For Server Services: Permission denied

Is this expected?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Fixing Server PostgreSQL Services

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.