haiwen / seafile-docker

A Docker image for Seafile server
Other
536 stars 180 forks source link

Failed to find python executable #358

Closed thacoon closed 4 months ago

thacoon commented 7 months ago

My seafile server suddenly stopped. I am currently running 11.0.2 and fixed it manually, but the problem was it could not find the python executable.

I changed in some scripts to: elif !(python --version | grep "3\.[0-9]\+\.[0-9]\+") 2>/dev/null 1>&2; then, the + were missing so it could not find python3.10. Also extracting the version was not working for me so I changed: PYTHON="python"$(python --version | cut -d' ' -f2 | cut -d'.' -f1,2)

And then later I was running in the following problem:

Can't find a python executable of python3.10 in PATH
Install python3.10 before continue.
Or if you installed it in a non-standard PATH, set the PYTHON enviroment variable to it

Traceback (most recent call last):
  File "/scripts/start.py", line 95, in <module>
    main()
  File "/scripts/start.py", line 81, in main
    call('{} start'.format(get_script('seahub.sh')))       
  File "/scripts/utils.py", line 70, in call
    return subprocess.check_call(*a, **kw)
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/opt/seafile/seafile-server-11.0.2/seahub.sh start' returned non-zero exit status 1.

I fixed it, but unfortunately I have not documented what I have done, so I dont remember correctly.

I also had to run mariadb-upgrade for maria-db.

SkywalkerSpace commented 6 months ago

Thank you for your feedback. Regarding the python issue, you can solve it by resetting the seafile container docker compose down docker compose up -d

About the mariadb-upgrade, we have added MARIADB_AUTO_UPGRADE=1 in the docker-compose.yml on seafile-manual.