Client desync libraries when mysql server is down

I have seafile server CE 7.1.3 installed with Mysql database.
My seafile client 7.0.7 is under Mac OS X

When the Mysql database is down or restarting (and the seafile server is still running) and the client tries to refresh a library, the seafile client desync the library instead of seeing a server error.

Once the library is desynced, the client will not try to resync it, even when the seafile server and mysql server are back up and fully working.

I have to manually resync all the libraries on all the clients after each mysql restart…

Literally Just ran into this same issue after migrating to my new server.

Anytime i have to reboot my server for major upgrades this seems to happen, i’ve since been blocking traffic to the box until the server is fully up to prevent this, i’ve tried starting up services manually ensuring SQL is FULLY operational before Seafile and it did not matter, same version/s except pro, very standard Nginx configuration with nothing special added.

edit : Client version and product do not seem to matter, happened to Seafile client on Mac, Linux, Windows with different versions.

example log file -

[05/01/20 13:59:05] http-tx-mgr.c(1419): Bad response code for GET https://seafilecloud.xxxxxxxx.com/seafhttp/repo/RepoGUID/commit/HEAD: 502.
[05/01/20 14:00:22] sync-mgr.c(621): Repo ‘Software Stuff’ sync state transition from initializing to ‘error’: ‘Library deleted on server’.
[05/01/20 14:00:22] sync-mgr.c(832): repo Software Stuff(RepoID) not found on server

1 Like

How to flag this as a bug so the developers can correct it?
It is really annoying to have to reconfigure all the clients manually after each Mysql restart…

For me the server should respond something like “service temporarily unavailable” instead of “Library deleted on server”

What kind of server are you running? I cant tell if I have narrowed it down but I think it has something to do with how long it takes Seafile to fully start.

edit: as for flagging as a bug, i think it needs a bit more research.

I had exactly the same problem a few days ago. I run an Update and MySQL restarted. I had to resync all libraries.

Seafile Server Pro: 7.1.3
Client: 7.0.0

Luckily to this point this happend only on my Privat Server. Not on the Company one.

Blockquote
What kind of server are you running? I cant tell if I have narrowed it down but I think it has something to do with how long it takes Seafile to fully start.

It does not append at full server start or seafile restart.
Last time I had to restart mysql service only for maintenance reason and I discover that Seafile client desync all of my librairies.

After a few tests, I discover this difference between “seafile service down” and “mysql service down with seafile service up” that make seafile client desync librairies.

And I think seafile server 6.x.x CE was not returning “library deleted” when mysql service is down.
It is new to seafile server 7.x.x CE.

Just for clarification: You have set the corresponding setting “Do not unsync a library when not found on server” in the clients settings?

No it was not set.

Now it is (and it prevents the client from desync), but this is only a workaround, the library was never deleted from the seafile server.

What if I want the client to desync libraries when they are REALLY deleted?

We’ll look into the issue.

Same problem here. Updating Ubuntu server (MySQL was updated) and client detected, that libraries were deleted.
Versions: Seafile server 7.1.5, Seafile client 7.0.10

Ubuntu packages update /var/log/apt/history.log

Start-Date: 2021-02-07 09:20:21
Commandline: apt upgrade
… mysql … (got errors that I can’t post links)
End-Date: 2021-02-07 09:24:3

C:\Users\MYUSER\ccnet\logs\seafile.log

[02/07/21 09:20:37] http-tx-mgr.c(2331): Bad response REPO6 for POST https_COLON_SLASH_SLASH_MYDOMAIN.com/seafhttp/repo/head-commits-multi/: 500
[02/07/21 09:21:07] http-tx-mgr.c(2331): Bad response REPO6 for POST https_COLON_SLASH_SLASH_MYDOMAIN.com/seafhttp/repo/head-commits-multi/: 500
[02/07/21 09:21:35] sync-mgr.c(621): Repo ‘REPO5’ sync state transition from initializing to ‘error’: ‘Library deleted on server’.
[02/07/21 09:21:35] sync-mgr.c(832): repo REPO5(b0087139) not found on server
[02/07/21 09:21:35] sync-mgr.c(836): remove repo REPO5(b0087139) since it’s deleted on relay
[02/07/21 09:21:35] sync-mgr.c(621): Repo ‘REPO2’ sync state transition from initializing to ‘error’: ‘Library deleted on server’.
[02/07/21 09:21:35] sync-mgr.c(832): repo REPO2(3e2b08bc) not found on server
[02/07/21 09:21:35] sync-mgr.c(836): remove repo REPO2(3e2b08bc) since it’s deleted on relay
[02/07/21 09:21:35] sync-mgr.c(621): Repo ‘REPO3’ sync state transition from initializing to ‘error’: ‘Library deleted on server’.
[02/07/21 09:21:35] sync-mgr.c(832): repo REPO3(e9d84a17) not found on server
[02/07/21 09:21:35] sync-mgr.c(836): remove repo REPO3(e9d84a17) since it’s deleted on relay
[02/07/21 09:21:35] sync-mgr.c(621): Repo ‘REPO1’ sync state transition from initializing to ‘error’: ‘Library deleted on server’.
[02/07/21 09:21:35] sync-mgr.c(832): repo REPO1(4234b722) not found on server
[02/07/21 09:21:35] sync-mgr.c(836): remove repo REPO1(4234b722) since it’s deleted on relay
[02/07/21 09:21:35] sync-mgr.c(621): Repo ‘REPO6’ sync state transition from initializing to ‘error’: ‘Library deleted on server’.
[02/07/21 09:21:35] sync-mgr.c(832): repo REPO6(5b0e35b4) not found on server
[02/07/21 09:21:35] sync-mgr.c(836): remove repo REPO6(5b0e35b4) since it’s deleted on relay
[02/07/21 09:21:36] sync-mgr.c(621): Repo ‘REPO4’ sync state transition from initializing to ‘error’: ‘Library deleted on server’.
[02/07/21 09:21:36] sync-mgr.c(832): repo REPO4(71a560f5) not found on server
[02/07/21 09:21:36] sync-mgr.c(836): remove repo REPO4(71a560f5) since it’s deleted on relay
[02/07/21 09:22:12] repo-mgr.c(5838): Removing store C:/Users/MYUSER/AppData/Local/Seafile/seafile-data\deleted_store\commits\3e2b08bc-d0e4-4d80-ae33-2994df058f2d
[02/07/21 09:22:12] repo-mgr.c(5838): Removing store C:/Users/MYUSER/AppData/Local/Seafile/seafile-data\deleted_store\commits\4234b722-622e-488f-b874-5bd1cea5388b
[02/07/21 09:22:13] repo-mgr.c(5838): Removing store C:/Users/MYUSER/AppData/Local/Seafile/seafile-data\deleted_store\commits\5b0e35b4-4e02-495a-8985-0e174e3beedf
[02/07/21 09:22:13] repo-mgr.c(5838): Removing store C:/Users/MYUSER/AppData/Local/Seafile/seafile-data\deleted_store\commits\71a560f5-9118-4b20-b082-ed6e05361c1b
[02/07/21 09:22:13] repo-mgr.c(5838): Removing store C:/Users/MYUSER/AppData/Local/Seafile/seafile-data\deleted_store\commits\b0087139-abfc-4eae-9e5d-02ca884e1857
[02/07/21 09:22:18] repo-mgr.c(5838): Removing store C:/Users/MYUSER/AppData/Local/Seafile/seafile-data\deleted_store\commits\e9d84a17-b524-4a59-bfed-8b5c12dfe903
[02/07/21 09:22:34] repo-mgr.c(5838): Removing store C:/Users/MYUSER/AppData/Local/Seafile/seafile-data\deleted_store\fs\3e2b08bc-d0e4-4d80-ae33-2994df058f2d
[02/07/21 09:23:44] repo-mgr.c(5838): Removing store C:/Users/MYUSER/AppData/Local/Seafile/seafile-data\deleted_store\fs\4234b722-622e-488f-b874-5bd1cea5388b
[02/07/21 09:24:00] repo-mgr.c(5838): Removing store C:/Users/MYUSER/AppData/Local/Seafile/seafile-data\deleted_store\fs\5b0e35b4-4e02-495a-8985-0e174e3beedf
[02/07/21 09:24:16] repo-mgr.c(5838): Removing store C:/Users/MYUSER/AppData/Local/Seafile/seafile-data\deleted_store\fs\71a560f5-9118-4b20-b082-ed6e05361c1b
[02/07/21 09:24:21] repo-mgr.c(5838): Removing store C:/Users/MYUSER/AppData/Local/Seafile/seafile-data\deleted_store\fs\b0087139-abfc-4eae-9e5d-02ca884e1857
[02/07/21 09:24:47] repo-mgr.c(5838): Removing store C:/Users/MYUSER/AppData/Local/Seafile/seafile-data\deleted_store\fs\e9d84a17-b524-4a59-bfed-8b5c12dfe903

This issue is fixed with 8.0.x version.