7.1.5 seahub 启动失败。

从7.05升级7.15 后出错。

[root@localhost seafile-server-latest]# ./seahub.sh start

LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub at port 8000 …
Traceback (most recent call last):
File “/opt/seafile/seafile-server-7.1.5/seahub/thirdpart/bin/gunicorn”, line 8, in
sys.exit(run())
File “/opt/seafile/seafile-server-7.1.5/seahub/thirdpart/gunicorn/app/wsgiapp.py”, line 58, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File “/opt/seafile/seafile-server-7.1.5/seahub/thirdpart/gunicorn/app/base.py”, line 228, in run
super().run()
File “/opt/seafile/seafile-server-7.1.5/seahub/thirdpart/gunicorn/app/base.py”, line 72, in run
Arbiter(self).run()
File “/opt/seafile/seafile-server-7.1.5/seahub/thirdpart/gunicorn/arbiter.py”, line 58, in init
self.setup(app)
File “/opt/seafile/seafile-server-7.1.5/seahub/thirdpart/gunicorn/arbiter.py”, line 118, in setup
self.app.wsgi()
File “/opt/seafile/seafile-server-7.1.5/seahub/thirdpart/gunicorn/app/base.py”, line 67, in wsgi
self.callable = self.load()
File “/opt/seafile/seafile-server-7.1.5/seahub/thirdpart/gunicorn/app/wsgiapp.py”, line 49, in load
return self.load_wsgiapp()
File “/opt/seafile/seafile-server-7.1.5/seahub/thirdpart/gunicorn/app/wsgiapp.py”, line 39, in load_wsgiapp
return util.import_app(self.app_uri)
File “/opt/seafile/seafile-server-7.1.5/seahub/thirdpart/gunicorn/util.py”, line 358, in import_app
mod = importlib.import_module(module)
File “/usr/lib64/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 665, in _load_unlocked
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/opt/seafile/seafile-server-7.1.5/seahub/seahub/wsgi.py”, line 25, in
application = get_wsgi_application()
File “/opt/seafile/seafile-server-7.1.5/seahub/thirdpart/django/core/wsgi.py”, line 13, in get_wsgi_application
django.setup(set_prefix=False)
File “/opt/seafile/seafile-server-7.1.5/seahub/thirdpart/django/init.py”, line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File “/opt/seafile/seafile-server-7.1.5/seahub/thirdpart/django/apps/registry.py”, line 108, in populate
app_config.import_models()
File “/opt/seafile/seafile-server-7.1.5/seahub/thirdpart/django/apps/config.py”, line 202, in import_models
self.models_module = import_module(models_module_name)
File “/usr/lib64/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 665, in _load_unlocked
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/opt/seafile/seafile-server-7.1.5/seahub/thirdpart/registration/models.py”, line 13, in
from seahub.base.accounts import User
File “/opt/seafile/seafile-server-7.1.5/seahub/seahub/base/accounts.py”, line 27, in
from seahub.utils.mail import send_html_email_with_dj_template, MAIL_PRIORITY
File “/opt/seafile/seafile-server-7.1.5/seahub/seahub/utils/mail.py”, line 4, in
from post_office import mail
File “/opt/seafile/seafile-server-7.1.5/seahub/thirdpart/post_office/mail.py”, line 12, in
from .models import Email, EmailTemplate, Log, PRIORITY, STATUS
File “/opt/seafile/seafile-server-7.1.5/seahub/thirdpart/post_office/models.py”, line 14, in
from post_office import cache
File “/opt/seafile/seafile-server-7.1.5/seahub/thirdpart/post_office/cache.py”, line 7, in
cache_backend = get_cache_backend()
File “/opt/seafile/seafile-server-7.1.5/seahub/thirdpart/post_office/settings.py”, line 58, in get_cache_backend
return caches[“default”]
File “/opt/seafile/seafile-server-7.1.5/seahub/thirdpart/django/core/cache/init.py”, line 80, in getitem
cache = _create_cache(alias)
File “/opt/seafile/seafile-server-7.1.5/seahub/thirdpart/django/core/cache/init.py”, line 55, in _create_cache
return backend_cls(location, params)
File “/opt/seafile/seafile-server-7.1.5/seahub/thirdpart/django/core/cache/backends/memcached.py”, line 162, in init
import memcache
ModuleNotFoundError: No module named ‘memcache’
Error:Seahub failed to start.
Please try to run “./seahub.sh start” again

nginx 下的seafile.conf
server {

listen 88;
server_name 192.168.1.106;

proxy_set_header X-Forwarded-For $remote_addr;

location / {

     proxy_pass         http://127.0.0.1:8000;

     proxy_set_header   Host $host;

     proxy_set_header   X-Real-IP $remote_addr;

     proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;

     proxy_set_header   X-Forwarded-Host $server_name;

     proxy_read_timeout  1200s;
     # used for view/edit office file via Office Online Server

     client_max_body_size 0;
     access_log      /var/log/nginx/seahub.access.log;

     error_log       /var/log/nginx/seahub.error.log;

}

If you are using FastCGI,

which is not recommended, you should use the following config for location /.

location / {

fastcgi_pass 127.0.0.1:8000;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

fastcgi_param PATH_INFO $fastcgi_script_name;

fastcgi_param SERVER_PROTOCOL $server_protocol;

fastcgi_param QUERY_STRING $query_string;

fastcgi_param REQUEST_METHOD $request_method;

fastcgi_param CONTENT_TYPE $content_type;

fastcgi_param CONTENT_LENGTH $content_length;

fastcgi_param SERVER_ADDR $server_addr;

fastcgi_param SERVER_PORT $server_port;

fastcgi_param SERVER_NAME $server_name;

fastcgi_param REMOTE_ADDR $remote_addr;

fastcgi_read_timeout 36000;

client_max_body_size 0;

access_log /var/log/nginx/seahub.access.log;

error_log /var/log/nginx/seahub.error.log;

}

location /seafhttp {

    rewrite ^/seafhttp(.*)$ $1 break;

    proxy_pass http://127.0.0.1:8082;

    client_max_body_size 0;

    proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_connect_timeout  36000s;

    proxy_read_timeout  36000s;

    proxy_send_timeout  36000s;
    send_timeout  36000s;

}

location /media {

    root /opt/seafile/seafile-server-latest/seahub;

}

location /seafdav {

    proxy_pass         http://127.0.0.1:8080/seafdav;

    proxy_set_header   Host $host;

    proxy_set_header   X-Real-IP $remote_addr;

    proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;

    proxy_set_header   X-Forwarded-Host $server_name;

    proxy_set_header   X-Forwarded-Proto $scheme;

    proxy_read_timeout  1200s;

    client_max_body_size 0;
    access_log      /var/log/nginx/seafdav.access.log seafileformat;

    error_log       /var/log/nginx/seafdav.error.log;

}

}