Kozea / Radicale

A simple CalDAV (calendar) and CardDAV (contact) server.
https://radicale.org
GNU General Public License v3.0
3.36k stars 437 forks source link

question about: WARNING message "Client provided invalid sync token" #1341

Closed mbohun closed 11 months ago

mbohun commented 11 months ago

After using Radicale v3 for the last apx. 6 months (address-book and calendar), it "suddenly" (for the last 3-4 weeks) started showing this WARNING message (i haven't seen before):

mbohun@mamlas:~> python3 -m radicale --storage-filesystem-folder=~/.var/lib/radicale/collections

[2023-11-22 17:50:07 +1100] [11185/Thread-1852 (process_request_thread)] [WARNING] Client provided invalid sync token 'http://radicale.org/ns/sync/3b2261e960481e2977dc4074709ce665bacc7578fbb0973d9e99ac384293b572': Token not found: 'http://radicale.org/ns/sync/3b2261e960481e2977dc4074709ce665bacc7578fbb0973d9e99ac384293b572'
[2023-11-22 18:20:07 +1100] [11185/Thread-1881 (process_request_thread)] [WARNING] Client provided invalid sync token 'http://radicale.org/ns/sync/3b2261e960481e2977dc4074709ce665bacc7578fbb0973d9e99ac384293b572': Token not found: 'http://radicale.org/ns/sync/3b2261e960481e2977dc4074709ce665bacc7578fbb0973d9e99ac384293b572'
[2023-11-22 18:50:07 +1100] [11185/Thread-1909 (process_request_thread)] [WARNING] Client provided invalid sync token 'http://radicale.org/ns/sync/3b2261e960481e2977dc4074709ce665bacc7578fbb0973d9e99ac384293b572': Token not found: 'http://radicale.org/ns/sync/3b2261e960481e2977dc4074709ce665bacc7578fbb0973d9e99ac384293b572'
...

This is on openSUSE Tumbleweed running Python 3.11.5.

mbohun@mamlas:~> neofetch
                                     ......            mbohun@mamlas
     .,cdxxxoc,.               .:kKMMMNWMMMNk:.        -------------
    cKMMN0OOOKWMMXo. A        ;0MWk:'      ':OMMk.     OS: openSUSE Tumbleweed x86_64
  ;WMK;'       'lKMMNM,     :NMK'             'OMW;    Host: GF75 Thin 9RCX REV:1.0
 cMW;             WMMMN   ,XMK'                 oMM.   Kernel: 6.6.1-1-default
.MMc             ''^*~l. xMN:                    KM0   Uptime: 3 days, 22 hours, 31 mins
'MM.                   .NMO                      oMM   Packages: 6067 (rpm), 37 (flatpak)
.MM,                 .kMMl                       xMN   Shell: bash 5.2.21
 KM0               .kMM0' .dl>~,.               .WMd   Resolution: 1920x1080, 1920x1080
 'XM0.           ,OMMK'    OMMM7'              .XMK    DE: GNOME 45.1
   *WMO:.    .;xNMMk'       NNNMKl.          .xWMx     WM: Mutter
     ^ONMMNXMMMKx;          V  'xNMWKkxllox0NMWk'      WM Theme: Adwaita
         '''''                    ':dOOXXKOxl'         Theme: Adwaita [GTK2/3]
                                                       Icons: Adwaita [GTK2/3]
                                                       Terminal: tmux
                                                       CPU: Intel i5-9300H (8) @ 4.100GHz
                                                       GPU: NVIDIA GeForce GTX 1050 Ti Max-Q
                                                       GPU: Intel CoffeeLake-H GT2 [UHD Graphics 630]
                                                       Memory: 8773MiB / 15675MiB

I haven't looked at the sources and haven't analyze this warning message yet. What is it trying to "sync" at (mothership URL)http://radicale.org/ns/sync/... ? Like checking if a new version of Radicale is available?

pbiering commented 11 months ago

one can list all current existing sync tokens on server side in the collection directory with

find . -type d -name 'sync-token' | while read dir; do echo "$dir"; ls -1 $dir; done

But message is from a client, what happened here?

mbohun commented 11 months ago

@pbiering just to clarify, at the moment i am running Radicale v3 on my (openSUSE Tumbleweed) MSI laptop in a tmux session. So my MSI laptop at the moment acts as both "server" and "client". Yes the normal/final deployment will use a proper dedicated 24/7 server box that all of my other devices (computers, laptops, tablets, phones) will connect to.

Here is the output of your above script:

  mbohun@mamlas:~> cd .var/lib/radicale/collections
mbohun@mamlas:~/.var/lib/radicale/collections> find . -type d -name 'sync-token' | while read dir; do echo "$dir"; ls -1 $dir; done
./collection-root/mbohun/b34bfbe9-9137-3d8f-0875-3c3eee4854fd/.Radicale.cache/sync-token
013d0613358f4ef488dfa13a52832613169c468da9368e2d3c60b761e05cafd4
1874c115646517911b533acc326844b4110ace724237134c71c83b46d6bb427e
40d217bc5cdc01757625b1556c8538122b213286e2fe3e25183533e323396664
f5231fe3e30f8695894918253b699a71a3e6bf9f63b372856d9a84ebd6a7fc00

Diary/notes of my Google-detox are here (i will clean that up and reformat into some proper wiki later): https://gist.github.com/mbohun/5b6c0054ec566d5d7961bda921bcc2b7

pbiering commented 11 months ago

as you see, the sync token the client sends in its request is not existing on server side -> try to resync/reset your client application

mbohun commented 11 months ago

'http://radicale.org/ns/sync/3b2261e960481e2977dc4074709ce665bacc7578fbb0973d9e99ac384293b572'

@pbiering well, yes, but i am confused by that URL (hostname radicale.org) in that WARNING message:

...invalid sync token 'http://radicale.org/ns/sync/3b2261e960481e2977dc4074709ce665bacc7578fbb0973d9e99ac384293b572'

All of my clients are accessing the Radicale v3 service over ssh port-forwarding tunnels (autossh), for example my PinePhonePro and PineTab2 point at 127.0.0.1:5232 so i would expect the WARNING messages with URL containing some hostname or an IP addr that is actually here on my network (not a hostname like radicale.org).

BTW. i am not a very intelligent person, rather i am a bit more on the clue-less-side, so bare with me, i get confused easily.

pbiering commented 11 months ago

regarding "http://radicale.org/ns/sync/", this is part of a naming schema, not a real URL, see radicale/storage/multifilesystem/sync.py

mbohun commented 11 months ago

@pbiering aha! that explains it, i was confused about that URL-like namespace; thank you very much for the help.