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

Recurring CalDAV login issues with iPhones and SLS (10.6 Server)

I have 10.6.4 Snow Leopard Server running on a Mac Mini and am having intermittent problems with various iPhones logging into CalDAV calendars. The iPhones are a 3G running iOS 3.1.3 and a 3GS running iOS 4.1.

iCal server works perfectly, with Push, on desktop clients.

The iPhones do work occasionally. Push is still not possible (AFAIK) but 15 minute fetch interval is acceptable for now (when is push coming to iPhones btw?). However, a few times per week, sometimes as many as 5 times in a single day, the iPhone will report "Password Incorrect." This happens on its on, presumably after one of the fetch intervals. Re-entering the password usually works, and is stored correctly for hours or days, but eventually it happens again. Sometimes password is accepted after re-entry but sync will silently stop working, which is even worse than the error popping up.

Each iPhone has 3 CalDAV accounts, one of which is a delegate, one of which is shared by all. The password issue happens with all of them, but far more often with the shared account. The password incorrect prompt does NOT always happen with all of them at once, sometimes just one of the accounts will throw the login error and the others will work for a while.

On the server, iCal has Authentication set to "any method", port 8008 and SSL on, Port 8443

The iPhones connect to CalDAV with SSL on port 8443 using "server" set to server.companyname.com

I have deleted the Calendar accounts on the phones repeatedly, hardware reset the phones, deleted all data and set up accounts again. This fixes the problem for a few days but then it comes back.

I don't see much in the iCal server logs, but I might not know what to look for. What should I look for or try next?

Thanks for any help.

Mac Mini 2Ghz Intel Core 2 Duo, 4GB RAM, Mac OS X (10.6.4)

Posted on Oct 13, 2010 12:58 PM

Reply
151 replies

May 11, 2011 9:36 PM in response to Bob_Hamburg

Here is a workaround that works pretty well for me using Mac mini SLS, two iPhones and an iPad. 🙂


I encountered the password prompt only once over the past two weeks and almost daily before the following changes in web settings:


1. Server-Admin, Web, Einstellungen, Allgemein, "Zeitlimit für Verbindungen:" was 15 is now 600 seconds. My English translation (it is the second entry on the page): Server-Admin, Web, settings, general, "timelimit for connections:" was 15 is now 150 seconds.


2. Server-Admin, Web, Einstellungen, Allgemein, "Dauerhafte Verbindung trennen nach:" was 15 is now 600 seconds. My English translation (it is the last entry on the page): Server-Admin, Web, settings, general, "disconnect permanent connection after:" was 15 is now 150 seconds.


Does ist work for you?

May 12, 2011 4:01 AM in response to CasperF

I've made this change as well, setting both to 600. I think it's obvious this is not a solution, but perhaps a way to avoid the bug almost entirely. I have already cut down the problem for many of my users though it still happens for all of them, if this further decreases the frequency that would be great. I still feel like this bug is on the iOS side and will require an update there. It's also possible that the bug is perfect storm created by an issue on both platforms hence the difficultly with finally squashing it. I'd love to hear from the people that claim they fixed the bug earlier in the thread by changing authentication to basic, I've done that and it merely reduced the frequency, but the bug is still ever present. Thanks for the info Bob & Casper, fingers crossed as usual.

May 23, 2011 6:33 AM in response to e.f.

i have the same problem with recurring login issues with my iphone4 (firmware 4.3.1) and apple calendarserver 3 (calDAV/cardDAV). My iOS Device asks me after different times for password and i have to reenter it again.


Please fix this bug apple.

I have saved the correct password and the iphone never had to ask again for it.


If i press cancel, my calendar-tasks will not updated.

May 23, 2011 11:48 AM in response to e.f.

According to someone close to Apple the issue should have been addressed with the iOS 4.3.3 update. Could somebody who didn’t modify the /etc/caldavd/caldavd.plist file check if this is actually the case?


To reiterate, turning on Basic authentication and disabling Digest authentication in the configuration file helped to avoid the recurring authentication dialogs on iOS devices. This workaround was only recommended to admins that already secure CalDAV traffic by making a SSL connection mandatory.


So can somebody confirm that a device running iOS 4.3.3 no longer shows the authentication dialog for the CalDAV service unless the password is actually wrong?

May 23, 2011 4:25 PM in response to grundhunden

I'm really sorry to report that I've been running iOS 4.3.3 since it's been out and I still get CalDAV requests for password authentication sometimes multiple times a day. I've not altered my caldavd.plist.


I also have iCal Server set to Use SSL with Any Method set for type, Choices are "Digest, Kerberos, Any Method" still getting lots of these requests.

May 25, 2011 1:40 PM in response to e.f.

I may have found a solution and recognized the problem. Like most of us I'm running Snow Leopard Server and have iCal Server running using SSL connections. My certificate is self-signed, like I imagine most of our's are. Recently I remembered seeing some post, somewhere, on installing certificates on the iPhone. On a hunch, I installed the certificate I use for my FQDN for web services on my iPhone. It's been about 2 days now and I haven't seen a single authentication dialog and calendars are working.


To install a certificate on your iOS device you need to email it to yourself as an attachment. Click on the attachment and it will as if you want to install. It installs as "Not Trusted" and I don't see any method to make it trusted. You will see the certificate as a Profile under Settings > General > Profiles.


To get at the certificate.cer file, I dragged it out of Keychain Access on my desktop and then emailed it to myself.


I don't know if this is a real solution, but so far it's working here. I hope more people will be able to demonstrate whether it's effective or not.

May 26, 2011 6:38 AM in response to Andy Fragen

no, it has nothing to do with self-signed certificates.

i have installed an correct certificate and get the same problem.


i think that the problem is the following:

- ios want to connect and authenticate with caldav/carddav-server

- the connection crashed because of an timeout (ios device has not stable data connection or server has high load)

- ios device thinks now that the authentication has failed and discards the password

- ios device asks for new correct password



i think apple has to fix something in the authentication routine

May 28, 2011 2:40 AM in response to Adrian Nier

I tried what Adrian had suggested.


I edited the /etc/caldavd/caldavd.plist


Setting Basic to true and Digest to false.


<key>Basic</key>

<dict>

<key>Enabled</key>

<true/>

</dict>

<key>Digest</key>

<dict>

<key>Algorithm</key>

<string>md5</string>

<key>Enabled</key>

<false/>

<key>Qop</key>

<string></string>

</dict>


Then I restarted the iCal Server and have tested it with multiple iPhone & iPad (running 4.3.3) using an SSL connection.

I have not gotten an authentication dialog in days. *yippee*


Hope it keeps on working and it also works for you guys as well.

Recurring CalDAV login issues with iPhones and SLS (10.6 Server)

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