Internal Server error but no error in the logs

Hi

This is my first Seafile installation and I cannot find the cause/error why it does not work. I will really appreciate it if someone can point me in the right direction on how to troubleshoot this.

My setup in Ubuntu 20, Nginx, MariaDB 10.3.25

I followed these instructions: https ://manual.seafile.com/deploy/using_mysql/

But when I connect with my browser I get “Internal Server Error”

The logs:

cat controller.log
[01/25/21 14:01:59] seafile-controller.c(189): starting seaf-server ...
[01/25/21 14:01:59] seafile-controller.c(80): spawn_process: seaf-server -F /opt/seafile/conf -c /opt/seafile/ccnet -d /opt/seafile/seafile-data -l /opt/seafile/logs/seafile.log -P /opt/seafile/pids/seaf-server.pid -p /opt/seafile/seafile-server-8.0.2/runtime
[01/25/21 14:01:59] seafile-controller.c(114): spawned seaf-server, pid 152615
root@vmi501259:/opt/seafile/logs# cat seafile.log
[01/25/21 14:01:59] ../common/seaf-utils.c(333): Use database Mysql
[01/25/21 14:01:59] http-server.c(181): fileserver: worker_threads = 10
[01/25/21 14:01:59] http-server.c(196): fileserver: fixed_block_size = 8388608
[01/25/21 14:01:59] http-server.c(211): fileserver: web_token_expire_time = 3600
[01/25/21 14:01:59] http-server.c(226): fileserver: max_indexing_threads = 1
[01/25/21 14:01:59] http-server.c(241): fileserver: max_index_processing_threads= 3
[01/25/21 14:01:59] http-server.c(263): fileserver: cluster_shared_temp_file_mode = 600
[01/25/2021 02:18:58 PM] start to serve on pipe client
[01/25/2021 03:48:30 PM] start to serve on pipe client
[01/25/2021 03:51:57 PM] start to serve on pipe client
[01/25/2021 03:56:32 PM] start to serve on pipe client
[01/25/2021 04:08:12 PM] start to serve on pipe client
[01/25/2021 04:13:51 PM] start to serve on pipe client
[01/25/2021 04:16:29 PM] start to serve on pipe client

seahub.log is empty
seafhttp.error.log is empty

tail -f seahub.access.log
- ********* [25/Jan/2021:20:03:16 +0100] "GET / HTTP/2.0" 500 141 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0" 0.008
tail -f seahub.error.log

Doesn’t move when I access the URL in my webbrowser that display “Internal Server Error”.

Any advise what else I could try or look at?

I noticed that the config is port 8000 and in nginx it is 8082. Are they supposed to be the same?

The content of my gunicorn.conf.py is


import os

daemon = True
workers = 5

# default localhost:8000
bind = "127.0.0.1:8000"

# Pid
pids_dir = '/opt/seafile/pids'
pidfile = os.path.join(pids_dir, 'seahub.pid')

# for file upload, we need a longer timeout value (default is only 30s, too short)
timeout = 1200

limit_request_line = 8190

It is still the default settings I have not touched.

My nginx config is:

log_format seafileformat '$http_x_forwarded_for $remote_addr [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" $upstream_response_time';

server {
    listen       80;
    server_name cloud.*****.net.za;
    rewrite ^ https://$http_host$request_uri? permanent;    # force redirect http to https

    # Enables or disables emitting nginx version on error pages and in the "Server" response header field.
    server_tokens off;
}

server {
	listen 443 http2;
	listen [::]:443 http2;

    server_name cloud.******.net.za;

    proxy_set_header X-Forwarded-For $remote_addr;

    ssl_certificate /etc/letsencrypt/live/*******/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/*********/privkey.pem; # managed by Certbot
	add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
	server_tokens off;

    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 seafileformat;
         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;
	proxy_request_buffering off;

        send_timeout  36000s;

        access_log      /var/log/nginx/seafhttp.access.log seafileformat;
        error_log       /var/log/nginx/seafhttp.error.log;
    }

    location /media {
        root /var/seahub;
    }
}

(I just masked out **** some sensitive info)

@Cisco thank you for pointing out my error. I changed it to:

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

but it made no difference after the nginx restart.

I changed the binding address as instructed. I also turned off my firewall just in case it interferes, but unfortunately I still get “Internal Server Error”.

This is on port 8000.

I have dropped all the databases and deleted all the seafile files and restart the installation but this time with the old version 7 server. After the installation I got at least some error messages (I think version 8 has a bug here that does not log error messages) that showed the some captcha module was missing (although I did install it). After a few hours of Googling I found this command solved it for me:

pip3 install --ignore-installed --timeout=3600 Pillow captcha jinja2 sqlalchemy psd-tools django-pylibmc python3-ldap

The important part is the --ignore-installed parameter.

@Cisco Thank you for all your help. I really appreciate it.

  1. Which version are you using?
  2. Would you consider version 8 stable? Should I give it another shot or stay at version 7 (which currently works).
  3. If you are using version 8, do you see your Seafile log entries. Mine is just blank and that is why I couldn’t figure out what was wrong until I downgraded. If I ever run into another issue again, I would at least like to see an error message not just “Internal Server Error”.

@Cisco

Nevermind, I see you are using version 7.1.9.

  1. How did you change the theme? I didn’t know you could do that? It looks pretty cool. Is is that the difference between the Pro and CE?
  2. Also I noticed your Wiki is working. Mine just loads forever for some reason. I will probably open a new topic for that but it is not urgent. It is actually a bonus that Seafile can do that too. I just want to securely sync files on my devices over the internet for now.
  3. I’m using 7.1.5 CE. Where did you download 7.1.9?