Internal Server Error with Published Libraries

I’ve freshly installed Seafile Server CE 7.1.5, created a new library, an md file in this newly created library and published that so it shows up in “Published Libraries”. I can open that library but no file. When selecting the md file the following error appears in seahub.log:

2020-12-29 22:37:59,126 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /api/v2.1/wikis/documentation/content/
Traceback (most recent call last):
File “/usr/lib/python3.6/urllib/request.py”, line 1325, in do_open
encode_chunked=req.has_header(‘Transfer-encoding’))
File “/usr/lib/python3.6/http/client.py”, line 1281, in request
self._send_request(method, url, body, headers, encode_chunked)
File “/usr/lib/python3.6/http/client.py”, line 1327, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File “/usr/lib/python3.6/http/client.py”, line 1276, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File “/usr/lib/python3.6/http/client.py”, line 1042, in _send_output
self.send(msg)
File “/usr/lib/python3.6/http/client.py”, line 980, in send
self.connect()
File “/usr/lib/python3.6/http/client.py”, line 952, in connect
(self.host,self.port), self.timeout, self.source_address)
File “/usr/lib/python3.6/socket.py”, line 724, in create_connection
raise err
File “/usr/lib/python3.6/socket.py”, line 713, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/opt/haiwen/seafile-server-7.1.5/seahub/thirdpart/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/opt/haiwen/seafile-server-7.1.5/seahub/thirdpart/django/core/handlers/base.py”, line 249, in _legacy_get_response
response = self._get_response(request)
File “/opt/haiwen/seafile-server-7.1.5/seahub/thirdpart/django/core/handlers/base.py”, line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File “/opt/haiwen/seafile-server-7.1.5/seahub/thirdpart/django/core/handlers/base.py”, line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/opt/haiwen/seafile-server-7.1.5/seahub/thirdpart/django/views/decorators/csrf.py”, line 58, in wrapped_view
return view_func(*args, **kwargs)
File “/opt/haiwen/seafile-server-7.1.5/seahub/thirdpart/django/views/generic/base.py”, line 68, in view
return self.dispatch(request, *args, **kwargs)
File “/opt/haiwen/seafile-server-7.1.5/seahub/thirdpart/rest_framework/views.py”, line 505, in dispatch
response = self.handle_exception(exc)
File “/opt/haiwen/seafile-server-7.1.5/seahub/thirdpart/rest_framework/views.py”, line 465, in handle_exception
self.raise_uncaught_exception(exc)
File “/opt/haiwen/seafile-server-7.1.5/seahub/thirdpart/rest_framework/views.py”, line 476, in raise_uncaught_exception
raise exc
File “/opt/haiwen/seafile-server-7.1.5/seahub/thirdpart/rest_framework/views.py”, line 502, in dispatch
response = handler(request, *args, **kwargs)
File “/opt/haiwen/seafile-server-7.1.5/seahub/seahub/api2/endpoints/wiki_pages.py”, line 160, in get
file_response = urllib.request.urlopen(url)
File “/usr/lib/python3.6/urllib/request.py”, line 223, in urlopen
return opener.open(url, data, timeout)
File “/usr/lib/python3.6/urllib/request.py”, line 526, in open
response = self._open(req, data)
File “/usr/lib/python3.6/urllib/request.py”, line 544, in _open
‘_open’, req)
File “/usr/lib/python3.6/urllib/request.py”, line 504, in _call_chain
result = func(*args)
File “/usr/lib/python3.6/urllib/request.py”, line 1353, in http_open
return self.do_open(http.client.HTTPConnection, req)
File “/usr/lib/python3.6/urllib/request.py”, line 1327, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 111] Connection refused>

I’ve additionaly set the following config in seahub_settings:

FILE_SERVER_ROOT = ‘https:// seafile. example. com /seafhttp’

The original config does not include spaces. The forum does not allow me to include links.

The nginx config in the https vserver:

location /seafhttp {
    rewrite ^/seafhttp(.*)$ $1 break;
    proxy_pass http://192.168.2.9: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;
    proxy_request_buffering off;
    proxy_http_version 1.1;
    chunked_transfer_encoding on;

    send_timeout  36000s;
}

location /media {
    root /opt/haiwen/seafile-server-latest/seahub;
}

location /seafdav {
    proxy_pass         http://192.168.2.9: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;
    proxy_http_version 1.1;
    chunked_transfer_encoding on;
    client_max_body_size 0;
}

location ^~ / {
    proxy_pass         http://192.168.2.9: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;
    proxy_http_version 1.1;
    chunked_transfer_encoding on;
    proxy_read_timeout  1200s;
}

Any idea why this internal server error occurs?