Unable to upgrade to latest version (Docker)

I’m trying to use the docker-compose.yml file to upgrade my previously working Seafile installation and it’s not working. I’m getting the following error in the seafile container logs:

[root@beast seafile]# docker logs seafile -f
*** Running /etc/my_init.d/01_create_data_links.sh…
*** Booting runit daemon…
*** Runit started as PID 24
*** Running /scripts/enterpoint.sh…
nginx: [warn] the “ssl” directive is deprecated, use the “listen … ssl” directive instead in /etc/nginx/sites-enabled/seafile.nginx.conf:20
2022-03-14 19:25:13 Nginx ready
2022-03-14 19:25:13 This is a idle script (infinite loop) to keep container running.
Certificate will not expire
Created a crontab to auto renew the cert for letsencrypt.
nginx: [warn] the “ssl” directive is deprecated, use the “listen … ssl” directive instead in /etc/nginx/sites-enabled/seafile.nginx.conf:20
[03/14/2022 19:25:13][upgrade]: Running script /opt/seafile/seafile-server-9.0.4/upgrade/upgrade_1.2_1.3.sh


This script would upgrade your seafile server from 1.2.0 to 1.3.0
Press [ENTER] to contiune

Can’t find a python executable of version 2.6 or above in PATH
Install python 2.6+ before continue.
Or if you installed it in a non-standard PATH, set the PYTHON enviroment varirable to it

[2022-03-14 19:25:13] Preparing for letsencrypt …
[2022-03-14 19:25:13] Found existing cert file /shared/ssl/cloud.hackno.org.crt
[2022-03-14 19:25:13] Skip letsencrypt verification since we have a valid certificate
[2022-03-14 19:25:13] Skip running setup-seafile-mysql.py because there is existing seafile-data folder.
[2022-03-14 19:25:13] Running scripts /opt/seafile/seafile-server-9.0.4/upgrade/upgrade_1.2_1.3.sh
Traceback (most recent call last):
File “/scripts/start.py”, line 86, in
main()
File “/scripts/start.py”, line 58, in main
check_upgrade()
File “/scripts/upgrade.py”, line 108, in check_upgrade
run_script_and_update_version_stamp(script, new_version)
File “/scripts/upgrade.py”, line 59, in run_script_and_update_version_stamp
call(script)
File “/scripts/utils.py”, line 70, in call
return subprocess.check_call(*a, **kw)
File “/usr/lib/python3.8/subprocess.py”, line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘/opt/seafile/seafile-server-9.0.4/upgrade/upgrade_1.2_1.3.sh’ returned non-zero exit status 1.

I found old logs showing that I was running version 8 before but even trying to run that version does the same thing. It says it can’t find Python 2.x. What do I do? I backed up the database and files but when I go to copy things back over and reimport the database I’m back to this error.

Maybe 8.0.5 wasn’t working it looks like the controller kept restarting too. What should I do?

2021-08-05 23:22:29 seafile-controller.c(81): spawn_process: /usr/bin/python3 -m wsgidav.server.server_cli --server gunicorn --root / --log-file /opt/seafile/logs/seafdav.log --pid /opt/seafile/pids/seafdav.pid --port 8080 --host 0.0.0.0
2021-08-05 23:22:29 seafile-controller.c(115): spawned /usr/bin/python3, pid 188
2021-08-05 23:27:16 seafile-controller.c(468): shutting down all services …
2021-08-05 23:31:17 seafile-controller.c(190): starting seaf-server …
2021-08-05 23:31:17 seafile-controller.c(81): spawn_process: seaf-server -F /opt/seafile/conf -c /opt/seafile/ccnet -d /opt/seafile/seafile-data -l /opt/seafile/logs/seafile.log -P /opt/seafile/pids/seaf-server.pid -p /opt/seafile/seafile-server-8.0.5/runtime
2021-08-05 23:31:17 seafile-controller.c(115): spawned seaf-server, pid 120
2021-08-05 23:31:27 seafile-controller.c(416): pid file /opt/seafile/pids/seafdav.pid does not exist
2021-08-05 23:31:27 seafile-controller.c(443): seafdav need restart…
2021-08-05 23:31:27 seafile-controller.c(81): spawn_process: /usr/bin/python3 -m wsgidav.server.server_cli --server gunicorn --root / --log-file /opt/seafile/logs/seafdav.log --pid /opt/seafile/pids/seafdav.pid --port 8080 --host 0.0.0.0
2021-08-05 23:31:27 seafile-controller.c(115): spawned /usr/bin/python3, pid 175
2021-08-06 08:21:18 seafile-controller.c(468): shutting down all services …
2021-08-06 08:21:33 seafile-controller.c(190): starting seaf-server …
2021-08-06 08:21:33 seafile-controller.c(81): spawn_process: seaf-server -F /opt/seafile/conf -c /opt/seafile/ccnet -d /opt/seafile/seafile-data -l /opt/seafile/logs/seafile.log -P /opt/seafile/pids/seaf-server.pid -p /opt/seafile/seafile-server-8.0.5/runtime
2021-08-06 08:21:33 seafile-controller.c(115): spawned seaf-server, pid 114
2021-08-06 08:21:34 seafile-controller.c(468): shutting down all services …
2021-08-06 08:21:49 seafile-controller.c(190): starting seaf-server …
2021-08-06 08:21:49 seafile-controller.c(81): spawn_process: seaf-server -F /opt/seafile/conf -c /opt/seafile/ccnet -d /opt/seafile/seafile-data -l /opt/seafile/logs/seafile.log -P /opt/seafile/pids/seaf-server.pid -p /opt/seafile/seafile-server-8.0.5/runtime
2021-08-06 08:21:49 seafile-controller.c(115): spawned seaf-server, pid 115
2021-08-06 08:21:59 seafile-controller.c(416): pid file /opt/seafile/pids/seafdav.pid does not exist
2021-08-06 08:21:59 seafile-controller.c(443): seafdav need restart…
2021-08-06 08:21:59 seafile-controller.c(81): spawn_process: /usr/bin/python3 -m wsgidav.server.server_cli --server gunicorn --root / --log-file /opt/seafile/logs/seafdav.log --pid /opt/seafile/pids/seafdav.pid --port 8080 --host 0.0.0.0
2021-08-06 08:21:59 seafile-controller.c(115): spawned /usr/bin/python3, pid 170

One other thing I noticed is that when I access the seafile container when running the latest version it has an invalid symlink to the latest version.

drwxr-xr-x 1 root root 4096 Feb 20 20:05 seafile-server-9.0.4/
lrwxrwxrwx 1 root root 28 Mar 14 19:39 seafile-server-latest → /opt/seafile/seafile-server-

I fixed it. I had to update my current_version file with the last known version.