You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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

Reply
91 replies

Oct 17, 2014 12:09 PM in response to Johan Ylinenjarvi

Server 4.0, is even worse. I had my sites all configured as webapps, now, it unchecks them as soon as clicking OK. When I assigned my 3rd party SSL certificate to the web service, it also reverts back to the built-in certificate whenever I try to enable a webapp. Everything was working perfectly on Server 3.2.1; however as usual, Apple breaks it with upgrades. This is getting to be completely ridiculous. I don't think Apple, really cares about supporting a server any longer. I give up. This is just a server for my family's email, file sharing, calendaring, iTunes server, needs; however, I am done. I am tired. My plan is to move to a hosted email service like Yahoo, or something.

Oct 18, 2014 6:37 AM in response to essandess

I had a combination of these issues, and every time I fixed something, something else broke; the DB upgrade worked (after tweaking two of the locale settings), but after a reboot the data files ended up corrupt from which I could not recover (DB wouldn't start). So, I just reverted which luckily worked (but don't know if it was supposed to have which is why I hesitate trying it again).

Oct 18, 2014 2:28 PM in response to Bryan Schramm

FWIW: I got Postgres back to run when using 3.2.1 after following several of the directions in this thread (mostly Rusty's). After updating to 3.2.2, Postgres didn't start up again (CANNOT_START_SERVICE_TIMEOUT_ERR), but a new error showed in my system.log:

  1. run
    sudo serveradmin start postgres
  2. this shows up in system.log:
    com.apple.serverd[115]: ERROR: SMJobSubmit: The operation couldn't be completed. (kSMErrorDomainLaunchd error 9 - The job dictionary specifies that it is disabled.)


I don't remember if this was caused by my fiddling when trying to get Postgres running again after the 3.2.1 update, but the launchd overrides plist actually had an entry to disable postgres. I could swear that this error didn't show up in attempts to start postgres with OSX Server 3.2.1, and I had Postgres running with 3.2.1.


Anyway: If you get this error after trying to start postgres, have a look in the launchd overrides plist file:

sudo nano /var/db/launchd.db/com.apple.launchd/overrides.plist


Search for the postgres entry (Ctrl+W in nano) and have a look if its key “Disabled” is set to FALSE. If it isn't, change it and try to start postgres.


In my case, Postgres started up without a hitch, is running smoothly and the error above does no longer show up in my system.log.

Nov 10, 2014 2:49 AM in response to lgrijalvh

So I'm at a complete loss here.


Upgraded to 3.2.2 on a Mavericks install, and I had the dreaded error with postgres not starting (as symptomized by Profile Manager not running). Realizing that the last backup was not available I immediately panicked, and started googling. I have over 200 iPads out of physical reach that is enrolled with this computer, and the thought of having to re-enroll them all is a horrible nightmare.


So I found this thread, confirmed that I had the directory/directories error in my logs, and sighed a relief thinking there might be a fix. Changed the line in the config, and postgres immediately started by itself (no I didn't stop it to begin with). Quickly realized that the data had already been migrated as I got the ""Old cluster data and binary directories are from different major versions."" mesage, and went to check, but I still had the error in Server.app (Error Reading Settings).


I see I'm also having a ton of errors in the xpostgres.log file, the same as a few other users here:

2014-11-10 11:48:53 XPG.914: Spawning... ('/usr/bin/tar', '-xz', '-f', '/Library/Server/ProfileManager/Config/ServiceData/Data/backup/base_backup/base _complete.tar.gz', '-C', '/Library/Server/ProfileManager/Config/ServiceData/Data/PostgreSQL')

2014-11-10 11:48:55 XPG.914: Preparing to upgrade outdated database cluster.

Traceback (most recent call last):

File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 397, in errback

self._startRunCallbacks(fail)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 464, in _startRunCallbacks

self._runCallbacks()

File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 551, in _runCallbacks

current.result = callback(current.result, *args, **kw)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1101, in gotResult

_inlineCallbacks(r, g, deferred)

--- <exception caught here> ---

File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1043, in _inlineCallbacks

result = result.throwExceptionIntoGenerator(g)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/failure.py", line 382, in throwExceptionIntoGenerator

return g.throw(self.type, self.value, self.tb)

File "/Applications/Server.app/Contents/ServerRoot/usr/bin/xpostgres", line 2033, in main

result = yield xpg.do_everything(argv, environ)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1043, in _inlineCallbacks

result = result.throwExceptionIntoGenerator(g)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/failure.py", line 382, in throwExceptionIntoGenerator

return g.throw(self.type, self.value, self.tb)

File "/Applications/Server.app/Contents/ServerRoot/usr/bin/xpostgres", line 1094, in do_everything

yield self.do_restore()

File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1045, in _inlineCallbacks

result = g.send(result)

File "/Applications/Server.app/Contents/ServerRoot/usr/bin/xpostgres", line 1028, in do_restore

did_upgrade = self.upgrade_cluster_if_needed()

File "/Applications/Server.app/Contents/ServerRoot/usr/bin/xpostgres", line 1455, in upgrade_cluster_if_needed

os.rename(self.data_directory, orig_data_dir)

exceptions.OSError: [Errno 66] Directory not empty



Anybody successfully solved this and got their old database back?

Nov 17, 2014 9:48 AM in response to Eicoun

I strongly suggest that no one upgrade to Yosemite. I did that on both my servers and completely lost PosgreSQL, that is, I could not run the server app. Thankfully I had not done a lot of updates. I restored both of my servers to Mavericks before the latest version of the Server app was installed. I'm moving my databases to postgres.app. My problem is that I use several features in the server app (DNS,FTP, Web Service, VPN). It appears that the Yosemite version of the server app is worse than the Mavericks version. At least with the Mavericks version I can use the server app.


Not good software development or testing.

Server 3.2.1 (10.9.5) – Postgres won't start

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