Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

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

Calendar server problem, "Exited with code 1" in Console.

Hello.


After changing internet providers, I'm rebuilding a Mac Mini Server (OS 10.9.2, Server 3.1.1). I have almost everything I need setup, but I'm having a problem with the calendar server that won't turn on in the Server app. It says "Loading..." but nothing happens. When I look in the console, there is a repeating entry every 10 seconds:


16/04/14 19:40:08,607 com.apple.launchd[1]: (org.calendarserver.agent[15182]) Exited with code: 1
16/04/14 19:40:08,607 com.apple.launchd[1]: (org.calendarserver.agent) Throttling respawn: Will start in 9 seconds


This problem appeared after I tried setting up an Automator action to run a python script that I found to edit the zone file at my domain provider (Gandi). I'm not an expert but I managed to modify and run it using "python3" in the terminal. I then created a shell script to run it as a Launch Daemon, but com.apple.launchd keeps exiting with a code 127 and I can't understand why. Then I created an automator calendar alarm for the script, put it Calendar, set it to repeat every day, and duplicated it to the 24 hours of the day.


Today I try again to get launchd to work, so I delete the calendar alarms, and since then this bug happens, and the calendar server won't turn on.


I'd be grateful for any pointers you may have, 3 days on this server, was getting ready to make a ghost... and this 😟

Mac mini, OS X Mavericks (10.9.2)

Posted on Apr 16, 2014 11:01 AM

Reply
Question marked as Best reply

Posted on Apr 16, 2014 2:39 PM

Caldavd error log?

12 replies

Apr 16, 2014 6:30 PM in response to Linc Davis

Reading the caldavd error log file also shows a repeating loop:


Reading configuration from file: /Applications/Server.app/Contents/ServerRoot/private/etc/caldavd/caldavd-apple.plist
Neither EnableCalDAV nor EnableCardDAV are set to True.


Checked caldavd-apple.plist and the EnableCalDAV is set to false.


sudo serveradmin settings calendar:EnableCalDAV=yes

sudo serveradmin settings calendar:EnableCardDAV=yes

calendar:EnableCalDAV = yes
calendar.EnableCardDAV = yes


sudo serveradmin start calendar, serveradmin fullstatus calendar both give the same (as does addressbook)


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


Tried rebooting of course, still no go.


Thanks for the help !!

Apr 17, 2014 12:51 AM in response to Linc Davis

Still the same:

Reading configuration from file: /Applications/Server.app/Contents/ServerRoot/private/etc/caldavd/caldavd-apple.plist
Neither EnableCalDAV nor EnableCardDAV are set to True.


I tried manually editing the plist file and set both to true, but still no go

    <!-- Enable Calendars -->
    <key>EnableCalDAV</key>
    <true/>


    <!-- Enable AddressBooks -->
    <key>EnableCardDAV</key>
    <true/>

Apr 18, 2014 2:55 AM in response to Linc Davis

Sorry about that .plist edit, won't do it again.


Placed Server.app into trash, OS X notified of change and stopped services. Deleted trash, rebooted, repaired permissions, reinstalled Server.app

Before the setup process even finishes, the loop starts again

Reading configuration from file: /Applications/Server.app/Contents/ServerRoot/private/etc/caldavd/caldavd-apple.plist

Neither EnableCalDAV nor EnableCardDAV are set to True.

Server.app still shows "Loading..." with nothing happening. sudo serveradmin settings calendar:EnableCardDAV=yes returns a "yes" but then the fullstatus command says STOPPED.


edit:

rebooted again and briefly had Calendar and Contacts windows appear correctly in Server.app, but still won't turn on. There is something in the caldavd servermgr_calendar.log that ends with a looping

[cal] 18/04/14 11:49:01 GMT+2 : Locked by another request

Should I post more of that log ?

Apr 19, 2014 2:24 AM in response to Linc Davis

Here is the servermgr_calendar.log extract, this pattern repeats as well. (I redacted my domain name and SSLcertificate details).


Thanks again for the help!!


[cal] 19/04/14 11:19:07 GMT+2 : Command getLocationList received
[cal] 19/04/14 11:19:07 GMT+2 : getLocationList attempting to acquire request lock...
[cal] 19/04/14 11:19:07 GMT+2 : getLocationList acquired request lock
[cal] 19/04/14 11:19:07 GMT+2 : calendarServerOperationWithRequest
[cal] 19/04/14 11:19:07 GMT+2 : Calling agent...
[cal] 19/04/14 11:19:22 GMT+2 : Agent failure: The request timed out.
[cal] 19/04/14 11:19:22 GMT+2 : Agent returned...
{
    error = "The request timed out.";
}
[cal] 19/04/14 11:19:22 GMT+2 : Command getLocationList duration 15.02 seconds
[cal] 19/04/14 11:19:22 GMT+2 : getLocationList releasing request lock
[cal] 19/04/14 11:19:22 GMT+2 : Command getState received
[cal] 19/04/14 11:19:22 GMT+2 : getState attempting to acquire request lock...
[cal] 19/04/14 11:19:22 GMT+2 : getState acquired request lock
[cal] 19/04/14 11:19:22 GMT+2 : getState begin
[cal] 19/04/14 11:19:22 GMT+2 : Read Settings
[cal] 19/04/14 11:19:22 GMT+2 : calendarServerOperationWithRequest
[cal] 19/04/14 11:19:22 GMT+2 : Calling agent...
[cal] 19/04/14 11:19:37 GMT+2 : Agent failure: The request timed out.
[cal] 19/04/14 11:19:37 GMT+2 : Agent returned...
{
    error = "The request timed out.";
}
[cal] 19/04/14 11:19:37 GMT+2 : Asking calendarserver_config for a readConfig
[cal] 19/04/14 11:19:37 GMT+2 : Returned from calendarserver_config
[cal] 19/04/14 11:19:37 GMT+2 : No error parsing calendarserver_config output
[cal] 19/04/14 11:19:37 GMT+2 : Got settings from calendarserver_config
[cal] 19/04/14 11:19:37 GMT+2 : Read settings returning:
[cal] 19/04/14 11:19:37 GMT+2 :   configuration = {
[cal] 19/04/14 11:19:37 GMT+2 :     SSLCertificate = /etc/certificates/MYDOMAIN.net.XXXXXXXXXXXXXXXXXXXXXXXXX.cert.pem
[cal] 19/04/14 11:19:37 GMT+2 :     EnableCalDAV = 0
[cal] 19/04/14 11:19:37 GMT+2 :     Notifications = {
[cal] 19/04/14 11:19:37 GMT+2 :       Services = {
[cal] 19/04/14 11:19:37 GMT+2 :         APNS = {
[cal] 19/04/14 11:19:37 GMT+2 :           CalDAV = {
[cal] 19/04/14 11:19:37 GMT+2 :             CertificatePath = 
[cal] 19/04/14 11:19:37 GMT+2 :             PrivateKeyPath = 
[cal] 19/04/14 11:19:37 GMT+2 :             AuthorityChainPath = 
[cal] 19/04/14 11:19:37 GMT+2 :           }
[cal] 19/04/14 11:19:37 GMT+2 :           CardDAV = {
[cal] 19/04/14 11:19:37 GMT+2 :             CertificatePath = 
[cal] 19/04/14 11:19:37 GMT+2 :             PrivateKeyPath = 
[cal] 19/04/14 11:19:37 GMT+2 :             AuthorityChainPath = 
[cal] 19/04/14 11:19:37 GMT+2 :           }
[cal] 19/04/14 11:19:37 GMT+2 :           Enabled = 0
[cal] 19/04/14 11:19:37 GMT+2 :         }
[cal] 19/04/14 11:19:37 GMT+2 :       }
[cal] 19/04/14 11:19:37 GMT+2 :     }
[cal] 19/04/14 11:19:37 GMT+2 :     EnableAPNS = 0
[cal] 19/04/14 11:19:37 GMT+2 :     DefaultLogLevel = warn
[cal] 19/04/14 11:19:37 GMT+2 :     Authentication = {
[cal] 19/04/14 11:19:37 GMT+2 :       Digest = {
[cal] 19/04/14 11:19:37 GMT+2 :         Enabled = 1
[cal] 19/04/14 11:19:37 GMT+2 :         AllowedOverWireUnencrypted = 1
[cal] 19/04/14 11:19:37 GMT+2 :       }
[cal] 19/04/14 11:19:37 GMT+2 :       Kerberos = {
[cal] 19/04/14 11:19:37 GMT+2 :         Enabled = 1
[cal] 19/04/14 11:19:37 GMT+2 :         AllowedOverWireUnencrypted = 1
[cal] 19/04/14 11:19:37 GMT+2 :       }
[cal] 19/04/14 11:19:37 GMT+2 :       Wiki = {
[cal] 19/04/14 11:19:37 GMT+2 :         Enabled = 1
[cal] 19/04/14 11:19:37 GMT+2 :       }
[cal] 19/04/14 11:19:37 GMT+2 :       Basic = {
[cal] 19/04/14 11:19:37 GMT+2 :         Enabled = 1
[cal] 19/04/14 11:19:37 GMT+2 :         AllowedOverWireUnencrypted = 0
[cal] 19/04/14 11:19:37 GMT+2 :       }
[cal] 19/04/14 11:19:37 GMT+2 :     }
[cal] 19/04/14 11:19:37 GMT+2 :     DataRoot = /Volumes/MiniDATA/Library/Server/Calendar and Contacts/Data
[cal] 19/04/14 11:19:37 GMT+2 :     Scheduling = {
[cal] 19/04/14 11:19:37 GMT+2 :       iMIP = {
[cal] 19/04/14 11:19:37 GMT+2 :         Sending = {
[cal] 19/04/14 11:19:37 GMT+2 :           Server = 
[cal] 19/04/14 11:19:37 GMT+2 :           UseSSL = 1
[cal] 19/04/14 11:19:37 GMT+2 :           Username = 
[cal] 19/04/14 11:19:37 GMT+2 :           Address = 
[cal] 19/04/14 11:19:37 GMT+2 :           Port = 587
[cal] 19/04/14 11:19:37 GMT+2 :         }
[cal] 19/04/14 11:19:37 GMT+2 :         Enabled = 0
[cal] 19/04/14 11:19:37 GMT+2 :         Receiving = {
[cal] 19/04/14 11:19:37 GMT+2 :           Server = 
[cal] 19/04/14 11:19:37 GMT+2 :           UseSSL = 1
[cal] 19/04/14 11:19:37 GMT+2 :           Username = 
[cal] 19/04/14 11:19:37 GMT+2 :           Type = 
[cal] 19/04/14 11:19:37 GMT+2 :           Port = 995
[cal] 19/04/14 11:19:37 GMT+2 :         }
[cal] 19/04/14 11:19:37 GMT+2 :       }
[cal] 19/04/14 11:19:37 GMT+2 :     }
[cal] 19/04/14 11:19:37 GMT+2 :     ServerHostName = MYDOMAIN.net
[cal] 19/04/14 11:19:37 GMT+2 :     EnableCardDAV = 0
[cal] 19/04/14 11:19:37 GMT+2 :     SSLPort = 8443
[cal] 19/04/14 11:19:37 GMT+2 :     LogLevels = {
[cal] 19/04/14 11:19:37 GMT+2 :     }
[cal] 19/04/14 11:19:37 GMT+2 :     DirectoryAddressBook = {
[cal] 19/04/14 11:19:37 GMT+2 :       params = {
[cal] 19/04/14 11:19:37 GMT+2 :         queryPeopleRecords = 0
[cal] 19/04/14 11:19:37 GMT+2 :         queryUserRecords = 0
[cal] 19/04/14 11:19:37 GMT+2 :       }
[cal] 19/04/14 11:19:37 GMT+2 :     }
[cal] 19/04/14 11:19:37 GMT+2 :     SSLPrivateKey = /etc/certificates/MYDOMAIN.net.XXXXXXXXXXXXXXXXXXXXXXXXX.key.pem
[cal] 19/04/14 11:19:37 GMT+2 :     EnableSSL = 1
[cal] 19/04/14 11:19:37 GMT+2 :     RedirectHTTPToHTTPS = 1
[cal] 19/04/14 11:19:37 GMT+2 :     SSLAuthorityChain = /etc/certificates/MYDOMAIN.net.XXXXXXXXXXXXXXXXXXXXXXXXX.chain.pem
[cal] 19/04/14 11:19:37 GMT+2 :     EnableSearchAddressBook = 0
[cal] 19/04/14 11:19:37 GMT+2 :     HTTPPort = 8008
[cal] 19/04/14 11:19:37 GMT+2 :   }
[cal] 19/04/14 11:19:37 GMT+2 :   readStatus = 0
[cal] 19/04/14 11:19:37 GMT+2 : getState returning: {
    calendarState = STOPPED;
    contactsState = STOPPED;
    readWriteSettingsVersion = 1;
    setStateVersion = 1;
    state = STOPPED;
}
[cal] 19/04/14 11:19:37 GMT+2 : Command getState duration 15.46 seconds
[cal] 19/04/14 11:19:37 GMT+2 : getState releasing request lock
[cal] 19/04/14 11:19:37 GMT+2 : Command getResourceList received
[cal] 19/04/14 11:19:37 GMT+2 : getResourceList attempting to acquire request lock...
[cal] 19/04/14 11:19:37 GMT+2 : getResourceList acquired request lock
[cal] 19/04/14 11:19:37 GMT+2 : calendarServerOperationWithRequest
[cal] 19/04/14 11:19:37 GMT+2 : Calling agent...
[cal] 19/04/14 11:19:52 GMT+2 : Agent failure: The request timed out.
[cal] 19/04/14 11:19:52 GMT+2 : Agent returned...
{
    error = "The request timed out.";
}
[cal] 19/04/14 11:19:52 GMT+2 : Command getResourceList duration 15.01 seconds
[cal] 19/04/14 11:19:52 GMT+2 : getResourceList releasing request lock
[cal] 19/04/14 11:19:52 GMT+2 : Command readSettings received
[cal] 19/04/14 11:19:52 GMT+2 : readSettings attempting to acquire request lock...
[cal] 19/04/14 11:19:52 GMT+2 : readSettings acquired request lock
[cal] 19/04/14 11:19:52 GMT+2 : Read Settings
[cal] 19/04/14 11:19:52 GMT+2 : calendarServerOperationWithRequest
[cal] 19/04/14 11:19:52 GMT+2 : Calling agent...
[cal] 19/04/14 11:20:08 GMT+2 : Agent failure: The request timed out.
[cal] 19/04/14 11:20:08 GMT+2 : Agent returned...
{
    error = "The request timed out.";
}

Apr 24, 2014 1:39 AM in response to Linc Davis

Oh! I activated the Software Update and Caching services, that's why there is part of the data that sits on another partition. Service Data says "custom" and the edit button is greyed out unless I activate Push Notifications which is really strange ?


I can repatriate the Service Data to the boot partition if I get rid of the Software Update data (several hundreds of gigabytes) as I don't need that service for the LAN, it was more of a test to see how it performed. However when I switch off Software Update and select "remove" on enabled updates, the data still sits in the external Library/Server/Software Update folder and is counted in the total data that needs to be repatriated to the boot partition. The boot partition is too small for this... Can I delete the external Library/Server/Software Update folder manually or is that not recommended ?


Thanks for the help, it's much appreciated.



@RKD in OOKC : there is next to that plist file a caldavd-apple.plist.default which seems to be a backup of sorts. I compared it to the caldavd-apple.plist file with TextWrangler and it is identical.


PS for the original problem, I found a utility called Lingon in the Mac App Store that only costs a few bucks and helps out greatly for the plist creation process for launchd 🙂

Apr 30, 2014 3:32 AM in response to Linc Davis

Just wanted to post an update.

It seems that in the initial OS X Server installation process, I borked the Service Data.

The boot hard drive was partitioned, and so that was my lesson learnt as there was no need to do that. As I was only just installing, I decided to format and start over from scratch with a single partition to host all data. Setup went much smoother then, and I was back up and running in under 2 hours.


Thank you for the help !

Calendar server problem, "Exited with code 1" in Console.

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