Radicale behind Apache



  • Hi,
    I can't make it work with DAVDroid (0.5.13). Error is "can't find principals".
    URL: http://hal.lab/caldav/
    (tried without '/' too)
    Apache handles authentication, then /caldav/ is handled by Radicale. root_prefix is set to /radicale/
    Thunderbird/Lightning works OK
    Can you help ?
    logcat:

    D/dalvikvm( 5206): GC_CONCURRENT freed 502K, 6% free 10016K/10552K, paused 1ms+3ms, total 17ms
    I/davdroid.QueryServerDialogFragment( 5206): onCreateLoader
    D/davdroid.DavHttpClient( 5206): Disabling compression for debugging purposes
    D/davdroid.DavHttpClient( 5206): Logging network traffic for debugging purposes
    D/dalvikvm( 5206): GC_FOR_ALLOC freed 143K, 7% free 9904K/10552K, paused 16ms, total 16ms
    D/dalvikvm( 5206): GC_FOR_ALLOC freed 1K, 6% free 9920K/10552K, paused 13ms, total 13ms
    I/dalvikvm-heap( 5206): Grow heap (frag case) to 9.723MB for 8208-byte allocation
    D/dalvikvm( 5206): GC_FOR_ALLOC freed 0K, 7% free 9928K/10564K, paused 13ms, total 13ms
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 >> "OPTIONS /caldav/ HTTP/1.1[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 >> "Host: hal.lab[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 >> "Connection: Keep-Alive[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 >> "User-Agent: DAVdroid/0.5.13-alpha[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 >> "[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "HTTP/1.1 401 Authorization Required[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "Date: Sun, 01 Jun 2014 00:25:12 GMT[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "Server: Apache/2.2.3 (CentOS)[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "WWW-Authenticate: Basic realm="Radicale Authentication"[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "Content-Length: 473[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "Connection: close[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "Content-Type: text/html; charset=iso-8859-1[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "<html><head>[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "<title>401 Authorization Required</title>[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "</head><body>[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "<h1>Authorization Required</h1>[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "<p>This server could not verify that you[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "are authorized to access the document[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "requested.  Either you supplied the wrong[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "credentials (e.g., bad password), or your[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "browser doesn't understand how to supply[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "the credentials required.</p>[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "<hr>[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "<address>Apache/2.2.3 (CentOS) Server at Hal.Lab Port 80</address>[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "</body></html>[\n]"
    D/class ch.boye.httpclientandroidlib.impl.conn.DefaultManagedHttpClientConnection( 5206): http-outgoing-22: Close connection
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 >> "OPTIONS /caldav/ HTTP/1.1[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 >> "Host: hal.lab[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 >> "Connection: Keep-Alive[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 >> "User-Agent: DAVdroid/0.5.13-alpha[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 >> "Authorization: Basic **removed**\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 >> "[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "HTTP/1.1 200 OK[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "Date: Sun, 01 Jun 2014 00:25:12 GMT[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "Server: Apache/2.2.3 (CentOS)[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "DAV: 1, 2, 3, calendar-access, addressbook, extended-mkcol[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "Allow: DELETE, HEAD, GET, MKCALENDAR, MKCOL, MOVE, OPTIONS, PROPFIND, PROPPATCH, PUT, REPORT[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "Content-Length: 0[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "Connection: close[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "Content-Type: text/plain[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-22 << "[\r][\n]"
    D/class ch.boye.httpclientandroidlib.impl.conn.DefaultManagedHttpClientConnection( 5206): http-outgoing-22: Shutdown connection
    D/class ch.boye.httpclientandroidlib.impl.conn.DefaultManagedHttpClientConnection( 5206): http-outgoing-22: Close connection
    D/dalvikvm( 5206): GC_FOR_ALLOC freed 180K, 6% free 9939K/10564K, paused 13ms, total 13ms
    D/dalvikvm( 5206): GC_FOR_ALLOC freed 0K, 6% free 9947K/10564K, paused 13ms, total 13ms
    I/dalvikvm-heap( 5206): Grow heap (frag case) to 9.750MB for 8208-byte allocation
    D/dalvikvm( 5206): GC_FOR_ALLOC freed <1K, 6% free 9955K/10576K, paused 14ms, total 14ms
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 >> "PROPFIND /caldav/ HTTP/1.1[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 >> "Content-Type: text/xml; charset=UTF-8[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 >> "Depth: 0[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 >> "Content-Length: 88[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 >> "Host: hal.lab[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 >> "Connection: Keep-Alive[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 >> "User-Agent: DAVdroid/0.5.13-alpha[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 >> "Authorization: Basic **removed**[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 >> "[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 >> "<propfind xmlns="DAV:">[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 >> "   <prop>[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 >> "      <current-user-principal/>[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 >> "   </prop>[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 >> "</propfind>"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "HTTP/1.1 207 Unknown[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "Date: Sun, 01 Jun 2014 00:25:13 GMT[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "Server: Apache/2.2.3 (CentOS)[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "DAV: 1, 2, 3, calendar-access, addressbook, extended-mkcol[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "Content-Length: 379[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "Connection: close[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "Content-Type: text/xml[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "[\r][\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "<?xml version="1.0"?>[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "<D:multistatus xmlns:D="DAV:">[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "  <D:response>[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "    <D:href>/caldav/</D:href>[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "    <D:propstat>[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "      <D:prop />[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "      <D:status>HTTP/1.1 200 OK</D:status>[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "    </D:propstat>[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "    <D:propstat>[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "      <D:prop>[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "        <D:current-user-principal />[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "      </D:prop>[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "      <D:status>HTTP/1.1 404 Not Found</D:status>[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "    </D:propstat>[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "  </D:response>[\n]"
    D/ch.boye.httpclientandroidlib.wire( 5206): http-outgoing-23 << "</D:multistatus>[\n]"
    D/dalvikvm( 5206): GC_FOR_ALLOC freed 45K, 6% free 9951K/10576K, paused 15ms, total 15ms
    I/dalvikvm-heap( 5206): Grow heap (frag case) to 9.762MB for 16400-byte allocation
    D/dalvikvm( 5206): GC_FOR_ALLOC freed <1K, 6% free 9967K/10596K, paused 15ms, total 15ms
    D/davdroid.WebDavResource( 5206): Processing multi-status element: http://hal.lab/caldav/
    D/class ch.boye.httpclientandroidlib.impl.conn.DefaultManagedHttpClientConnection( 5206): http-outgoing-23: Shutdown connection
    D/class ch.boye.httpclientandroidlib.impl.conn.DefaultManagedHttpClientConnection( 5206): http-outgoing-23: Close connection
    E/davdroid.ServerInfoLoader( 5206): DAV error while querying server info
    E/davdroid.ServerInfoLoader( 5206): at.bitfire.davdroid.webdav.DavIncapableException: Invalid DAV response: Couldn't determine principal path (RFC 5397)
    E/davdroid.ServerInfoLoader( 5206):     at at.bitfire.davdroid.syncadapter.QueryServerDialogFragment$ServerInfoLoader.loadInBackground(QueryServerDialogFragment.java:139)
    E/davdroid.ServerInfoLoader( 5206):     at at.bitfire.davdroid.syncadapter.QueryServerDialogFragment$ServerInfoLoader.loadInBackground(QueryServerDialogFragment.java:97)
    E/davdroid.ServerInfoLoader( 5206):     at android.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:312)
    E/davdroid.ServerInfoLoader( 5206):     at android.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:69)
    E/davdroid.ServerInfoLoader( 5206):     at android.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:57)
    E/davdroid.ServerInfoLoader( 5206):     at android.os.AsyncTask$2.call(AsyncTask.java:288)
    E/davdroid.ServerInfoLoader( 5206):     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    E/davdroid.ServerInfoLoader( 5206):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    E/davdroid.ServerInfoLoader( 5206):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    E/davdroid.ServerInfoLoader( 5206):     at java.lang.Thread.run(Thread.java:841)
    
    Radicale's log:
    2014-05-31 21:25:12,944 - INFO: OPTIONS request at /caldav// received
    2014-05-31 21:25:12,947 - DEBUG: Request headers:
    {'AUTH_TYPE': 'Basic',
     'DOCUMENT_ROOT': '/var/www/html',
     'GATEWAY_INTERFACE': 'CGI/1.1',
     'HTTP_CONNECTION': 'Keep-Alive',
     'HTTP_HOST': 'hal.lab',
     'HTTP_USER_AGENT': 'DAVdroid/0.5.13-alpha',
     'PATH_INFO': '/caldav//',
     'PATH_TRANSLATED': '/var/www/html/index.html',
     'QUERY_STRING': '',
     'REMOTE_ADDR': '192.168.69.245',
     'REMOTE_PORT': '60701',
     'REMOTE_USER': 'scaprile',
     'REQUEST_METHOD': 'OPTIONS',
     'REQUEST_URI': '/caldav/',
     'SCRIPT_FILENAME': '/usr/share/radicale/radicale.wsgi',
     'SCRIPT_NAME': '/caldav',
     'SERVER_ADDR': '192.168.69.1',
     'SERVER_ADMIN': 'root@localhost',
     'SERVER_NAME': 'Hal.Lab',
     'SERVER_PORT': '80',
     'SERVER_PROTOCOL': 'HTTP/1.1',
     'SERVER_SIGNATURE': '<address>Apache/2.2.3 (CentOS) Server at Hal.Lab Port 80</address>\n',
     'SERVER_SOFTWARE': 'Apache/2.2.3 (CentOS)',
     'mod_wsgi.application_group': '',
     'mod_wsgi.callable_object': 'application',
     'mod_wsgi.handler_script': '',
     'mod_wsgi.input_chunked': '0',
     'mod_wsgi.listener_host': '',
     'mod_wsgi.listener_port': '80',
     'mod_wsgi.process_group': 'radicale',
     'mod_wsgi.request_handler': 'wsgi-script',
     'mod_wsgi.script_reloading': '1',
     'mod_wsgi.version': (3, 3),
     'wsgi.errors': <mod_wsgi.Log object at 0x9399b88>,
     'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0xb7fba608>,
     'wsgi.input': <mod_wsgi.Input object at 0x9399bb0>,
     'wsgi.multiprocess': False,
     'wsgi.multithread': False,
     'wsgi.run_once': False,
     'wsgi.url_scheme': 'http',
     'wsgi.version': (1, 1)}
    2014-05-31 21:25:12,947 - DEBUG: Sanitized path: ///
    2014-05-31 21:25:12,947 - DEBUG: Anonymous has read access to collection /
    2014-05-31 21:25:12,948 - DEBUG: Anonymous has write access to collection /
    2014-05-31 21:25:12,948 - DEBUG: Answer status: 200 OK
    2014-05-31 21:25:13,114 - INFO: PROPFIND request at /caldav// received
    2014-05-31 21:25:13,117 - DEBUG: Request headers:
    {'AUTH_TYPE': 'Basic',
     'CONTENT_LENGTH': '88',
     'CONTENT_TYPE': 'text/xml; charset=UTF-8',
     'DOCUMENT_ROOT': '/var/www/html',
     'GATEWAY_INTERFACE': 'CGI/1.1',
     'HTTP_CONNECTION': 'Keep-Alive',
     'HTTP_DEPTH': '0',
     'HTTP_HOST': 'hal.lab',
     'HTTP_USER_AGENT': 'DAVdroid/0.5.13-alpha',
     'PATH_INFO': '/caldav//',
     'PATH_TRANSLATED': '/var/www/html/index.html',
     'QUERY_STRING': '',
     'REMOTE_ADDR': '192.168.69.245',
     'REMOTE_PORT': '59545',
     'REMOTE_USER': 'scaprile',
     'REQUEST_METHOD': 'PROPFIND',
     'REQUEST_URI': '/caldav/',
     'SCRIPT_FILENAME': '/usr/share/radicale/radicale.wsgi',
     'SCRIPT_NAME': '/caldav',
     'SERVER_ADDR': '192.168.69.1',
     'SERVER_ADMIN': 'root@localhost',
     'SERVER_NAME': 'Hal.Lab',
     'SERVER_PORT': '80',
     'SERVER_PROTOCOL': 'HTTP/1.1',
     'SERVER_SIGNATURE': '<address>Apache/2.2.3 (CentOS) Server at Hal.Lab Port 80</address>\n',
     'SERVER_SOFTWARE': 'Apache/2.2.3 (CentOS)',
     'mod_wsgi.application_group': '',
     'mod_wsgi.callable_object': 'application',
     'mod_wsgi.handler_script': '',
     'mod_wsgi.input_chunked': '0',
     'mod_wsgi.listener_host': '',
     'mod_wsgi.listener_port': '80',
     'mod_wsgi.process_group': 'radicale',
     'mod_wsgi.request_handler': 'wsgi-script',
     'mod_wsgi.script_reloading': '1',
     'mod_wsgi.version': (3, 3),
     'wsgi.errors': <mod_wsgi.Log object at 0x9399bb0>,
     'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0xb7fba608>,
     'wsgi.input': <mod_wsgi.Input object at 0x9399b88>,
     'wsgi.multiprocess': False,
     'wsgi.multithread': False,
     'wsgi.run_once': False,
     'wsgi.url_scheme': 'http',
     'wsgi.version': (1, 1)}
    2014-05-31 21:25:13,118 - DEBUG: Sanitized path: ///
    2014-05-31 21:25:13,119 - DEBUG: Request content:
    <propfind xmlns="DAV:">
       <prop>
          <current-user-principal/>
       </prop>
    </propfind>
    2014-05-31 21:25:13,119 - DEBUG: Anonymous has read access to collection /
    2014-05-31 21:25:13,119 - DEBUG: Anonymous has write access to collection /
    2014-05-31 21:25:13,123 - DEBUG: Response content:
    <?xml version="1.0"?>
    <D:multistatus xmlns:D="DAV:">
      <D:response>
        <D:href>/caldav/</D:href>
        <D:propstat>
          <D:prop />
          <D:status>HTTP/1.1 200 OK</D:status>
        </D:propstat>
        <D:propstat>
          <D:prop>
            <D:current-user-principal />
          </D:prop>
          <D:status>HTTP/1.1 404 Not Found</D:status>
        </D:propstat>
      </D:response>
    </D:multistatus>
    
    2014-05-31 21:25:13,124 - DEBUG: Answer status: 207 Unknown
    

  • developer

    Probably there's an error in your server configuration. Did you set base_prefix correctly in your Radicale configuration?

    PS Please enquote logs with three backticks (```).



  • Yes, did I say root_prefix ? I meant base_prefix:

    # Root URL of Radicale (starting and ending with a slash)
    base_prefix = /caldav/
    

    BTW, my radicale version is 0.8
    Thunderbird/Lightning is not asking for /caldav/ but /caldav/myusername/mycalendarfile.ics/, so it doesn't play with RFC5397 (and it works)
    I can't see anything in the logs, do you ?



  • SOLVED!
    This requires new fixes in git master branch, it is not available on today's latest stable release (0.8).
    Besides this, I also had a URL rewriting issue in the wsgi script that fires Radicale.
    The proper URL is hostname/path/username/
    In case someone else is looking for help to solve this:
    https://github.com/Kozea/Radicale/issues/165
    Thanks


  • developer

    Ok, thanks, so I'm closing this now :)


Log in to reply
 

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.