After migration: Restored Libraries not accessible

Hi there,
to replace my old server (running Ubuntu 16.04 LTS + Seafile 7.1.5) I have set up a new server with Ubuntu 20.04 LTS. With this change I also want to run most of my services/applications in containers. Seafile (again 7.1.5) is now running in it’s own LXC container, as well as nginx+MariaDB in a second one. It took me a while, but now almost everything seems to run smoothly. Following the " Backup and Recovery" section from the seafile manual, I have dumped the “old” mysql tables and fed them to the new MariaDB now running in my container. I can access seahub via the nginx reverse proxy (using https) and see all my old libraries. I am able to create new libraries and upload/download files to/from them, but I am not able to access my exisiting libraries. If I try, seahub just shows a blank screen and trying to sync it with the seafile client gives me an error " Failed to get repo download information: Server Error"

The logfile “applet.log” at client side shows:

[08/06/21 13:56:59]request failed for https://www.CENSORED.de/api2/repos/c9f4c812-26d4-47ac-a038-01881844ce48/download-info/: {“error_msg”:“Library c9f4c812-26d4-47ac-a038-01881844ce48 not found.”}
[08/06/21 13:57:18]Failed to get repo download information:
Server Error

ccnet.log shows nothing unusual:

[08/06/21 07:53:27] …/common/session.c(148): using config file /home/seafile/conf/ccnet.conf
[08/06/21 07:53:27] …/common/session.c(268): Update pubinfo file
[08/06/21 07:53:27] socket file exists, delete it anyway
[08/06/21 07:53:30] start to serve on pipe client
[08/06/21 11:56:46] start to serve on pipe client
[08/06/21 11:56:47] start to serve on pipe client
[08/06/21 11:56:47] start to serve on pipe client
[08/06/21 11:56:47] start to serve on pipe client
[08/06/21 12:01:49] start to serve on pipe client
[08/06/21 12:01:49] start to serve on pipe client[08/06/21 12:01:49] start to serve on pipe client
[08/06/21 12:01:49] start to serve on pipe client

same is true for controller.log:

[08/06/21 07:53:27] seafile-controller.c(190): starting ccnet-server …
[08/06/21 07:53:27] seafile-controller.c(81): spawn_process: ccnet-server -F /home/seafile/conf -c /home/seafile/ccnet -f /home/seafile/logs/ccnet.log -d -P /home/seafile/pids/ccnet.pid
[08/06/21 07:53:27] seafile-controller.c(115): spawned ccnet-server, pid 169
[08/06/21 07:53:27] seafile-controller.c(222): starting seaf-server …
[08/06/21 07:53:27] seafile-controller.c(81): spawn_process: seaf-server -F /home/seafile/conf -c /home/seafile/ccnet -d /home/seafile/seafile-data -l /home/seafile/logs/seafile.log -P /home/seafile/pids/seaf-server.pid -p /home/seafile/seafile-server-7.1.5/runtime
[08/06/21 07:53:27] seafile-controller.c(115): spawned seaf-server, pid 170

seafile.log seems to show an error:

[08/06/21 07:53:27] socket file exists, delete it anyway
[08/06/21 07:53:27] http-server.c(181): fileserver: worker_threads = 10
[08/06/21 07:53:27] http-server.c(196): fileserver: fixed_block_size = 8388608
[08/06/21 07:53:27] http-server.c(211): fileserver: web_token_expire_time = 3600
[08/06/21 07:53:27] http-server.c(226): fileserver: max_indexing_threads = 1
[08/06/21 07:53:27] http-server.c(241): fileserver: max_index_processing_threads= 3
[08/06/21 07:53:27] http-server.c(263): fileserver: cluster_shared_temp_file_mode = 600
[08/06/2021 11:56:47 AM] start to serve on pipe client
[08/06/2021 11:56:47 AM] start to serve on pipe client
[08/06/2021 11:56:59 AM] repo-mgr.c(894): Commit c9f4c812-26d4-47ac-a038-01881844ce48:742ce41b820a38699562adde8c59602543991342 is missing
[08/06/2021 12:01:49 PM] start to serve on pipe client
[08/06/2021 12:06:49 PM] start to serve on pipe client

seahub.log’:

2021-08-06 11:56:59,892 [WARNING] django.request:150 get_response Not Found: /api2/repos/c9f4c812-26d4-47ac-a038-01881844ce48/download-info/
2021-08-06 11:59:57,027 [WARNING] django.request:150 get_response Not Found: /api2/repos/c9f4c812-26d4-47ac-a038-01881844ce48/download-info/:

I then tried to run seaf-fsck.sh which gives me a lot like the following errors (I have truncated the output):

[08/06/21 12:15:36] fsck.c(592): Running fsck for repo 055f4457-5f42-48d1-b2ba-75217e66577d.
[08/06/21 12:15:36] repo-mgr.c(296): Commit 216d737e4f523ea090ed044709ddd116f0d908e9 is missing
[08/06/21 12:15:36] fsck.c(609): Repo 055f4457 HEAD commit is damaged, need to restore to an old version.
[08/06/21 12:15:36] fsck.c(503): Scanning available commits…
[08/06/21 12:15:36] fsck.c(510): No available commits for repo 055f4457, can’t be repaired.
[08/06/21 12:15:36] fsck.c(656): Fsck finished for repo 055f4457.

At first I thought that this has to do something with the way, the container accesses the seafile-data storage, because I have created a bind mount from the seafile-data directory on the host into the container (lxc device add CONTAINERNAME disk source=/somepath/seafile-data path=home/seafile/seafile-data), and adjusted the user/idmapping, but after sucessfully creating new libraries and up-/downloading files to them that seems to be OK.

Does anyone have an idea what could be wrong?

BR, sandman

Seafile Server is running just fine. The import of the database was also successful. Hence you can login and browse your files.

But Seafile Server cannot access the actual file data. Are the folder permissions set correctly? Does Seafile have access to the /seafile-data folder?

For some reason it really seems to have been due to permissons being not correct. I (once again) have removed the bind mount to the container as well as the idmaps and set it up again. Now it seems to work!

1 Like