Seahub will not start - python spacing issues

Hi there… I had my seafile install working for about a month. I ran an update and started getting an NGINX 502 error.

I managed to track it down to seafile not starting, and it appears as though there is a python spacing error. The part I am confused about is to which file/module has the real issue. It references a few of them.

root@sfile:/opt/seafile# vi /opt/seafile/conf/seahub_settings.py + 23
2 files to edit
root@sfile:/opt/seafile# vi /opt/seafile/conf/seahub_settings.py 
root@sfile:/opt/seafile# /opt/seafile/seafile-server-6.2.5/seahub.sh start-fastcgi

LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub (fastcgi) at 127.0.0.1:8000 ...
Traceback (most recent call last):
  File "/opt/seafile/seafile-server-6.2.5/seahub/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/seafile/seafile-server-6.2.5/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/opt/seafile/seafile-server-6.2.5/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/core/management/__init__.py", line 303, in execute
    settings.INSTALLED_APPS
  File "/opt/seafile/seafile-server-6.2.5/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/conf/__init__.py", line 48, in __getattr__
    self._setup(name)
  File "/opt/seafile/seafile-server-6.2.5/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/conf/__init__.py", line 44, in _setup
    self._wrapped = Settings(settings_module)
  File "/opt/seafile/seafile-server-6.2.5/seahub/thirdpart/Django-1.8.18-py2.7.egg/django/conf/__init__.py", line 92, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/opt/seafile/seafile-server-6.2.5/seahub/thirdpart/importlib-1.0.4-py2.6.egg/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/opt/seafile/seafile-server-6.2.5/seahub/seahub/__init__.py", line 3, in <module>
    from handlers import repo_created_cb, repo_deleted_cb
  File "/opt/seafile/seafile-server-6.2.5/seahub/seahub/handlers.py", line 4, in <module>
    import settings
  File "/opt/seafile/seafile-server-6.2.5/seahub/seahub/settings.py", line 695, in <module>
    import seahub_settings
  File "/opt/seafile/conf/seahub_settings.py", line 23
    EMAIL_USE_TLS                       = True
    ^

Edit - figured it out. Not sure why it was messed up. Just the settings file.

FastCGI isn’t recommend anymore. You should use proxy_pass.
https://manual.seafile.com/deploy/deploy_with_nginx.html

1 Like