After upgrade to 6.2.4 from 6.1.2, Can't sync with server

Following the instructions during the upgrade to 6.2, I followed the instructions to use WSGI mode in the server upgrade instructions. However, I cannot connect via the web interface or the client. The web interface delays for a long time and finally returns a 504 Gateway Time-Out. Seafile logs show that seafile.sh and seahub.sh start successfully. It appears to be a problem with NGINX… Here is my NGINX config file for that particular site, and the only NGINX file I edited during the upgrade. The Fast-CGI stuff is commented out since I switched to WSGI mode as advised in the upgrade instructions. Please advise…

You should look at the following URL’s in order to grasp a solid understanding

of Nginx configuration files in order to fully unleash the power of Nginx.

http://wiki.nginx.org/Pitfalls

http://wiki.nginx.org/QuickStart

http://wiki.nginx.org/Configuration

Generally, you will want to move this file somewhere, and start with a clean

file but keep this around for reference. Or just disable in sites-enabled.

Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.

Debian Seafile server configuration

server {
listen 21001;
server_name something.sample.com;

proxy_set_header X-Forwarded-For $remote_addr;

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;

    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;
fastcgi_read_timeout 36000;
}

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;
}

location /media {
    root /home/Seafile-Server/seafile-server-latest/seahub;
}

location /seafdav {
    fastcgi_pass    127.0.0.1:8080;
    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;

    client_max_body_size 0;

    access_log      /var/log/nginx/seafdav.access.log;
    error_log       /var/log/nginx/seafdav.error.log;
}

}

I copied and pasted in the thread, but for whatever reason, it seems to have thrown the formatting off… Don’t know what happened, but it’s all there.

Here is what the NGINX seahub.error.log is reporting. The IP address and domain name have been masked, btw.

2018/01/29 13:02:03 [error] 654#654: *110 upstream timed out (110: Connection timed out) while reading response header from upstream, client: XXX.XXX.XXX.XXX, server: something.sample.com, request: “GET /api2/repos/ HTTP/1.1”, upstream: “http://127.0.0.1:8000/api2/repos/”, host: "something.sample.com:21001

And, I can no longer edit to get the formatting right… It appears that the “#” symbol in my NGINX file is not coming across in the post, and removes it in the post… When I try to edit it to put the pounds back in, I get an error stating that new users can only post 2 links. So, I can’t edit it.

Close this one out as solved. Although I’m using systemd, I found a seafile-server file in the init.d folder, and it was set up for fastcgi=true. I’m not certain how this happened, but I would prefer to use systemd rather than init.d, but it appears that on boot, it’s defaulting to init.d.