CalDAV and iCal terminates with HTTP 500

Best practice information from Scalix users relating to integration of Scalix with other products.

Moderator: ScalixSupport

agu
Posts: 12
Joined: Thu Feb 26, 2009 4:26 pm

CalDAV and iCal terminates with HTTP 500

Postby agu » Thu Feb 26, 2009 4:35 pm

Hi,

I'm using Scalix 11.4.3.11863 with iCal. First it worked but since yesterday I'm getting an error "popup" in Apples iCal when syncing my account, and nothing works anymore. The calendar works in the web interface and in Sunbird however it gives there an exclamation mark (colleagues told they have that on working sunbird/lightning as well).

The Error Report is:
Request Error
Request for account "my account name" failed.

The server responded with
"HTTP/1.1 500 Internal Server Error"
to operation CalDAVAccountRefreshQueueableOperation

Any ideas hints are appreciated.

Andreas

Valerion
Scalix Star
Scalix Star
Posts: 2730
Joined: Thu Feb 26, 2004 7:40 am
Location: Johannesburg, South Africa
Contact:

Postby Valerion » Fri Feb 27, 2009 1:26 am

Mmmm .. I've visited a client yesterday with the same issue on Scalix 11.4.2 and 11.4.3. Haven't check the logs yet, though.

I suspect offhand that this is a specific appointment that either get presented incorrectly by Scalix CalDAV, or not properly understood by iCal. The logs in the tomcat directory may tell you which appointment is to blame, though.

agu
Posts: 12
Joined: Thu Feb 26, 2009 4:26 pm

Postby agu » Fri Feb 27, 2009 7:42 am

Hi,

I was searching for the tomcat logs but did not find them - could you give me a hint where to look for them or the config file where the location is defined.

Thanks

Valerion
Scalix Star
Scalix Star
Posts: 2730
Joined: Thu Feb 26, 2004 7:40 am
Location: Johannesburg, South Africa
Contact:

Postby Valerion » Fri Feb 27, 2009 8:55 am

/var/opt/scalix/??/tomcat/logs

Most likely the platform ones, but I suggest you dig through all of them, in case.

agu
Posts: 12
Joined: Thu Feb 26, 2009 4:26 pm

Postby agu » Fri Feb 27, 2009 9:14 am

Hi,
thanks for the hint.
I found the logs, but nothing happened in any of them during the time when I tried accessing Scalix CalDAV via iCal - no entry at all appeared when I performed my tests.

I checked all logs in tomcat/logs especially:
scalix-api.log (Here are exceptions in there but some hours old)
scalix-swa.log
scalix-caa.log
scalix-sis-indexer.log

I also tried accessing it with an iPhone App (RemoteCal) which fails for my account only as well - nothing in the logs...

Hmm, I'm kind of helpless - I do not want to delete my complete calendar and then have the same thing happen in two weeks again.

florian
Scalix
Scalix
Posts: 3852
Joined: Fri Dec 24, 2004 8:16 am
Location: Frankfurt, Germany
Contact:

Postby florian » Sat Feb 28, 2009 10:46 am

Can you try to delete/re-add the account from your iCal and see if this helps?

I haven't had any issues with my own iCal use in a long while. Have you applied all of Apple's system upgrades? iCal has been improved quite a bit over the various OS/X 10.5.x service releases.

RemoteCal on the iPhone doesn't currently work with Scalix; I've tried it myself and I believe it is thought to be caused by the not-very-standards-compliant CalDAV implementation of this client, which has only been field-tested against Apple's calendar server.

I've pointed one of our CalDAV developers to this thread; they are pretty busy with stuff, but maybe he's got an idea.

Florian
Florian von Kurnatowski, Die Harder!

gren
Scalix
Scalix
Posts: 264
Joined: Thu Mar 25, 2004 10:27 am
Contact:

Postby gren » Sat Feb 28, 2009 11:40 am

How did you configure iCal.app for Scalix?

I'd just like to confirm this as I believe it is quite easy to configure it incorrectly - especially if you try to configure it using the same URL as for Lightning/Sunbird. Lightning/Sunbird configure for using one calendar at a time (using the URL unique to a calendar) whereas iCal.app configures using your Principal URL so that it can discover all your calendars.

The correct way is similar to :
Select the iCal menu, then select "Accounts", then hit + to add an account.
Give your account a description, then enter the user name you use to login for Scalix Mail and your Scalix password.
Click the Arrow next to "Server Options" and enter your Principal URL in the Account URL box. This will be similar to :
http://mail.example.com/api/dav/Principals/eg.user@example.com
where you replace eg.user@example.com with your internet address and mail.example.com with the name of your Scalix CalDAV server. (You might use https instead of http)
It is useful to try the exact same string in a browser to make sure it is recognised - you should be asked for your username and password.

If this is all correct and you have another problem, you can increase the level of logging on the server.
In the file :

Code: Select all

/var/opt/scalix/??/platform/log4j.properties


Take a copy first, in case of mistakes and, for performance and disk space reasons, you will probably want to revert the change after diagnosing the problem cause.
Change all instances of the string "=WARN" to "=DEBUG"
Similarly change "=ERROR" to "=DEBUG"
You should end up with a lot of lines with DEBUG specified!

Restart scalix-tomcat

After that, a lot more details should appear in the files :

Code: Select all

/var/opt/scalix/??/tomcat/logs/scalix-api.log
/var/opt/scalix/??/tomcat/logs/scalix-api-activity.log

Sometimes, things will be written to :

Code: Select all

 /var/opt/scalix/??tomcat/logs/catalina.out

when problems happen, but hopefully that is rare.

You can also tackle things from the client end by enabling logging the CalDAV protocol network traffic from iCal.app to the console. To do this, in a terminal enter :

Code: Select all

defaults write com.apple.iCal LogHTTPActivity yes

Then restart iCal.app
You can then use the Apple "Console" application to see the logging.

Hope this helps,

Regards,
Gren

agu
Posts: 12
Joined: Thu Feb 26, 2009 4:26 pm

Postby agu » Mon Mar 02, 2009 8:56 am

Thanks a lot - that helped me solve my problem!

The actual issue was a faulty calendar entry, for whatever reason. In iCal after turning the logging on I got the following exception:

Code: Select all

500 InternalServerError

java.net.URISyntaxException: Illegal character in path at index 63: /api/dav/Calendars/Users/myname@mycompany.com/Calendar/{1B4FECF3-216A-44C8-86FA-764082B2861D}.ics

java.lang.RuntimeException: java.net.URISyntaxException: Illegal character in path at index 63: /api/dav/Calendars/Users/myname@mycompany.com/Calendar/{1B4FECF3-216A-44C8-86FA-764082B2861D}.ics
 at com.scalix.api.dav.Href.parseEncodedStringIntoUri(Href.java:274)
 at com.scalix.api.dav.Href.equivUri(Href.java:363)
 at com.scalix.api.dav.Href.<init>(Href.java:49)


After logging into caldav web frontend I found the real name "MyMeeting" of the problematic entry (the ics files are listed there).
After that I deleted it in SWA and in iCal.

Voila it worked again after restarting iCal :-)
By the way I'm using a iPhone CalDAV App RemoteCal which works now as well :-)

florian
Scalix
Scalix
Posts: 3852
Joined: Fri Dec 24, 2004 8:16 am
Location: Frankfurt, Germany
Contact:

Postby florian » Mon Mar 02, 2009 8:58 am

are you using small business or enterprise edition of Scalix? If so, you would have a copy of the corrupted meeting in your recovery folder. I would be interested in us getting our hands on a server-exported copy of this thing, so that we can analyze where the corruption originate and can possibly make the software more resilient.

Tx,
Florian
Florian von Kurnatowski, Die Harder!

agu
Posts: 12
Joined: Thu Feb 26, 2009 4:26 pm

Postby agu » Tue Mar 03, 2009 3:32 am

Sure. How can I provide that file to you?

gren
Scalix
Scalix
Posts: 264
Joined: Thu Mar 25, 2004 10:27 am
Contact:

Postby gren » Tue Mar 03, 2009 5:45 am

Hi Andreas,

As a separate question. Do you know how the item was created? The last part of the URL assigned to an item is either taken from the direct reference of a message - if it wasn't created by a CalDAV client, otherwise it is chosen by the client - which appears to be the case here. However, I haven't seen that form of filename from iCal.app or Lightning.

I will look into the code and see if we can improve the handling of malformed URLs chosen by the client (or improve our validation if that is what is at fault!)

Regards,
Gren.

florian
Scalix
Scalix
Posts: 3852
Joined: Fri Dec 24, 2004 8:16 am
Location: Frankfurt, Germany
Contact:

Postby florian » Tue Mar 03, 2009 5:49 am

my email address is pretty well known... firstname@company.com (fill in the real stuff), if not, PM me here with your email and we should arrange.

Tx,
Florian
Florian von Kurnatowski, Die Harder!

agu
Posts: 12
Joined: Thu Feb 26, 2009 4:26 pm

Postby agu » Tue Mar 03, 2009 10:11 am

@gren:The item was created with Microsoft Outlook and accepted in iCal.

@florian: we restored the calendar entry but the problematic curly braces were not there anymore - don't ask me why.
The Id of the ics file is also different.

gren
Scalix
Scalix
Posts: 264
Joined: Thu Mar 25, 2004 10:27 am
Contact:

Postby gren » Tue Mar 03, 2009 10:18 am

Hi Andreas,

Thanks for the reply. I'm a bit bemused but will look out for similar things in the future.

Regards,
Gren.

agu
Posts: 12
Joined: Thu Feb 26, 2009 4:26 pm

Postby agu » Mon Mar 09, 2009 6:27 am

It happend again :(

I got an invitation from an outlook/exchange user. The entry itself does not have any issues - everything looks ok to me (I will forward the ics file to florian by mai).

The problem is that the entry in CalDAV has a "wrong" name.
Calendars/Users/myname@mycomany.com/Calendar/{CA4C6C66-440C-49B1-9789-7A8A7EFEFFC6}.ics

Again it displays correctly within Scalix (meaning web interface) but I can not access it from iCal (HTTP 500) nor my iPhone.

I will now delete the entry and ask the exchange/outlook user to send me the invitation again.


Return to “Third Party Integration”



Who is online

Users browsing this forum: No registered users and 0 guests