Seahub not starting after Upgrade from Pro Server 9.0.13 to 10.0.11

Today I upgraded my seafile pro server from 9.0.13 to 10.0.11. Seafile itself starts without any issues, but seahub doesn’t. It also doesn’t write anything in the log and does not output any errors besides

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

I installed the new python dependencies before the upgrade.
The server runs with Debian 10.

How can I determine what the issue is?

Running seahub manually via
sudo -u seafile SEAFILE_CONF_DIR=/srv/seafile/seafile-data CCNET_CONF_DIR=/srv/seafile/ccnet PYTHONPATH=/srv/seafile/seafile-server-latest/seafile/lib/python3/site-packages:/srv/seafile/seafile-server-latest/seafile/lib64/python3/site-packages:/srv/seafile/seafile-server-latest/seahub:/srv/seafile/seafile-server-latest/seahub/thirdpart: python3 seahub/thirdpart/bin/gunicorn seahub.wsgi:application --preload
the following error occurs:

: python3 seahub/thirdpart/bin/gunicorn seahub.wsgi:application --preload
Traceback (most recent call last):
  File "seahub/thirdpart/bin/gunicorn", line 8, in <module>
    sys.exit(run())
  File "/srv/seafile/seafile-server-latest/seahub/thirdpart/gunicorn/app/wsgiapp.py", line 67, in run
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
  File "/srv/seafile/seafile-server-latest/seahub/thirdpart/gunicorn/app/base.py", line 231, in run
    super().run()
  File "/srv/seafile/seafile-server-latest/seahub/thirdpart/gunicorn/app/base.py", line 72, in run
    Arbiter(self).run()
  File "/srv/seafile/seafile-server-latest/seahub/thirdpart/gunicorn/arbiter.py", line 58, in __init__
    self.setup(app)
  File "/srv/seafile/seafile-server-latest/seahub/thirdpart/gunicorn/arbiter.py", line 118, in setup
    self.app.wsgi()
  File "/srv/seafile/seafile-server-latest/seahub/thirdpart/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/srv/seafile/seafile-server-latest/seahub/thirdpart/gunicorn/app/wsgiapp.py", line 58, in load
    return self.load_wsgiapp()
  File "/srv/seafile/seafile-server-latest/seahub/thirdpart/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/srv/seafile/seafile-server-latest/seahub/thirdpart/gunicorn/util.py", line 359, in import_app
    mod = importlib.import_module(module)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/srv/seafile/seafile-server-latest/seahub/seahub/__init__.py", line 2, in <module>
    from .signals import repo_created, repo_deleted, clean_up_repo_trash, \
  File "/srv/seafile/seafile-server-latest/seahub/seahub/signals.py", line 2, in <module>
    import django.dispatch
  File "/srv/seafile/seafile-server-latest/seahub/thirdpart/django/dispatch/__init__.py", line 9, in <module>
    from django.dispatch.dispatcher import Signal, receiver  # NOQA
  File "/srv/seafile/seafile-server-latest/seahub/thirdpart/django/dispatch/dispatcher.py", line 6, in <module>
    from django.utils.deprecation import RemovedInDjango40Warning
  File "/srv/seafile/seafile-server-latest/seahub/thirdpart/django/utils/deprecation.py", line 5, in <module>
    from asgiref.sync import sync_to_async
  File "/srv/seafile/seafile-server-latest/seahub/thirdpart/asgiref/sync.py", line 27, in <module>
    from .current_thread_executor import CurrentThreadExecutor
  File "/srv/seafile/seafile-server-latest/seahub/thirdpart/asgiref/current_thread_executor.py", line 10, in <module>
    from typing_extensions import ParamSpec
  File "/srv/seafile/seafile-server-latest/seahub/thirdpart/typing_extensions.py", line 874
    def TypedDict(typename, fields=_marker, /, *, total=True, **kwargs):
                                            ^
SyntaxError: invalid syntax

Seems to be an issue with the typing extension.

Hi Quizz,

Could you please do the following:

  • Go to your seafile config folder
  • Open the gunicorn.conf.py in a text editor
  • Where it says 'Daemon = True" set this to “Daemon = False”
  • Go to your seafile installation folder (or seafile-server-latest) and now try and run the seahub.sh file.

This should now display where the file is failing, and you can use CTRL + C to stop this, but could you please post the results here?

(FYI, once any changes have been made, you can change the Daemon back to True and this will load normally then)

Kind regards,
Mitch

Hi Mitch,

looks like the exact same error I already posted in the first reply:

LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub at port 8000 ...

Error happened during creating seafile admin.

Traceback (most recent call last):
  File "/srv/seafile/seafile-pro-server-10.0.11/seahub/thirdpart/bin/gunicorn", line 8, in <module>
    sys.exit(run())
  File "/srv/seafile/seafile-pro-server-10.0.11/seahub/thirdpart/gunicorn/app/wsgiapp.py", line 67, in run
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
  File "/srv/seafile/seafile-pro-server-10.0.11/seahub/thirdpart/gunicorn/app/base.py", line 231, in run
    super().run()
  File "/srv/seafile/seafile-pro-server-10.0.11/seahub/thirdpart/gunicorn/app/base.py", line 72, in run
    Arbiter(self).run()
  File "/srv/seafile/seafile-pro-server-10.0.11/seahub/thirdpart/gunicorn/arbiter.py", line 58, in __init__
    self.setup(app)
  File "/srv/seafile/seafile-pro-server-10.0.11/seahub/thirdpart/gunicorn/arbiter.py", line 118, in setup
    self.app.wsgi()
  File "/srv/seafile/seafile-pro-server-10.0.11/seahub/thirdpart/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/srv/seafile/seafile-pro-server-10.0.11/seahub/thirdpart/gunicorn/app/wsgiapp.py", line 58, in load
    return self.load_wsgiapp()
  File "/srv/seafile/seafile-pro-server-10.0.11/seahub/thirdpart/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/srv/seafile/seafile-pro-server-10.0.11/seahub/thirdpart/gunicorn/util.py", line 359, in import_app
    mod = importlib.import_module(module)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/srv/seafile/seafile-pro-server-10.0.11/seahub/seahub/__init__.py", line 2, in <module>
    from .signals import repo_created, repo_deleted, clean_up_repo_trash, \
  File "/srv/seafile/seafile-pro-server-10.0.11/seahub/seahub/signals.py", line 2, in <module>
    import django.dispatch
  File "/srv/seafile/seafile-pro-server-10.0.11/seahub/thirdpart/django/dispatch/__init__.py", line 9, in <module>
    from django.dispatch.dispatcher import Signal, receiver  # NOQA
  File "/srv/seafile/seafile-pro-server-10.0.11/seahub/thirdpart/django/dispatch/dispatcher.py", line 6, in <module>
    from django.utils.deprecation import RemovedInDjango40Warning
  File "/srv/seafile/seafile-pro-server-10.0.11/seahub/thirdpart/django/utils/deprecation.py", line 5, in <module>
    from asgiref.sync import sync_to_async
  File "/srv/seafile/seafile-pro-server-10.0.11/seahub/thirdpart/asgiref/sync.py", line 27, in <module>
    from .current_thread_executor import CurrentThreadExecutor
  File "/srv/seafile/seafile-pro-server-10.0.11/seahub/thirdpart/asgiref/current_thread_executor.py", line 10, in <module>
    from typing_extensions import ParamSpec
  File "/srv/seafile/seafile-pro-server-10.0.11/seahub/thirdpart/typing_extensions.py", line 874
    def TypedDict(typename, fields=_marker, /, *, total=True, **kwargs):
                                            ^
SyntaxError: invalid syntax
Error:Seahub failed to start.
Please try to run "./seahub.sh start" again

Thanks for your help :slight_smile:
quizzi

Hi,

I was about to “hijack” this forum thread, because I think I might have the same or a very similar problem.

I also run Debian 10 and upgrading Seafile 9.0.6 to Seafile 10.0.11 I also caused several errors terminating in the same error message:

  File "/srv/seafile/seafile-pro-server-10.0.11/seahub/thirdpart/typing_extensions.py", line 874
    def TypedDict(typename, fields=_marker, /, *, total=True, **kwargs):
                                            ^
SyntaxError: invalid syntax
e 9, in <module>
    from django.dispatch.dispatcher import Signal, receiver  # NOQA

(from controller.log)

This message seems to indicate to me that my Python install cannot currently understand the code it’s given. I figured it might be either an unfulfilled dependency or the wrong version of Python.

My Python version was Python 3.7.3. Debian 10 does not support any version above that.

Installing Python3.8 by hand solved the problem for me.

Show current version of python with:

python3 --version
1 Like

Check the Seafile community forums or mailing lists for discussions related to the upgrade. Others might have faced similar issues and shared solutions. Review the Seafile Pro documentation for any specific upgrade instructions or troubleshooting steps related to the versions you are upgrading to.