ppitton

Q: Calendar Server not reachable after update to Server5

Hi there,

 

since upgrading OS X server to ElCapitan and Server5 I cannot connect from Macbook (El Capitan) or iPhone / iPad anymore.

 

Server diagnosis says "Starting...", it's not showing "RUNNING"...

 

Any ideas?

 

Thanks, Peter

 

 

 

-----

sudo /Applications/Server.app/Contents/ServerRoot/usr/sbin/serveradmin fullstatus calendar

calendar:setStateVersion = 1

calendar:calendarState = "STARTING"

calendar:state = "STARTING"

calendar:contactsState = "STARTING"

calendar:readWriteSettingsVersion = 1

 

-----

calendarserver_diagnose shows

----

OS Build: 15B42

Server Build: 15S4033

 

/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:

EnableCalDAV : True

EnableCardDAV : True

Notifications.Services.APNS.Enabled : True

Scheduling.iMIP.Enabled : False

Authentication.Basic.Enabled : True

Authentication.Digest.Enabled : True

Authentication.Kerberos.Enabled : True

HTTPPort : 8008

SSLPort : 8443

 

Calendar and Contacts service processes:

USER              PID  %CPU %MEM    RSS  ELAPSED STARTED                      COMMAND

_devicemgr        287   0.0  0.4  62908 02:34:20 Wed Nov 18 18:52:06 2015     xpostgres -a /Library/Server/ProfileManager/Config/PostgreSQL_config.plist -D /Library/Server/ProfileManager/Config/ServiceData/Data/PostgreSQL -c unix_socket_directories=/Library/Server/ProfileManager/Config/var/PostgreSQL -c default_transaction_isolation=serializable -c logging_collector=on -c log_rotation_size=10MB -c log_connections=on -c log_lock_waits=on -c log_statement=ddl -c log_line_prefix=%m  -c listen_addresses= -c log_directory=/Library/Logs/ProfileManager -c log_filename=PostgreSQL-%F.log -c log_file_mode=0640 -c log_min_messages=WARNING -c log_min_error_statement=WA  XPC_FLAGS=0x0 PYTHONPATH=/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/ lib/python2.7/site-packages

root              403   0.0  0.1  12876 02:34:15 Wed Nov 18 18:52:11 2015     servermgr_calendar   

_calendar         592   0.0  0.0   1212 02:34:02 Wed Nov 18 18:52:24 2015     memcached -U 0 -s /var/run/caldavd/memcache.sock -u calendar

_calendar         611   0.0  0.4  64752 02:34:01 Wed Nov 18 18:52:25 2015     xpostgres -c listen_addresses= -c unix_socket_directories=/var/run/caldavd/PostgresSocket -c shared_buffers=165 -c max_connections=110 -c standard_conforming_strings=on -c unix_socket_permissions=0770 -c log_lock_waits=TRUE -c deadlock_timeout=10 -c log_line_prefix=%m [%p]  -c log_directory=/Library/Server/Calendar and Contacts/Logs -c log_truncate_on_rotation=on -c log_filename=postgresql_%w.log -c log_rotation_age=1440 -c logging_collector=on -c log_line_prefix=%t                              

_calendar         647   0.0  0.0   3432 02:33:59 Wed Nov 18 18:52:27 2015     /System/Library/PrivateFrameworks/TCC.framework/Resources/tccd

_calendar         649   0.0  0.0   7696 02:33:59 Wed Nov 18 18:52:27 2015     /Applications/Server.app/Contents/ServerRoot/usr/bin/postgres_real -c listen_addresses= -c unix_socket_directories=/var/run/caldavd/PostgresSocket -c shared_buffers=165 -c max_connections=110 -c standard_conforming_strings=on -c unix_socket_permissions=0770 -c log_lock_waits=TRUE -c deadlock_timeout=10 -c log_line_prefix=%m [%p]  -c log_directory=/Library/Server/Calendar and Contacts/Logs -c log_truncate_on_rotation=on -c log_filename=postgresql_%w.log -c log_rotation_age=1440 -c logging_collector=on -c log_line_prefix=%t

_calendar         667   0.0  0.0    540 02:33:59 Wed Nov 18 18:52:27 2015     postgres: logger process                                

_calendar         670   0.0  0.0   1244 02:33:58 Wed Nov 18 18:52:28 2015     postgres: checkpointer process                                

_calendar         671   0.0  0.0   1856 02:33:58 Wed Nov 18 18:52:28 2015     postgres: writer process                                

_calendar         672   0.0  0.0    776 02:33:58 Wed Nov 18 18:52:28 2015     postgres: wal writer process                                

_calendar         673   0.0  0.0   2444 02:33:58 Wed Nov 18 18:52:28 2015     postgres: autovacuum launcher process                                

_calendar         674   0.0  0.0    652 02:33:58 Wed Nov 18 18:52:28 2015     postgres: archiver process   last was 000000010000000000000060                             

_calendar         675   0.0  0.0    832 02:33:58 Wed Nov 18 18:52:28 2015     postgres: stats collector process                                

_calendar         677   0.0  0.0   3968 02:33:58 Wed Nov 18 18:52:28 2015     /Applications/Server.app/Contents/ServerRoot/usr/bin/pg_receivexlog -h /var/run/caldavd/PostgresSocket --no-password --directory /Library/Server/Calendar and Contacts/Data/Database.xpg/backup --verbose --status-interval=1

_calendar         678   0.0  0.0   2244 02:33:58 Wed Nov 18 18:52:28 2015     postgres: wal sender process caldav [local] streaming 0/61119280                             

root             1270   0.0  0.6 106380 02:31:24 Wed Nov 18 18:55:02 2015     CalendarServer 7.0.a1+unknown [Agent]            

_calendar        1292   0.0  0.0   7040 02:31:16 Wed Nov 18 18:55:10 2015     postgres: caldav caldav [local] idle                             

_calendar        1317   0.0  0.0   1116 02:30:55 Wed Nov 18 18:55:31 2015     /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework /Versions/A/Support/mdflagwriter

 

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/disk2   1.1T   380G   735G    35% 92930385 179335949   34%   /

 

Disk space on service data volume:

Filesystem   Size   Used  Avail Capacity  iused     ifree %iused  Mounted on

/dev/disk2   1.1T   380G   735G    35% 92930385 179335949   34%   /

 

Disk space used by Calendar and Contacts service:

32K /Library/Server/Calendar and Contacts/Config

732M /Library/Server/Calendar and Contacts/Data

461M /Library/Server/Calendar and Contacts/Logs

 

 

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

pg_ctl: server is running (PID: 649)

/Applications/Server.app/Contents/ServerRoot/usr/bin/postgres_real "-c" "listen_addresses=" "-c" "unix_socket_directories=/var/run/caldavd/PostgresSocket" "-c" "shared_buffers=165" "-c" "max_connections=110" "-c" "standard_conforming_strings=on" "-c" "unix_socket_permissions=0770" "-c" "log_lock_waits=TRUE" "-c" "deadlock_timeout=10" "-c" "log_line_prefix=%m [%p] " "-c" "log_directory=/Library/Server/Calendar and Contacts/Logs" "-c" "log_truncate_on_rotation=on" "-c" "log_filename=postgresql_%w.log" "-c" "log_rotation_age=1440" "-c" "logging_collector=on" "-c" "log_line_prefix=%t"

 

 

Postgres content:

 

                          List of databases

   Name    | Owner  | Encoding | Collate | Ctype | Access privileges

-----------+--------+----------+---------+-------+-------------------

caldav    | caldav | UTF8     | C       | C     |

postgres  | caldav | UTF8     | C       | C     |

template0 | caldav | UTF8     | C       | C     | =c/caldav        +

           |        |          |         |       | caldav=CTc/caldav

template1 | caldav | UTF8     | C       | C     | caldav=CTc/caldav+

           |        |          |         |       | =c/caldav

(4 rows)

 

 

'calendarserver' table...

           name           | value

--------------------------+-------

ADDRESSBOOK-DATAVERSION  | 2

MANAGED-ATTACHMENTS      | 1

CALENDAR-DATAVERSION     | 6

NOTIFICATION-DATAVERSION | 1

VERSION                  | 52

MIN-VALID-REVISION       | 734

(6 rows)

 

 

Number of calendar homes: 3

Number of calendar events: 0

Number of contacts homes: 3

Number of contacts cards: 7

Number of non-group delegate assignments: 0

Number of group delegate assignments: 0

'job' table...

job_id |          work_type           | priority | weight |         not_before         | assigned | failed | overdue

--------+------------------------------+----------+--------+-------------------- --------+----------+--------+---------

109127 | FIND_MIN_VALID_REVISION_WORK |        0 |      5 | 2015-10-28 14:22:04.866093 |          |      0 |

108825 | PRINCIPAL_PURGE_POLLING_WORK |        0 |      5 | 2015-11-01 13:26:59.835898 |          |      0 |

109125 | INBOX_CLEANUP_WORK           |        0 |      5 | 2015-10-28 14:12:02.53975  |          |      0 |

109318 | GROUP_CACHER_POLLING_WORK    |        0 |      5 | 2015-10-27 06:21:56.42811  |          |      0 |

(4 rows)

 

 

 

Agent:

Attempting to send a request to the agent...

Can't connect to agent: <urlopen error [Errno 60] Operation timed out>

 

Server connection:

Attempting to send a request to port 443...

Can't connect to port 443: <urlopen error [Errno 61] Connection refused>

 

Web apps:

web:webAppState:_array_index:0:virtualHostName = "-"

web:webAppState:_array_index:0:vhid = "-"

web:webAppState:_array_index:0:state = "RUNNING"

web:webAppState:_array_index:0:webAppName = "com.apple.webapp.calendar"

web:webAppState:_array_index:1:virtualHostName = "-"

web:webAppState:_array_index:1:vhid = "-"

web:webAppState:_array_index:1:state = "RUNNING"

web:webAppState:_array_index:1:webAppName = "com.apple.webapp.collabd"

web:webAppState:_array_index:2:virtualHostName = "-"

web:webAppState:_array_index:2:vhid = "-"

web:webAppState:_array_index:2:state = "RUNNING"

web:webAppState:_array_index:2:webAppName = "com.apple.webapp.ACSServer"

web:webAppState:_array_index:3:virtualHostName = "-"

web:webAppState:_array_index:3:vhid = "-"

web:webAppState:_array_index:3:state = "RUNNING"

web:webAppState:_array_index:3:webAppName = "com.apple.webapp.auth"

web:webAppState:_array_index:4:virtualHostName = "-"

web:webAppState:_array_index:4:vhid = "-"

web:webAppState:_array_index:4:state = "RUNNING"

web:webAppState:_array_index:4:webAppName = "com.apple.webapp.xcode"

web:webAppState:_array_index:5:virtualHostName = "-"

web:webAppState:_array_index:5:vhid = "-"

web:webAppState:_array_index:5:state = "RUNNING"

web:webAppState:_array_index:5:webAppName = "com.apple.webapp.devicemgr"

Posted on Nov 18, 2015 12:34 PM

Close

Q: Calendar Server not reachable after update to Server5

  • All replies
  • Helpful answers

  • by ppitton,

    ppitton ppitton Nov 19, 2015 4:07 AM in response to ppitton
    Level 1 (0 points)
    Nov 19, 2015 4:07 AM in response to ppitton

    By the way,

     

    looking at the SERVER app -> access -> don't know how to translate, see below...

    It shows that calendar is using TCP 8008, 8443 ports.

    I have read that Server5 changed this to ports 80 and 443, which also shows on the console...

     

    Server-Info.png

  • by Karsten Krueger,

    Karsten Krueger Karsten Krueger Nov 21, 2015 8:50 AM in response to ppitton
    Level 1 (10 points)
    Nov 21, 2015 8:50 AM in response to ppitton

    Some ports used by Mac OS X Server have changed. You need to reconfigure port forwarding on your router:

     

    These ports need to be forwarded:

    WebDAV (file sharing) 80,10548

    CalDAV (Calendar)     8008,8443

    CardDAV (Contacts)   8800,8843

    Push service               5223,2195,2196

    SSL                             443

     

    There might be more, but this config works for me.

  • by ppitton,

    ppitton ppitton Nov 22, 2015 4:28 AM in response to Karsten Krueger
    Level 1 (0 points)
    Nov 22, 2015 4:28 AM in response to Karsten Krueger

    Hi Karsten,

     

    thanks.

     

    Funny thing is: I didn't change anything, just updated a) El Capitan and b) Server5 on the Mac mini and since then Calendar and AddressBook Server is not reachable anymore. What puzzles me is that status show as "starting", not "running".

     

    Any ideas about how to diagnose any further?

     

    Thanks,

     

    Peter

  • by Karsten Krueger,

    Karsten Krueger Karsten Krueger Nov 22, 2015 2:40 PM in response to ppitton
    Level 1 (10 points)
    Nov 22, 2015 2:40 PM in response to ppitton

    Hi Peter,

     

    Hmm, what I have learned from past upgrades is never to directly upgrade an Apple Server.

    I did a bootable backup to an external HD, then a clean install of Mac OS X 10.11 and Server.app.

    Next step should be migrating users, but I just have 4 of them so will do this manually.

     

    I upgraded from 10.8 to 10.11. After basic configuration Server.app told me that most services were only available locally. It seems that Server.app tries to validate external access to its services (nice, but confusing because they give no clues to how to solve it). My solution was to reconfigure my router to forward a different set of ports.

     

    From your log listing above it seems to be an access problem of your database. It runs into deadlocks which means that postgres is not able to solve the issues by itself. In your case I would start allover, do a clean install of both OS X 10.11 and Server.app, then use the migration assistant to import and setup user data from a working backup.

  • by ppitton,

    ppitton ppitton Nov 23, 2015 8:39 AM in response to Karsten Krueger
    Level 1 (0 points)
    Nov 23, 2015 8:39 AM in response to Karsten Krueger

    Thanks,

     

    that doesn't sound like a "quick fix" which I was hoping for.

     

    Brgds,

     

    Peter

  • by Karsten Krueger,

    Karsten Krueger Karsten Krueger Nov 23, 2015 12:26 PM in response to ppitton
    Level 1 (10 points)
    Nov 23, 2015 12:26 PM in response to ppitton

    Sorry, but no other real idea. You might perhaps want to try phpAdmin or something similar to peek into your Postgres database - but I don't know if that will give you more clues or not. - But I doubt that this will be faster than a clean install.

     

    Have fun,

    Karsten