Baikal "doesn't provide required carddav service"



  • I am using DAVx5 2.5.5-gplay with Baikal 0.6.0, installed using this Docker container behind a Traefik 1.7.6 reverse proxy. When I try to add https://dav.namandixit.net/dav.php/ with proper user credentials, it gives an error saying “Couldn’t find CalDAV or CardDAV service”, with the log saying

    2019-10-19 02:07:15 2311 [ui.setup.DavResourceFinder] https://dav.namandixit.net/dav.php/principals/naman/ doesn't provide required carddav service
    

    Here is the log file when the login fails: davx5-info.txt

    I have been trying all permutations of configurations that I can figure out, and nothing seems to work. Can someone please help?


  • developer

    Hi,

    DAVx⁵ checks /dav.php/principals/naman/ for CalDAV/CardDAV:

    2019-10-19 02:07:15 2311 [HttpClient] --> OPTIONS https://dav.namandixit.net/dav.php/principals/naman/
    2019-10-19 02:07:15 2311 [HttpClient] --> END OPTIONS
    2019-10-19 02:07:15 2311 [HttpClient] <-- 204 https://dav.namandixit.net/dav.php/principals/naman/ (67ms)
    2019-10-19 02:07:15 2311 [HttpClient] access-control-allow-headers: User-Agent,Authorization,Content-type,Depth,If-match,If-None-Match,Lock-Token,Timeout,Destination,Overwrite,Prefer,X-client,X-Requested-With
    2019-10-19 02:07:15 2311 [HttpClient] access-control-allow-methods: GET, POST, OPTIONS, PROPFIND, PROPPATCH, REPORT, PUT, MOVE, DELETE, LOCK, UNLOCK
    2019-10-19 02:07:15 2311 [HttpClient] access-control-allow-origin: *
    2019-10-19 02:07:15 2311 [HttpClient] access-control-expose-headers: Etag,Preference-Applied
    2019-10-19 02:07:15 2311 [HttpClient] access-control-max-age: 1728000
    2019-10-19 02:07:15 2311 [HttpClient] content-type: text/plain; charset=utf-8
    2019-10-19 02:07:15 2311 [HttpClient] date: Fri, 18 Oct 2019 20:37:15 GMT
    2019-10-19 02:07:15 2311 [HttpClient] server: nginx/1.17.3
    2019-10-19 02:07:15 2311 [HttpClient] content-length: 0
    2019-10-19 02:07:15 2311 [HttpClient] <-- END HTTP (0-byte body)
    

    and expects DAV: calendar-access for CalDAV or DAV: addressbook for CardDAV: https://gitlab.com/bitfireAT/davx5-ose/blob/cd9518c6194752d172d06f2bb12e2ec802419f2a/app/src/main/java/at/bitfire/davdroid/ui/setup/DavResourceFinder.kt#L296

    In your case, those headers are not sent for /dav.php/principals/naman/, so DAVx⁵ wont’t detect/use that URL. (Note that your server sends the correct headers for /dav.php/, but that’s not enough.) Normally, Baïkal sends those headers correctly.

    Does that help?



  • @rfc2822 I see, thank you for the help. Do you know why this might be happening, or where should I look into for debugging this?


  • developer

    @naman-dixit I guess it’s related to your proxy configuration. Can you access the server and maybe try curl -vX OPTIONS https://dav.namandixit.net/dav.php/principals/naman/ directly?



  • @rfc2822 Sure, here is the output of curl -vX OPTIONS http://dav.namandixit.net/dav.php/principals/naman/

    *   Trying 139.59.36.199:80...
    * TCP_NODELAY set
    * Connected to dav.namandixit.net (139.59.36.199) port 80 (#0)
    > OPTIONS /dav.php/principals/naman/ HTTP/1.1
    > Host: dav.namandixit.net
    > User-Agent: curl/7.65.3
    > Accept: */*
    > 
    * Mark bundle as not supporting multiuse
    < HTTP/1.1 204 No Content
    < Access-Control-Allow-Headers: User-Agent,Authorization,Content-type,Depth,If-match,If-None-Match,Lock-Token,Timeout,Destination,Overwrite,Prefer,X-client,X-Requested-With
    < Access-Control-Allow-Methods: GET, POST, OPTIONS, PROPFIND, PROPPATCH, REPORT, PUT, MOVE, DELETE, LOCK, UNLOCK
    < Access-Control-Allow-Origin: *
    < Access-Control-Expose-Headers: Etag,Preference-Applied
    < Access-Control-Max-Age: 1728000
    < Content-Type: text/plain; charset=utf-8
    < Date: Sun, 20 Oct 2019 12:24:23 GMT
    < Server: nginx/1.17.3
    < X-Cache: MISS from nm11.iitb.ac.in
    < X-Cache-Lookup: MISS from nm11.iitb.ac.in:80
    < Via: 1.1 nm11.iitb.ac.in (squid/3.3.9)
    < Connection: close
    < 
    * Closing connection 0
    

    I really appreciate you trying to help me, I am at my wit’s ends here.


  • developer

    @naman-dixit Ok, so curl gets the same result as DAVx⁵. Can you do this command from inside the container, to bypass the proxy? For some reason, the DAV header is omitted in the response.



  • @rfc2822 I replaced “baikal:nginx” docker image with “baikal:0.6.0-apache”, and it now seems to work. I am way too fed up to debug what is wrong with the nginx config, but I am documenting this here in case someone hits the same issue. The apache image is quite a way bigger in size, but at least it works.


  • developer

    Thanks for the update!



Similar topics

  • 1
  • 3
  • 10