[kronolith] Kronolith 3.0.9 : Remote calendar : error davical

Jan Schneider jan at horde.org
Wed Nov 30 10:19:27 UTC 2011


Zitat von Gerard Breiner <gerard.breiner at ias.u-psud.fr>:

> Le 15/09/2011 14:30, Jan Schneider a écrit :
>>
>> Zitat von Gerard Breiner <gerard.breiner at ias.u-psud.fr>:
>>
>>> Le 14/09/2011 13:06, Jan Schneider a écrit :
>>>>
>>>> Zitat von Gerard Breiner <gerard.breiner at ias.u-psud.fr>:
>>>>
>>>>> Le 14/09/2011 11:24, Jan Schneider a écrit :
>>>>>>
>>>>>> Zitat von Gerard Breiner <gerard.breiner at ias.u-psud.fr>:
>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> I use kronolith 3.0.9 under horde 4.0.8. My server caldav is  
>>>>>>> davical version 0.9.9.3 . I created a remote calendar toward  
>>>>>>> my server davical  
>>>>>>> (https://calendar.domain/caldav.php/username/agenda). When  I  
>>>>>>> try to add an event from kronolith (client) to davical  
>>>>>>> (server) I get the error
>>>>>>> "The event could not be added to the remote server".
>>>>>>>
>>>>>>> The davical's logs says the content type is incorrect... It  
>>>>>>> seems that expect to have xml content but is not.
>>>>>>> Does caldav is full supported by kronolith 3.0.9 ?
>>>>>>
>>>>>> Yes.
>>>>>>
>>>>>>> Any help would be appreciated.
>>>>>>>
>>>>>>> Thanks in advance
>>>>>>>
>>>>>>> Gerard Breiner
>>>>>>>
>>>>>>> [LOGS]
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: NOTICE:Unusual content-type of "(null)" and first word of  
>>>>>>> content is ""
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: :***************** Response Header ****************
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: headers:-->X-Powered-By: PHP/5.3.3-7+squeeze1
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: headers:-->Server: 0.9
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: headers:-->DAV: 1, 2, 3, access-control, calendar-access,  
>>>>>>> calendar-schedule
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: headers:-->DAV: extended-mkcol, calendar-proxy, bind,  
>>>>>>> addressbook
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: headers:-->X-DAViCal-Version: DAViCal/0.9.9; DB/1.2.9
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: headers:-->Content-type: text/xml; charset="utf-8"
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: :******************** Response ********************
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: response:--><?xml version="1.0" encoding="utf-8" ?>
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: response:--><error xmlns="DAV:">
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: response:-->  
>>>>>>> <urn:ietf:params:xml:ns:caldav:supported-calendar-data/>Incorrect  
>>>>>>> content type for calendar:
>>>>>>> [Mon Sep 12 11:21:32 2011] [error] [client x.x.x.x] DAViCal:  
>>>>>>> LOG: response:--></error>
>>>>>>> [LOGS]
>>>>>>
>>>>>> If possible, try to trace the communication between Kronolith  
>>>>>> and DAViCal.
>>>>> By using firebug ?
>>>>
>>>> No, Firebug only traces the communication between the browser and  
>>>> Kronolith. Use something like wireshark.
>>>>
>>>>>> Jan.
>>>>>>
>>>>>
>>>>> However, I've just made a try and the good news is it works very  
>>>>> fine IF I comment in kronolith/lib/Driver/Ical.php the lines :
>>>>>
>>>>> [CODE]
>>>>> 435          if (!in_array($response->code, array(200, 201, 204))) {
>>>>> 436             Horde::logMessage(sprintf('Failed to create  
>>>>> event on remote calendar: url = "%s", status = %s',
>>>>> 437                                       $url,  
>>>>> $response->code), 'INFO');
>>>>> 438             throw new Kronolith_Exception(_("The event could  
>>>>> not be added to the remote server."));
>>>>> 439
>>>>> [CODE]
>>>>
>>>> If commenting this out worked, you have a log entry in the horde  
>>>> log that you didn't mention.
>>>>
>>> Here is :
>>> INFO: HORDE4 [kronolith] Failed to create event on remote  
>>> calendar: url = "", status = 412 [pid 16916 on line 437 of  
>>> "/www/horde4/kronolith/lib/Driver/Ical.php"]
>>
>> Response status 412 means that a precondition failed while PUTing  
>> the event on the server. Unfortunately we don't read the  
>> precondition error message yet. Can you check if davical logs some  
>> error message?
>>
>> Jan.
>>
>
> Hello Jan
>
> I've kept on working  about the "add event" that can't be added from
> kronolith to davical.
> So, I've used tshark for checking whether kronolith was actually
> sending the PUT data.  I precise that kronolith and davical are located on
> the same server and their web interfaces are accessible by
> virtualhosts. So, I made tshark to listen on the server himself like this .
>
>  tshark -n -i 3 -V -z conv,udp,ip.addr==x.x.x.x src host x.x.x.x >  
> /tmp/tshark.txt
>
> give :
> ---------------------------------------------------------
> PUT  
> /caldav.php/gbreiner/calendar/4ed4fd72-c7b4-4c55-8632-6ad781af450f.ics  
> HTTP/1.1\r\n
>         [Expert Info (Chat/Sequence): PUT  
> /caldav.php/gbreiner/calendar/4ed4fd72-c7b4-4c55-8632-6ad781af450f.ics  
> HTTP/1.1\r\n]
>             [Message: PUT  
> /caldav.php/gbreiner/calendar/4ed4fd72-c7b4-4c55-8632-6ad781af450f.ics  
> HTTP/1.1\r\n]
>             [Severity level: Chat]
>             [Group: Sequence]
>         Request Method: PUT
>         Request URI:  
> /caldav.php/gbreiner/calendar/4ed4fd72-c7b4-4c55-8632-6ad781af450f.ics
>         Request Version: HTTP/1.1
>     Authorization: Basic Z2JyZWluZXI6JGFuYWlzJA==
>         Credentials: <mylogin>:<mypassword>
>     User-Agent: PECL::HTTP/1.7.1 (PHP/5.3.3-7+squeeze3)
>     Host: davicalserver.mydomain.fr
>     Accept: */*
>     Content-Type: text/calendar
>     Content-Length: 0
>         [Content length: 0]
> --------------------------------------------------------------
> My question is : An idea why the content-Length is 0 ? I guess it is  
> why I can't add the event...

No idea, this header is added by the HTTP extension (in your case).

> However the data calendar that I try to add to davical server are :

And are you sure that this data is sent with the PUT request? If yes,  
then your HTTP extension is broken.

> -------------------------------------
> BEGIN:VCALENDAR
> VERSION:2.0
> X-WR-CALNAME:Calendar of gerard breiner
> PRODID:-//The Horde Project//Horde iCalendar Library//EN
> METHOD:PUBLISH
> BEGIN:VEVENT
> DTSTART;VALUE=DATE:20111130
> DTEND;VALUE=DATE:20111130
> X-FUNAMBOL-ALLDAY:1
> DTSTAMP:20111129T145536Z
> UID:20111129155523.eVDkMKLWZNpO1PJbuVvGJuA at webmail1.ias.u-psud.fr
> CREATED:20111129T145523Z
> LAST-MODIFIED:20111129T145523Z
> SUMMARY:TITLE
> DESCRIPTION:DESCRIPTION
> LOCATION:PLACE
> CLASS:PUBLIC
> STATUS:CONFIRMED
> TRANSP:OPAQUE
> END:VEVENT
> END:VCALENDAR
> --------------------------------------------------
>
> Thanks in advance.
>
> Best regards.
>
> Gerard Breiner
> -- 
> Kronolith mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: kronolith-unsubscribe at lists.horde.org


Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the kronolith mailing list