Seahub wont start and it not gives any useful input about why

Seahub (from Seafile 10.0.1 64-bit) was running correctly on Fedora 38. After upgrading to Fedora 39, it stopped working without indicating errors, as you described. The solution in my case was this:

  1. Edit the gunicorn configuration to disable daemon mode, that allows to get runtime errors:

$ vim /opt/seafile/conf/gunicorn.conf.py

In line 4 change …
daemon = True
to
daemon = False

  1. Run seafile and then run seahub to display error messages:
$ /opt/seafile/seafile-server-latest/seafile.sh start
$ /opt/seafile/seafile-server-latest/seahub.sh start

In my case, I got a large number of messages that ended with:

  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 994, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/opt/seafile/seafile-server-10.0.1/seahub/seahub/avatar/models.py", line 28, in <module>
    from seahub.avatar.util import invalidate_cache, get_avatar_file_storage
  File "/opt/seafile/seafile-server-10.0.1/seahub/seahub/avatar/util.py", line 8, in <module>
    from seahub.avatar.settings import AVATAR_DEFAULT_URL, AVATAR_CACHE_TIMEOUT,\
  File "/opt/seafile/seafile-server-10.0.1/seahub/seahub/avatar/settings.py", line 25, in <module>
    AVATAR_RESIZE_METHOD = getattr(settings, 'AVATAR_RESIZE_METHOD', Image.ANTIALIAS)
                                                                     ^^^^^^^^^^^^^^^
AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'
Error:Seahub failed to start.
Please try to run "./seahub.sh start" again

So this indicates that the Image.ANTIALIAS option is not valid for the AVATAR_RESIZE_METHOD on line 25 of the avatar settings, then:

  1. Edit the avatar settings file:

$ vim /opt/seafile/seafile-server-10.0.1/seahub/seahub/seahub/avatar/settings.py

On line 25, change …
AVATAR_RESIZE_METHOD = getattr(settings, 'AVATAR_RESIZE_METHOD', Image.ANTIALIAS)
to
AVATAR_RESIZE_METHOD = getattr(settings, 'AVATAR_RESIZE_METHOD', None)

  1. Revert daemon = true in unicorn.conf.py and restart everything. Seafile should work.

So far I haven’t found any other problems with this change, I hope the developers will fix it in the next releases.

1 Like