Page unavailable, after update 6.3.0

Hi, after updating 6.2.5 -> 6.3 the login page is unavailable.
Seahub log:
2018-06-01 07:55:27,434 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /accounts/login/
Traceback (most recent call last):
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/core/handlers/base.py”, line 249, in _legacy_get_response
response = self._get_response(request)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/core/handlers/base.py”, line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/core/handlers/base.py”, line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/utils/decorators.py”, line 149, in _wrapped_view
response = view_func(request, *args, **kwargs)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/views/decorators/cache.py”, line 57, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File “/home/king/ezan/seafile-server-6.3.0/seahub/seahub/auth/views.py”, line 200, in login
‘login_bg_image_path’: login_bg_image_path,
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/shortcuts.py”, line 30, in render
content = loader.render_to_string(template_name, context, request, using=using)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/loader.py”, line 68, in render_to_string
return template.render(context, request)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/backends/django.py”, line 66, in render
return self.template.render(context)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/base.py”, line 207, in render
return self._render(context)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/base.py”, line 199, in _render
return self.nodelist.render(context)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/base.py”, line 990, in render
bit = node.render_annotated(context)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/base.py”, line 957, in render_annotated
return self.render(context)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/loader_tags.py”, line 154, in render
compiled_parent = self.get_parent(context)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/loader_tags.py”, line 151, in get_parent
return self.find_template(parent, context)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/loader_tags.py”, line 131, in find_template
template_name, skip=history,
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/engine.py”, line 136, in find_template
name, template_dirs=dirs, skip=skip,
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/loaders/cached.py”, line 60, in get_template
template_name, template_dirs, skip,
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/loaders/base.py”, line 44, in get_template
contents, origin, origin.template_name, self.engine,
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/base.py”, line 191, in init
self.nodelist = self.compile_nodelist()
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/base.py”, line 230, in compile_nodelist
return parser.parse()
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/base.py”, line 515, in parse
raise self.error(token, e)
TemplateSyntaxError: ‘future’ is not a registered tag library. Must be one of:
avatar_tags
cache
compress
group_avatar_tags
i18n
l10n
rest_framework
seahub_tags
static
staticfiles
statici18n
terms_tags
tz
upload_tags
webpack_loader
2018-06-01 07:55:28,024 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /favicon.ico
Traceback (most recent call last):
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/core/handlers/exception.py”, line 109, in get_exception_response
response = callback(request, **dict(param_dict, exception=exception))
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/utils/decorators.py”, line 149, in _wrapped_view
response = view_func(request, *args, **kwargs)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/views/defaults.py”, line 45, in page_not_found
body = template.render(context, request)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/backends/django.py”, line 66, in render
return self.template.render(context)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/base.py”, line 207, in render
return self._render(context)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/base.py”, line 199, in _render
return self.nodelist.render(context)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/base.py”, line 990, in render
bit = node.render_annotated(context)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/base.py”, line 957, in render_annotated
return self.render(context)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/loader_tags.py”, line 154, in render
compiled_parent = self.get_parent(context)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/loader_tags.py”, line 151, in get_parent
return self.find_template(parent, context)
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/loader_tags.py”, line 131, in find_template
template_name, skip=history,
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/engine.py”, line 136, in find_template
name, template_dirs=dirs, skip=skip,
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/loaders/cached.py”, line 60, in get_template
template_name, template_dirs, skip,
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/loaders/base.py”, line 44, in get_template
contents, origin, origin.template_name, self.engine,
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/base.py”, line 191, in init
self.nodelist = self.compile_nodelist()
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/base.py”, line 230, in compile_nodelist
return parser.parse()
File “/home/king/ezan/seafile-server-6.3.0/seahub/thirdpart/django/template/base.py”, line 515, in parse
raise self.error(token, e)
TemplateSyntaxError: ‘future’ is not a registered tag library. Must be one of:
avatar_tags
cache
compress
group_avatar_tags
i18n
l10n
rest_framework
seahub_tags
static
staticfiles
statici18n
terms_tags
tz
upload_tags
webpack_loader

I need advice how to fix it, thanks!

Can you post your config files here?

OS: CentOS 7

seahub_settings:

SECRET_KEY = “…”
FILE_SERVER_ROOT = ‘https://…/seafhttp’

FILE_PREVIEW_MAX_SIZE = 10 * 1024 * 1024 * 1024
LOGO_PATH = ‘custom/ezan-logo.gif’
LOGO_WIDTH = 63
SITE_NAME = SITE_TITLE = u’ЭЗАН сloud’
ENABLE_MAKE_GROUP_PUBLIC = True
CLOUD_MODE = True
BRANDING_CSS = ‘custom/ezan.css’
FAVICON_PATH = ‘custom/favicon.png’
LOGIN_BG_IMAGE_PATH = ‘’
DESKTOP_CUSTOM_LOGO = ‘custom/ezan-desktop.png’
DESKTOP_CUSTOM_BRAND = ‘EZAN’

ENABLE_VIDEO_THUMBNAIL = False
ENABLE_THUMBNAIL = False

EMAIL_USE_TLS = False
EMAIL_HOST = ‘…’
EMAIL_HOST_USER = ‘…’
EMAIL_HOST_PASSWORD = ‘…’
EMAIL_PORT = 25
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
SERVER_EMAIL = EMAIL_HOST_USER
TIME_ZONE = “Europe/Moscow”
DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.mysql’,
‘USER’ : ‘…’,
‘PASSWORD’ : ‘…’,
‘NAME’ : ‘seahub_db’,
‘HOST’ : ‘127.0.0.1’

 }

}
ENABLE_SETTINGS_VIA_WEB = False

ENABLE_REPO_HISTORY_SETTING = True

ENABLE_ONLYOFFICE = True
VERIFY_ONLYOFFICE_CERTIFICATE = True
ONLYOFFICE_APIJS_URL = ‘https://…/onlyofficeds/web-apps/apps/api/documents/api.js’
ONLYOFFICE_FILE_EXTENSION = (‘doc’, ‘docx’, ‘ppt’, ‘pptx’, ‘xls’, ‘xlsx’, ‘odt’, ‘fodt’, ‘odp’, ‘fodp’, ‘ods’, ‘fods’,‘csv’)
ONLYOFFICE_EDIT_FILE_EXTENSION = (‘doc’,‘xls’,‘docx’, ‘pptx’, ‘xlsx’,‘csv’)

seafile.conf:
[fileserver]
port=8082

max_download_dir_size=350

[history]
keep_days = 30

[database]
type=mysql
host=127.0.0.1
user=…
password=…
db_name=seafile_db
CONNECTION_CHARSET=utf8

All that looks correct to me. Have you disabled fastcgi and switched to WSGI?

yes, nginx config:

map $http_x_forwarded_proto $the_scheme {
default $http_x_forwarded_proto;
“” $scheme;
}

map $http_x_forwarded_host $the_host {
default $http_x_forwarded_host;
“” $host;
}

map $http_upgrade $proxy_connection {
default upgrade;
“” close;
}

server {
listen 80;

    server_name  ...;

    rewrite ^ https://$http_host$request_uri? permanent;    # force redirect http to https
    server_tokens off;
    }

server {
listen 443;

    ssl on;
    ssl_certificate /etc/letsencrypt/live/.../fullchain.pem; 
    ssl_certificate_key /etc/letsencrypt/live/.../privkey.pem;
    server_name ...;
    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 30m;
    
    # Diffie-Hellman parameter for DHE ciphersuites, recommended 2048 bits
    ssl_dhparam /etc/nginx/dhparam.pem;
    
    # secure settings (A+ at SSL Labs ssltest at time of writing)
    # see https://wiki.mozilla.org/Security/Server_Side_TLS#Nginx
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-CAMELLIA256-SHA:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-SEED-SHA:DHE-RSA-CAMELLIA128-SHA:HIGH:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS';
ssl_prefer_server_ciphers on;

    proxy_set_header X-Forwarded-For $remote_addr;

    add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
    server_tokens off;
#
# seahub
#
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 REQUEST_METHOD $request_method;
     #fastcgi_param QUERY_STRING $query_string;
     #fastcgi_param SERVER_ADDR $server_addr;
     #fastcgi_param SERVER_NAME $server_name;
     #fastcgi_param SERVER_PORT $server_port;
     #fastcgi_param SERVER_PROTOCOL $server_protocol;
     #fastcgi_param CONTENT_TYPE $content_type;
     #fastcgi_param CONTENT_LENGTH $content_length;
     #fastcgi_pass_header Authorization;
     #fastcgi_intercept_errors off;
     #fastcgi_param HTTPS $https;
     #fastcgi_param HTTP_SCHEME https;
     #fastcgi_param REMOTE_ADDR $remote_addr;
     #fastcgi_read_timeout 36000;
     
 if ($request_method = 'OPTIONS') {
    add_header 'Access-Control-Allow-Origin' '*';
    add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
    add_header 'Access-Control-Allow-Headers' 'Authorization';
    add_header 'Access-Control-Max-Age' 1728000;
    add_header 'Content-Type' 'text/plain; charset=utf-8';
    add_header 'Content-Length' 0;
    return 204;
 }
     
     #if ($request_uri ~ '^/api2/') {
     add_header 'Access-Control-Allow-Origin' '*';
     add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
     add_header 'Access-Control-Allow-Headers' 'Authorization';
     #}

     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_set_header   X-Forwarded-Proto https;
     #uwsgi_pass_header Authorization;
     #uwsgi_pass_request_headers on;
     #proxy_set_header Authorization $http_authorization;
     #proxy_pass_header  Authorization;
     proxy_http_version 1.1;

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

     proxy_read_timeout  1200s;

     client_max_body_size 0;
}
#
# seafile
#
location /seafhttp {
    rewrite ^/seafhttp(.*)$ $1 break;
    proxy_pass http://127.0.0.1:8082;
    client_max_body_size 0;
    proxy_connect_timeout  36000s;
    proxy_read_timeout  36000s;
    proxy_send_timeout  36000s;
    send_timeout  36000s;
#proxy_request_buffering off;
proxy_http_version 1.1;
}

location /media {
    root /home/king/ezan/seafile-server-latest/seahub;
}
#
# onlyofficeds
#
location /onlyofficeds/ {
# IMPORTANT ! - Trailing slash !
proxy_pass http://127.0.0.1:88/;

proxy_http_version 1.1;
client_max_body_size 100M; # Limit Document size to 100MB
proxy_read_timeout 3600s;
proxy_connect_timeout 3600s;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
# IMPORTANT ! - Subfolder and NO trailing slash !
proxy_set_header X-Forwarded-Host $the_host/onlyofficeds;
proxy_set_header X-Forwarded-Proto $the_scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

}

Your config looks fine to me. I’m assuming you also changed the startup scripts to disable fastcgi as well. This may be a bug. I will dig deeper tomorrow after some rest.

This seems to be exactly my problem. @WaterMan Have u found a solution?

I had a problem with the customize html. Removed it from seahub-data\custom and everything worked.

1 Like

Great, this solved my problem! I did some minor customizations too, reverted them and everything is fine now.

Thx!