Failed to access '/shared/logs/var-log': Too many levels of symbolic links

Hii,
I run Seafile 7.0.5 on my RPi3 with docker. When my RPi fails and reboots I am not able to start Seafile again. I got following message from the docker logs

*** Running /etc/my_init.d/01_create_data_links.sh...
mv: failed to access '/shared/logs/var-log': Too many levels of symbolic links
*** /etc/my_init.d/01_create_data_links.sh failed with status 1
*** Killing all processes...

I use following command to execute it as container:

sudo docker run -d --name seafile \
-e SEAFILE_SERVER_HOSTNAME=192.168.0.100 \
-e SEAFILE_ADMIN_EMAIL=xxx \
-e SEAFILE_ADMIN_PASSWORD=xxx \
-v /apps/seafile:/shared \
-p 80:80 \
codecutteruk/seafile:7.0.5

I get it up and running if I delete the seafile folder with all data and run the docker command. But this is bad to setup every time. Any idea how I can solve it?

Does someone has an idea what could be the cause of this issue?

I have the same problem. Rebooted my machine after an update and it failed to get the container up again.

Experiencing the same issue. Can’t determine the cause as no system changes/updates/etc. were made prior to this issue just “suddenly” appearing. Hopefully this post is seen by someone w/ some guidance. Can’t start Seafile server at all, dead in the water until a solution is found.
Deployed: 10.0.1 community edition via Docker-compose on Ubuntu 22.04.3 LTS.
Regards,

I had the same problem when I rebooted my docker host. This is how I fixed it:

On the host, I navigated to the logs directory inside the seafile-data directory (i.e. under the volume that is mounted to the docker container). It looked like this:

root@mymachine:/mymount/seafile-data/logs# ls -alh
lrwxrwxrwx 1 root root   20 Nov 19 19:41 var-log -> /shared/logs/var-log

Because /shared/logs/var-log (inside the container) links to /mymount/seafile-data/logs/var-log it causes a loop and hence the error is produced. I simply deleted the symbolic link like so:

root@mymachine:/mymount/seafile-data/logs# rm var-log

After restarting the container, everything worked again as before.