CalDAV/CardDAV client disregards the server port

asked 2017-03-13 12:41:46 +0300

rtr2001 gravatar image

updated 2017-07-19 09:35:09 +0300

jovirkku gravatar image

Hello,

I am testing a bit the CalDAV/CardDAV behaviour with a Baikal server in my network.

Baikal runs in an Apache VHost on port 81 (http://server.ip.addr:81)

On port 80 there's another vhost, with other things running

Despite CALDav server running on http://server.ip.addr:81, server side logs show me that it is poking in the vhost bound at port 80. That is, disregards the port in the address. Obviously, it fails to retrieve anything usefull.

The CALDav server is reacheable on port 81 and behaves ok (Calendar in Thunderbird on a linux machine synced just fine)

I restarted msyncd with debug enabled ( as suggested by @chris.adams in various places here) - but can't spot anything about the actual address in the logs on jolla.

I could not find any similar report here - anyone else have this problem?

Jolla C running SF 2.0.5.6

edit retag flag offensive close delete

Comments

May you check with sqlite3 that your CalDAV account parameters are properly stored ? The account DB is in .config/libaccounts-glib/accounts.db.

  • So connect to it with : sqlite3 .config/libaccounts-glib/accounts.db.
  • Find your CalDAV account internal id by browsing the Accounts table (select * from Accounts;), first column is id.
  • Fetch setting for this id: select * from Settings where account = 39; (assuming your account id is 39.

Check that the server_address field is correct (one example is 'http://192.168.1.34:5232' for instance). If it's correct, well the bug is somewhere else…

Damien Caliste ( 2017-03-13 14:32:27 +0300 )edit

The CardDAV acconut user is 'test1'. There is only one CardDAV account, id = 83. The CardDAV server (baikal) runs in a vhost at srv.home.dmn (local lan), port 81.

select * from Accounts where account = 83;
[...]
3|33|server_address|s|'http://srv.home.dmn:81/'
83|33|sync_profile_templates|as|['carddav.Contacts']

So the server is ok, port 81 included.

Now, when attempting to sync, it seems it connects at port 80, which serves different vhost - disregarding thus the account setup. Removing and recreating the account, reboot, etc - won't change anything.

[D] unknown:0 - Sync running for 83
[D] unknown:0 - identityimpl.cpp 96 updateState Updating state:  "NeedsUpdate" SignOn::IdentityImpl(0x77a2e8)
[D] unknown:0 - identityimpl.cpp 96 updateState Updating state:  "PendingUpdate" SignOn::IdentityImpl(0x77a2e8)
[D] unknown:0 - identityimpl.cpp 442 infoUpdated SERVER INFO UPDATED. NeedsUpdate " 83 "
[D] unknown:0 - Sync adapter initialised, determining remote changes since "" for account 83
[D] unknown:0 - void CardDav::fetchUserInformation() requesting principal urls for user
[D] unknown:0 - generateRequest(): "" QUrl("http://test1@srv.home.dmn/.well-known/carddav") "0" "PROPFIND" "<d:propfind xmlns:d=\"DAV:\"><d:prop><d:current-user-principal /></d:prop></d:propfind>"
[D] unknown:0 - identityimpl.cpp 381 getInfoReply QMap(("ACL", QVariant(QStringList, ()))("AuthMethods", QVariant(QDBusArgument, ))("Caption", QVariant(QString, "Jolla"))("Id", QVariant(uint, 83))("Owner", QVariant(QStringList, ()))("Realms", QVariant(QStringList, ()))("RefCount", QVariant(int, 0))("StoreSecret", QVariant(bool, true))("Type", QVariant(int, 0))("UserName", QVariant(QString, "test1"))("UserNameSecret", QVariant(bool, false))("Validated", QVariant(bool, true)))
[D] unknown:0 - identityimpl.cpp 96 updateState Updating state:  "Ready" SignOn::IdentityImpl(0x77a2e8)
[W] unknown:0 - void CardDav::userInformationResponse() error: QNetworkReply::NetworkError(ContentOperationNotPermittedError) ( 405 ) to request "http://srv.home.dmn/.well-known/carddav"
[D] unknown:0 - "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">"
[D] unknown:0 - "<html><head>"
[D] unknown:0 - "<title>405 Method Not Allowed</title>"
[D] unknown:0 - "</head><body>"
[D] unknown:0 - "<h1>Method Not Allowed</h1>"
[D] unknown:0 - "<p>The requested method PROPFIND is not allowed for the URL /.well-known/carddav.</p>"
[D] unknown:0 - "<hr>"
[D] unknown:0 - "<address>Apache/2.4.10 (Debian) Server at srv.home.dmn Port 80</address>"
[D] unknown:0 - "</body></html>"
[D] unknown:0 - void CardDav::userInformationResponse() got HTTP response 405 to well-known request; trying root URI
[D] unknown:0 - void CardDav::fetchUserInformation() requesting principal urls for user
[D] unknown:0 - generateRequest(): "" QUrl("http://test1@srv.home.dmn/") "0" "PROPFIND" "<d:propfind xmlns:d=\"DAV:\"><d:prop><d:current-user-principal /></d:prop></d:propfind>"
[W] unknown:0 - void CardDav::userInformationResponse() error: QNetworkReply::NetworkError(ContentOperationNotPermittedError) ( 405 ) to request "http://srv.home.dmn/"
[D] unknown:0 - "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">"
[D] unknown:0 - "<html><head>"
[D] unknown:0 - "<title>405 Method Not Allowed</title>"
[D] unknown:0 - "</head><body>"
[D] unknown:0 - "<h1>Method Not Allowed</h1>"
[D] unknown:0 - "<p>The requested method PROPFIND is not allowed for the URL /index.html.</p>"
[D] unknown:0 - "<hr>"
[D] unknown:0 - "<address>Apache/2.4.10 (Debian) Server at srv.home.dmn Port 80</address>"
[D] unknown:0 - "</body></html>"
[W] unknown:0 - CardDAV sync finished with error: 405 purging state data for account: 83
[C] unknown:0 - CardDAV sync failed: 401 ""
[D] unknown:0 - Session finished: "carddav.Contacts-83" , status: 3
[D] unknown:0 - aStatus 3
[D] unknown:0 - ProfileManager::syncProfile( "carddav.Contacts-83" )
[D] unknown:0 - found a valid sync profile with the given name: "carddav.Contacts-83"
[D] unknown:0 - Stopping the OOP process for  "carddav"
[D] unknown:0 - Process  "/usr/lib/buteo-plugins-qt5//oopp/carddav-client"  finished with exit code 15
rtr2001 ( 2017-10-14 00:50:36 +0300 )edit

for information, I have added another account (predictably, test2) - no change.

rtr2001 ( 2017-10-15 01:09:07 +0300 )edit

moved baikal on port 80, it works - sort of: not all contacts are saved, only most recent. I'd like to upload all

rtr2001 ( 2017-10-15 01:46:40 +0300 )edit