i just upgraded the server to 10.0.1, the client to 9.0.2 and enabled the notification server. I checked that its running in the logs and /notification/ping is reachabel from the outside. In short. It should work just fine.
Nevertheless i could not recognize any improvements when syncing libraries, i.e. the delay of sync after a change on another device. Hence, i checked the API calls on the Seahub WebUI and learned, that the /notification endpoint is never called and there is also no websocket connection established, neither there is an error.
I could not check on the outgoing connections of the Desktop Sync Client yet, but are the clients already using the websocket notifications yet? I mean the sync time is okaish (always was), but it’s far from instant (>>10s / Average around 30s).
Great work anyway on v10. Upgrade worked flawlessly!
Edit: tbh. i’m not sure if the instant synchonization is actually supposed to work in the WebUI
I checked both applet.log, events.log and seafile.log but this message does not appear. I doubled checked the webserver proxy routing and the logs to double check that the notification server is running properly. I even tested the client with various servers with notificaiton server enabled.
Edit:
Client 9.0.2 on Windows
Client 9.0.2 on Linux
Server 10.0.1 (docker installation)
Installed the notification server on 10.0.1
Seems to have been successfully done:
cat seafile/logs/notification-server.log
2023/07/06 14:50:12 notification server started.
Windows client 9.0.3 and Mac Client 9.0.3
When I add a test.txt file to a shared library on Mac, the sync took 30 seconds to appear on the PC.
Deleting the same text file on the PC took about 10 seconds to appear on the Mac.
@daniel.pan is that the expected behaviour? From your explanation above I am not sure what actually should improve with this notification server.
The documentation for configuring notification server has been updated. Some instructions are added to the end of the document for how to check whether notification server really works. You can follow the instructions.
Update from the logs. It shows the seconds it taks to synchronize. May there is a reason other than the notification server. maybe my server ist just slow? But 30s is quite a long time
-----Client Startup-----
[07/30/23 17:14:45] starting seafile client 9.0.2
[07/30/23 17:14:45] rpc server started.
[07/30/23 17:14:46] start to serve on pipe client
[07/30/23 17:14:46] start to serve on pipe client
[07/30/23 17:14:46] start to serve on pipe client
[07/30/23 17:14:46] start to serve on pipe client
[07/30/23 17:14:46] File syncing protocol version on server https://cloud.domain.de is 2. Client file syncing protocol version is 2. Use version 2.
[07/30/23 17:14:46] start to serve on pipe client
[07/30/23 17:14:46] start to serve on pipe client
[07/30/23 17:14:46] start to serve on pipe client
[07/30/23 17:14:46] start to serve on pipe client
[07/30/23 17:14:47] Notification server is enabled on the remote server https://cloud.domain.de.
[07/30/23 17:14:47] All events are processed for repo ab0011b6-7824-4cc6-a67f-yyy.
[07/30/23 17:14:49] Repo 'Projekte' sync state transition from 'synchronized' to 'committing'.
[07/30/23 17:14:55] All events are processed for repo e93f65d2-1d4c-4062-8255-xxx.
[07/30/23 17:14:55] Repo 'Projekte' sync state transition from 'committing' to 'initializing'.
-----Change happended 30 seconds before------
[07/30/23 17:31:19] Repo 'Projekte' sync state transition from 'initializing' to 'downloading'.
[07/30/23 17:31:19] Transfer repo 'e93f65d2': ('normal', 'init') --> ('normal', 'check')
[07/30/23 17:31:19] Transfer repo 'e93f65d2': ('normal', 'check') --> ('normal', 'commit')
[07/30/23 17:31:19] Transfer repo 'e93f65d2': ('normal', 'commit') --> ('normal', 'fs')
[07/30/23 17:31:19] Transfer repo 'e93f65d2': ('normal', 'fs') --> ('normal', 'data')
[07/30/23 17:31:19] Transfer repo 'e93f65d2': ('normal', 'data') --> ('finished', 'finished')
[07/30/23 17:31:19] Repo 'Projekte' sync state transition from 'downloading' to 'synchronized'.
[07/30/23 17:31:21] Repo 'Projekte' sync state transition from 'synchronized' to 'committing'.
[07/30/23 17:31:21] All events are processed for repo e93f65d2-1d4c-4062-8255-xxx.
[07/30/23 17:31:21] Repo 'Projekte' sync state transition from 'committing' to 'synchronized'.
Hello @freezziey, you can modify the log_level field of notification section to debug in seafile.conf, so that when the client subscribes to the notification server, when the library is updated, the notification server will output the log of sending notifications to the corresponding client. You can check if a notification is sent after setting the debug log_level.
The log level debug did only reveal an error message, but when changing files there are no logs about messages sent
2023/08/04 01:57:40 path / internal server error: failed to upgrade http to websocket: websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header
2023/08/04 12:00:11 notification server started.
2023/08/04 12:05:27 failed to read json data from client: 172.18.0.1:37768: websocket: close 1006 (abnormal closure): unexpected EOF
2023/08/04 13:19:57 disconnected because no pong was received for more than 5s
2023/08/04 13:19:57 failed to read json data from client: 172.18.0.1:44600: read tcp 172.18.0.4:8083->172.18.0.1:44600: use of closed network connection