MacOS Server 5.3 Calendar pg_ctl not starting

After upgrading macOS Server to 5.3 (running on macOS 10.12.4), my calendar and contacts stopped syncing.

It seems that he was having problems with the launch, Postgres for cluster /Library/Server/Calendar and Contacts/Data/Database.xpg/cluster.pgand possibly problems with the agent too.

The GUI seems to think that the calendar and contact services are up and running, but when I start $ sudo serveradmin fullstatus calendarfrom the command line, I get:

calendar:setStateVersion = 1
calendar:readWriteSettingsVersion = 1
calendar:state = "STARTING"
calendar:contactsState = "STARTING"
calendar:calendarState = "STARTING"

The system log is sent as spam:

Apr 22 11:58:42 com.apple.xpc.launchd[1] (org.calendarserver.agent[44649]): Service exited with abnormal code: 1
Apr 22 11:58:42 com.apple.xpc.launchd[1] (org.calendarserver.agent): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Apr 22 11:58:52 com.apple.xpc.launchd[1] (org.calendarserver.agent[44659]): Service exited with abnormal code: 1
Apr 22 11:58:52 com.apple.xpc.launchd[1] (org.calendarserver.agent): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Apr 22 11:59:02 com.apple.xpc.launchd[1] (org.calendarserver.agent[44668]): Service exited with abnormal code: 1
Apr 22 11:59:02 com.apple.xpc.launchd[1] (org.calendarserver.agent): Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
Apr 22 11:59:07 com.apple.xpc.launchd[1] (org.calendarserver.calendarserver[44676]): Service exited with abnormal code: 1
Apr 22 11:59:07 com.apple.xpc.launchd[1] (org.calendarserver.calendarserver): Service only ran for 0 seconds. Pushing respawn out by 60 seconds.

Here is the conclusion $ sudo /Applications/Server.app/Contents/ServerRoot/usr/sbin/calendarserver_diagnose

Any ideas?

OS Build: 16E195
Server Build: 16S4123    

/Library/Server/Preferences/Calendar.plist exists and can be parsed
Prefs plist says ServerRoot directory is: /Library/Server/Calendar and Contacts
ServerRoot volume ok
/Library/Server/Calendar and Contacts/Config/caldavd-system.plist exists and can be parsed
/Library/Server/Calendar and Contacts/Config/caldavd-user.plist does not exist    

Configuration:    

Calendar and Contacts service processes:
USER              PID  %CPU %MEM    RSS  ELAPSED STARTED                      COMMAND
root            42554   0.0  0.1  11072    07:49 Sat 22 Apr 11:32:16 2017     servermgr_calendar        

Serverd status:
org.calendarserver.agent is enabled
org.calendarserver.calendarserver is enabled
org.calendarserver.relocate is enabled    

Disk space on boot volume:
Filesystem   Size   Used  Avail Capacity iused      ifree %iused  Mounted on
/dev/disk1   999G   777G   222G    78% 8520180 4286447099    0%   /    

Disk space on service data volume:
Filesystem   Size   Used  Avail Capacity iused      ifree %iused  Mounted on
/dev/disk1   999G   777G   222G    78% 8520180 4286447099    0%   /    

Disk space used by Calendar and Contacts service:
20K  /Library/Server/Calendar and Contacts/Config
1014M /Library/Server/Calendar and Contacts/Data
200M  /Library/Server/Calendar and Contacts/Logs    


Postgres status for cluster /Library/Server/Calendar and Contacts/Data/Database.xpg/cluster.pg:
pg_ctl: no server running    


Agent:
Attempting to send a request to the agent...
Can't connect to agent: timed out    

Server connection:
Traceback (most recent call last):
  File "/Applications/Server.app/Contents/ServerRoot/usr/sbin/calendarserver_diagnose", line 14, in <module>
    load_entry_point('CalendarServer==9.1a1.dev0+56b4197875debefef19d9c19840f903a8e480c88.head', 'console_scripts', 'calendarserver_diagnose')()
  File "/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/lib/python2.7/site-packages/calendarserver/tools/diagnose.py", line 145, in main
    connectToCaldavd(keys)
  File "/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/lib/python2.7/site-packages/calendarserver/tools/diagnose.py", line 584, in connectToCaldavd
    url = "https://{host}/principals/".format(host=keys["ServerHostName"])
KeyError: 'ServerHostName'
+4
source share

Source: https://habr.com/ru/post/1675386/


All Articles