Issue starting seahub - upgrade 9.0.2 to 9.0.5 Community edition - solved

Hello there,

I tried to update via minor_change.sh from 9.0.2 to 9.0.5 on an Ubuntu 20.04 server, and seahub is not starting anymore :’(

./seahub.sh start
LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub at port 8000 …
Error:Seahub failed to start.
Please try to run “./seahub.sh start” again

Logs are empty.
I tried to launch 9.02, same error.
I fixed PATH for gunicorn/python because it was making warning message

Any idea what to look/try next ?

Take care

In case that helps, here is the result when I launch seahub.sh with verbose mode :slight_smile:

  • case $1 in
  • start_seahub
  • before_start
  • prepare_env
  • check_python_executable
  • [[ ‘’ != ‘’ ]]
  • which python3
  • PYTHON=python3
  • validate_seafile_data_dir
  • [[ ! -d /home/seafile/seafile-data ]]
  • [[ -z C.UTF-8 ]]
  • [[ -z ‘’ ]]
  • echo ‘LC_ALL is not set in ENV, set to en_US.UTF-8’
    LC_ALL is not set in ENV, set to en_US.UTF-8
  • export LC_ALL=en_US.UTF-8
  • LC_ALL=en_US.UTF-8
  • export CCNET_CONF_DIR=/home/seafile/ccnet
  • CCNET_CONF_DIR=/home/seafile/ccnet
  • export SEAFILE_CONF_DIR=/home/seafile/seafile-data
  • SEAFILE_CONF_DIR=/home/seafile/seafile-data
  • export SEAFILE_CENTRAL_CONF_DIR=/home/seafile/conf
  • SEAFILE_CENTRAL_CONF_DIR=/home/seafile/conf
  • export SEAFILE_RPC_PIPE_PATH=/home/seafile/seafile-server-9.0.5/runtime
  • SEAFILE_RPC_PIPE_PATH=/home/seafile/seafile-server-9.0.5/runtime
  • export PYTHONPATH=/home/seafile/seafile-server-9.0.5/seafile/lib/python3/site-packages:/home/seafile/seafile-server-9.0.5/seafile/lib64/python3/site-packages:/home/seafile/seafile-server-9.0.5/seahub:/home/seafile/seafile-server-9.0.5/seahub/thirdpart:
  • PYTHONPATH=/home/seafile/seafile-server-9.0.5/seafile/lib/python3/site-packages:/home/seafile/seafile-server-9.0.5/seafile/lib64/python3/site-packages:/home/seafile/seafile-server-9.0.5/seahub:/home/seafile/seafile-server-9.0.5/seahub/thirdpart:
  • warning_if_seafile_not_running
  • pgrep -f ‘seafile-controller -c /home/seafile/ccnet’
  • validate_seahub_running
  • pgrep -f /home/seafile/seafile-server-9.0.5/seahub/manage.py
  • pgrep -f seahub.wsgi:application
  • prepare_seahub_log_dir
  • logdir=/home/seafile/logs
  • [[ -d ‘’ ]]
  • mkdir -p /home/seafile/logs
  • export SEAHUB_LOG_DIR=/home/seafile/logs
  • SEAHUB_LOG_DIR=/home/seafile/logs
  • [[ -d /home/seafile/seafile-server-9.0.5/pro ]]
  • echo ‘Starting seahub at port 8000 …’
    Starting seahub at port 8000 …
  • check_init_admin
  • check_init_admin_script=/home/seafile/seafile-server-9.0.5/check_init_admin.py
  • python3 /home/seafile/seafile-server-9.0.5/check_init_admin.py
  • export DJANGO_SETTINGS_MODULE=seahub.settings
  • DJANGO_SETTINGS_MODULE=seahub.settings
  • python3 /home/seafile/seafile-server-9.0.5/seahub/thirdpart/bin/gunicorn seahub.wsgi:application -c /home/seafile/conf/gunicorn.conf.py --preload
  • sleep 5
  • pgrep -f seahub.wsgi:application
  • printf ‘\033[33mError:Seahub failed to start.\033[m\n’
    Error:Seahub failed to start.
  • echo ‘Please try to run “./seahub.sh start” again’
    Please try to run “./seahub.sh start” again
  • exit 1

If I launch manually the last commands I get no error.

Take care

Hi there,

I got a little further.

If i launch seahub with fast-cgi it gives an error message :

Starting seahub (fastcgi) at 127.0.0.1:8000 ...
Traceback (most recent call last):
  File "/home/seafile/seafile-server-9.0.5/seahub/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/seafile/seafile-server-9.0.5/seahub/thirdpart/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/home/seafile/seafile-server-9.0.5/seahub/thirdpart/django/core/management/__init__.py", line 363, in execute
    settings.INSTALLED_APPS
  File "/home/seafile/seafile-server-9.0.5/seahub/thirdpart/django/conf/__init__.py", line 82, in __getattr__
    self._setup(name)
  File "/home/seafile/seafile-server-9.0.5/seahub/thirdpart/django/conf/__init__.py", line 69, in _setup
    self._wrapped = Settings(settings_module)
  File "/home/seafile/seafile-server-9.0.5/seahub/thirdpart/django/conf/__init__.py", line 170, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/seafile/seafile-server-9.0.5/seahub/seahub/__init__.py", line 4, in <module>
    from .handlers import repo_created_cb, repo_deleted_cb, clean_up_repo_trash_cb, \
  File "/home/seafile/seafile-server-9.0.5/seahub/seahub/handlers.py", line 4, in <module>
    from . import settings
  File "/home/seafile/seafile-server-9.0.5/seahub/seahub/settings.py", line 878, in <module>
    import seahub_settings
  File "/home/seafile/conf/seahub_settings.py", line 15
    smpt server EMAIL_HOST_USER = 'be75d090958ef14d66b5867b6e3fe911' #
         ^
SyntaxError: invalid syntax
Error:Seahub failed to start.

Any idea of what I should do to fix this?

Take care

Alright I fixed this.

In my “/conf/seahub_settings.py”, all the commented text went on the line below which was doing this syntax error. Why did this happen? No idea…!!!

Anyway I moved it to the right place and now everything is working.

Take care