No access to seafile-server after upgrade to 6.2.2

Hi,

today I´ve upgraded from 6.1.1 to 6.2.2 (raspi edition). The update-script procedure went without an error. But since I´ve made the recommended changes (https://github.com/haiwen/seafile-rpi/releases/tag/v6.2.2) I get an error whenever I want to start the seafile-server

seafile-server start results in:
Job for seafile-server.service failed. See 'systemctl status seafile-server.service' and 'journalctl -xn' for details.

sudo systemctl status seafile-server.service

 seafile-server.service - LSB: Starts Seafile Server
   Loaded: loaded (/etc/init.d/seafile-server)
   Active: failed (Result: exit-code) since Sa 2017-09-30 14:52:18 CEST; 45s ago
  Process: 6793 ExecStop=/etc/init.d/seafile-server stop (code=exited, status=0/SUCCESS)
  Process: 7778 ExecStart=/etc/init.d/seafile-server start (code=exited, status=1/FAILURE)

Sep 30 14:52:18 pi31 sudo[7781]: root : TTY=unknown ; PWD=/ ; USER=pi ; COMMAND=/mnt/pidrive/seafile/seafile-server...h start
Sep 30 14:52:18 pi31 sudo[7781]: pam_unix(sudo:session): session opened for user pi by (uid=0)
Sep 30 14:52:18 pi31 sudo[7781]: pam_unix(sudo:session): session closed for user pi
Sep 30 14:52:18 pi31 sudo[7794]: root : TTY=unknown ; PWD=/ ; USER=pi ; COMMAND=/mnt/pidrive/seafile/seafile-server...h start
Sep 30 14:52:18 pi31 sudo[7794]: pam_unix(sudo:session): session opened for user pi by (uid=0)
Sep 30 14:52:18 pi31 seafile-server[7778]: /mnt/pidrive/seafile/seafile-server-latest/seahub.sh: Zeile 209: Warnung:…gefunden
Sep 30 14:52:18 pi31 sudo[7794]: pam_unix(sudo:session): session closed for user pi
Sep 30 14:52:18 pi31 systemd[1]: seafile-server.service: control process exited, code=exited status=1
Sep 30 14:52:18 pi31 systemd[1]: Failed to start LSB: Starts Seafile Server.
Sep 30 14:52:18 pi31 systemd[1]: Unit seafile-server.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.

If I start seahub manually (without the fastcgi argument) I can access my seafile website from the internal but not the external network (http://192.168.2.220:8000 still works). Looks like I´ve made a mistake while switching from fastcgi to WSGI.
I´ve also set the value for ‘fastci’ from ‘true’ to ‘false’ in /etc/init.d/seafile-server

Here´s the “old” nginx-site with fastcgi and seafile 6.1.1:

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_param   HTTPS               on;                                                                                         
            fastcgi_param   HTTP_SCHEME         https;                                                                                      
                                                                                                                                            
            access_log                  /var/log/nginx/seahub.access.log;                                                                   
            error_log                   /var/log/nginx/seahub.error.log;                                                                    
            fastcgi_read_timeout        36000;                                                                                              
        
}        

and here the new one with WSGI and 6.2.2 (like in the release notes):

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

What sould I do to get my seafile service back running?

Post how this looks like… Post the entirely seafile-server init.d script as well.
You can debug this by starting seafile with seafile.sh start with the properly user. This is very important. The user should be the same than the seafile directory. After that try with seahub.sh start

In which port/s listen nginx?
With which user do you start seafile?
post your ccnet.conf and seahub_settingy.py without passworts

Thanks for the fast reply:

here is my /etc/init.d/seafile-server

#!/bin/sh

### BEGIN INIT INFO
# Provides:          seafile-server
# Required-Start:    $local_fs $remote_fs $network mysql
# Required-Stop:     $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Starts Seafile Server
# Description:       starts Seafile Server
### END INIT INFO

# Change the value of "user" to linux user name who runs seafile
user=pi

# Change the value of "seafile_dir" to your path of seafile installation
# usually the home directory of $user
seafile_dir=/mnt/pidrive/seafile
script_path=${seafile_dir}/seafile-server-latest
seafile_init_log=${seafile_dir}/logs/seafile.init.log
seahub_init_log=${seafile_dir}/logs/seahub.init.log

# Change the value of fastcgi to true if fastcgi is to be used
fastcgi=false
# Set the port of fastcgi, default is 8000. Change it if you need different.
fastcgi_port=8000

#
# Write a polite log message with date and time
#
echo -e "\n \n About to perform $1 for seafile at `date -Iseconds` \n " >> ${seafile_init_log}
echo -e "\n \n About to perform $1 for seahub at `date -Iseconds` \n " >> ${seahub_init_log}

case "$1" in
        start)
                sudo -u ${user} ${script_path}/seafile.sh ${1} >> ${seafile_init_log}
                if [ $fastcgi = true ];
                then
                        sudo -u ${user} ${script_path}/seahub.sh ${1}-fastcgi ${fastcgi_port} >> ${seahub_init_log}
                else
                        sudo -u ${user} ${script_path}/seahub.sh ${1} >> ${seahub_init_log}
                fi
        ;;
        restart)
                sudo -u ${user} ${script_path}/seafile.sh ${1} >> ${seafile_init_log}
                if [ $fastcgi = true ];
                then
                        sudo -u ${user} ${script_path}/seahub.sh ${1}-fastcgi ${fastcgi_port} >> ${seahub_init_log}
                else
                        sudo -u ${user} ${script_path}/seahub.sh ${1} >> ${seahub_init_log}
                fi
        ;;
        stop)
                sudo -u ${user} ${script_path}/seahub.sh ${1} >> ${seahub_init_log}
                sudo -u ${user} ${script_path}/seafile.sh ${1} >> ${seafile_init_log}
        ;;
        *)
                echo "Usage: /etc/init.d/seafile-server {start|stop|restart}"
                exit 1
        ;;
esac

Debugging
When I start seahub via seahub.sh stop it says: Seahub is not running. Done
And If I want to start it Seahub is already running this seems fishy.
Everything so far as user “pi”. Except the nginx everything shall be run as user pi.
Starting and stopping seafile via ./seafile.sh start/stop seems fine.

nginx
it listens on port 80 and 443 (with a instant 301 redirect to https)

configs
ccnet.conf

[General]
USER_NAME = SeaFile
ID = 000someIDfff
NAME = SeaFile
# SERVICE_URL = https://mydomain.eu:8000
SERVICE_URL = https://mydomain.eu


[Client]
PORT = 13419

[Database]
ENGINE = mysql
HOST = 127.0.0.1
PORT = 3306
USER = seafile
PASSWD = somepassword
DB = ccnet-db
CONNECTION_CHARSET = utf8

seahub_settings.py

SECRET_KEY = "someKey"

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'seahub-db',
        'USER': 'seafile',
        'PASSWORD': 'somepassword',
        'HOST': '127.0.0.1',
        'PORT': '3306'
    }
}

# Lines after this one are edited by the user

FILE_SERVER_ROOT = 'https://mydomain.eu/seafhttp'

CACHES = { 
	'default': { 
		'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 
		'LOCATION': '127.0.0.1:11211', 
	} 
}

SITE_NAME = 'My SeaFile'
SITE_TITLE = 'SeaFile'

# Logo Directory /seafile/seahub-data/custom
# LOGO_PATH = 'custom/logo.png'
# LOGO_WIDTH = 256
# LOGO_HEIGHT = 64

EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'johndoe@gmail.com'
EMAIL_HOST_PASSWORD = 'somepassword'
EMAIL_PORT = 587
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
SERVER_EMAIL = EMAIL_HOST_USER

# Change file Enconding
FILE_ENCODING_LIST = ['auto', 'utf-8', 'gbk', 'ISO-8859-1', 'ISO-8859-5']
FILE_ENCODING_TRY_LIST = ['utf-8', 'gbk']

And here is my nginx-site if you´d like:

server {                                                                                                                                    
        listen          80;                                                                                                                 
        server_name     mydomain.eu;                                                                                                         
        return          301 https://$host$request_uri;  #Redirect to HTTPS                                                                  
}                                                                                                                                           
                                                                                                                                            
# For major security reason use SSL at all time                                                                                             

server {                                                                                                                                    
        listen                  443;                                                                                                        
        ssl                     on;                                                                                                         
        ssl_certificate         /etc/letsencrypt/live/mydomain.eu/fullchain.pem;         # Public Cert                                       
        ssl_certificate_key     /etc/letsencrypt/live/mydomain.eu/privkey.pem;           # Private Key                                       
        ssl_dhparam             /etc/nginx/ssl/dhparam4096.pem;				# DH-Exchange Key                                   
                                                                                                                                            
        ssl_session_cache       builtin:1000 shared:SSL:10m;                                                                                
        ssl_protocols           TLSv1.2;						# TLSv1 TLSv1.1                                                    
                                                                                                                                            
        # Only allow seucre cypher suites                                                                                                   
        ssl_ciphers             'kEECDH+ECDSA+AES128 kEECDH+ECDSA+AES256 kEECDH+AES128 kEECDH+AES256 kEDH+AES128 kEDH+AES256 HA !aNULL !eNULL !LOW !kECDH !DSS !MD5 !EXP !PSK !SRP !CAMELLIA !SEED';                                                                     
                                                                                                                                            
        ssl_stapling on;                                                                                                                    
        ssl_prefer_server_ciphers on;                                                                                                       
                                                                                                                                            
        server_name             mydomain.eu;                                                                                                 
        proxy_set_header        X-Forwarded-For $remote_addr;                                                                               

        server_tokens           off;                                                                                                        
        add_header Strict-Transport-Security                                                                                                
                                "max-age=31536000; includeSubDomains";                                                                      

	# Make Cookies Secure
	proxy_cookie_domain ~(?P<secure_domain>([-0-9a-z]+\.)?[-0-9a-z]+\.[a-z]+)$ "$secure_domain; secure";

	# HTTP Error Pages
	error_page 404 500 502 503 504 /custom_error.html;
	location = /custom_error.html {
		root /usr/share/nginx/html;
		internal;
	}

	# Error Test
	location /error {
		return 404;
	}                                                                                                                           
	
	# Seafile root doamin configuration
        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;                                                                    
		#fastcgi_read_timeout        36000;                                                                                              
        
}        

# Redirect location for 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;
	}
                                                                                                                                            
# Location to data directory                                                                                                                
                                                                                                                                            
   location /media {                                                                                                                        
            root /mnt/pidrive/seafile/seafile-server-latest/seahub;                                                                         
        }
}

which nginx vesion do you have?

I think is a problem of the sytemctl controller which doesn’t realize that the process is up.

You have a init.d script but you use a sysctl. Try with pure sysctl scripts.

Create then both on following directories:

root@hiperborea /etc/systemd/system # cat seahub.service
[Unit]
Description=Seahub Service
After=network.target memcached.service seafile.service

[Service]
ExecStart=/media/sda/seafile/seafile-server-latest/seahub.sh start
ExecStop=/media/sda/seafile/seafile-server-latest/seahub.sh stop
User=seafile
Group=nogroup
Type=oneshot
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
root@hiperborea /etc/systemd/system # cat seafile.service
[Unit]
Description=Seafile Server
# add mysql.service or postgresql.service depending on your database to the line below
After=network.target mysql.service

[Service]
Type=oneshot
ExecStart=/media/sda/seafile/seafile-server-latest/seafile.sh start
ExecStop=/media/sda/seafile/seafile-server-latest/seafile.sh stop
RemainAfterExit=yes
User=seafile
Group=nogroup

[Install]
WantedBy=multi-user.target

Change user seafile to user pi and the paths
Then:

$>sudo systemctl enable seahub.service
$>sudo systemctl enable seafile.service
$>sudo systemctl daemon-reload

Every time you have to use now service seafile start and then service seahub start and later to stop service seahub stop and service seafile stop

Independently I don’t know why you network can only be accessed from internal lan. The ccnet.conf and other configuration look like good.

These should be the rights of the seahub.service and seafile.service:
-rw-r--r-- 1 root root 399 Mai 23 2016 seafile.service
Don’t forget to deactivate your “seafile server” init.d script. Try to reboot the system as well.

I´m using nginx 1.6.2
I´ve made the changes and so far every ‘service xyz’ status looks good/green/running after a reboot. Somehow I still get the error-page from nginx (individual error page from my config).

That´s my error.log for nginx:

2017/09/30 18:12:37 [alert] 8333#0: *1615 open socket #26 left in connection 3
2017/09/30 18:12:37 [alert] 8336#0: *1764 open socket #24 left in connection 3
2017/09/30 18:12:37 [alert] 8333#0: *1609 open socket #24 left in connection 6
2017/09/30 18:12:37 [alert] 8336#0: *1762 open socket #20 left in connection 7
2017/09/30 18:12:37 [alert] 8333#0: *7 open socket #29 left in connection 8
2017/09/30 18:12:37 [alert] 8336#0: *63 open socket #30 left in connection 9
2017/09/30 18:12:37 [alert] 8333#0: *8 open socket #30 left in connection 9
2017/09/30 18:12:37 [alert] 8336#0: *64 open socket #31 left in connection 10
2017/09/30 18:12:37 [alert] 8333#0: *9 open socket #31 left in connection 10
2017/09/30 18:12:37 [alert] 8333#0: *13 open socket #32 left in connection 11
2017/09/30 18:12:37 [alert] 8336#0: aborting
2017/09/30 18:12:37 [alert] 8333#0: aborting
2017/09/30 18:12:37 [alert] 8335#0: *10 open socket #22 left in connection 3
2017/09/30 18:12:37 [alert] 8335#0: *11 open socket #23 left in connection 4
2017/09/30 18:12:37 [alert] 8335#0: *12 open socket #26 left in connection 5
2017/09/30 18:12:37 [alert] 8335#0: *15 open socket #27 left in connection 6
2017/09/30 18:12:37 [alert] 8335#0: *16 open socket #28 left in connection 7
2017/09/30 18:12:37 [alert] 8335#0: *17 open socket #29 left in connection 8
2017/09/30 18:12:37 [alert] 8335#0: *1607 open socket #31 left in connection 10
2017/09/30 18:12:37 [alert] 8335#0: *1606 open socket #30 left in connection 12
2017/09/30 18:12:37 [alert] 8335#0: *1610 open socket #35 left in connection 13
2017/09/30 18:12:37 [alert] 8335#0: *1608 open socket #34 left in connection 14
2017/09/30 18:12:37 [alert] 8335#0: *1611 open socket #36 left in connection 15
2017/09/30 18:12:37 [alert] 8335#0: *1612 open socket #37 left in connection 16
2017/09/30 18:12:37 [alert] 8335#0: *1613 open socket #38 left in connection 17
2017/09/30 18:12:37 [alert] 8335#0: *1614 open socket #39 left in connection 18
2017/09/30 18:12:37 [alert] 8335#0: *1616 open socket #40 left in connection 19
2017/09/30 18:12:37 [alert] 8335#0: *1617 open socket #41 left in connection 20
2017/09/30 18:12:37 [alert] 8335#0: aborting
2017/09/30 18:13:23 [error] 920#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 111.222.333.76, server: somedomain.eu, request: "GET /seafhttp/repo/fff50b9a-1886-46a9-8445-c363230aea42/commit/HEAD HTTP/1.1", upstream: "http://127.0.0.1:8082/repo/fff50b9a-1886-46a9-8445-c363230aea42/commit/HEAD", host: "somedomain.eu"
2017/09/30 18:13:26 [error] 919#0: send() failed (111: Connection refused) while resolving, resolver: 127.0.0.1:53
2017/09/30 18:14:02 [error] 922#0: send() failed (111: Connection refused) while resolving, resolver: 127.0.0.1:53

access.log

111.111.111.111 - - [30/Sep/2017:18:12:11 +0200] "GET /seafhttp/repo/492c04d3-c7a1-4470-bddd-a26b9202680d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:12:11 +0200] "GET /seafhttp/repo/4d867114-adf5-4e5f-bc95-3a3cd4b7805a/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:12:11 +0200] "GET /seafhttp/repo/75a2d154-23f8-42ab-bf8d-1cfad3870823/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:12:11 +0200] "GET /seafhttp/repo/13062c20-5c5a-4e0e-a838-cfe1b0e7c99d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:12:20 +0200] "GET /seafhttp/repo/fff50b9a-1886-46a9-8445-c363230aea42/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:13:23 +0200] "GET /seafhttp/repo/fff50b9a-1886-46a9-8445-c363230aea42/commit/HEAD HTTP/1.1" 502 456 "-" "Seafile/6.1.0 (Windows NT)"
222.222.222.222 - - [30/Sep/2017:18:13:26 +0200] "GET / HTTP/1.1" 502 456 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
222.222.222.222 - - [30/Sep/2017:18:13:28 +0200] "GET /favicon.ico HTTP/1.1" 502 456 "https://somedomain.eu/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
222.222.222.222 - - [30/Sep/2017:18:13:43 +0200] "GET / HTTP/1.1" 502 456 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
222.222.222.222 - - [30/Sep/2017:18:13:43 +0200] "GET /favicon.ico HTTP/1.1" 502 456 "https://somedomain.eu/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
111.111.111.111 - - [30/Sep/2017:18:13:43 +0200] "GET /seafhttp/repo/4d867114-adf5-4e5f-bc95-3a3cd4b7805a/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:13:44 +0200] "GET /seafhttp/repo/13062c20-5c5a-4e0e-a838-cfe1b0e7c99d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:13:44 +0200] "GET /seafhttp/repo/492c04d3-c7a1-4470-bddd-a26b9202680d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:13:44 +0200] "GET /seafhttp/repo/75a2d154-23f8-42ab-bf8d-1cfad3870823/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
222.222.222.222 - - [30/Sep/2017:18:13:45 +0200] "GET / HTTP/1.1" 502 456 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
222.222.222.222 - - [30/Sep/2017:18:13:45 +0200] "GET /favicon.ico HTTP/1.1" 502 456 "https://somedomain.eu/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
222.222.222.222 - - [30/Sep/2017:18:13:45 +0200] "GET / HTTP/1.1" 502 456 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
222.222.222.222 - - [30/Sep/2017:18:13:45 +0200] "GET /favicon.ico HTTP/1.1" 502 456 "https://somedomain.eu/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
222.222.222.222 - - [30/Sep/2017:18:13:46 +0200] "GET / HTTP/1.1" 502 456 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
222.222.222.222 - - [30/Sep/2017:18:13:46 +0200] "GET /favicon.ico HTTP/1.1" 502 456 "https://somedomain.eu/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
111.111.111.111 - - [30/Sep/2017:18:13:53 +0200] "GET /seafhttp/repo/fff50b9a-1886-46a9-8445-c363230aea42/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
222.222.222.222 - - [30/Sep/2017:18:13:56 +0200] "GET / HTTP/1.1" 502 456 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
222.222.222.222 - - [30/Sep/2017:18:13:56 +0200] "GET /favicon.ico HTTP/1.1" 502 456 "https://somedomain.eu/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
222.222.222.222 - - [30/Sep/2017:18:13:57 +0200] "GET / HTTP/1.1" 502 456 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
222.222.222.222 - - [30/Sep/2017:18:13:57 +0200] "GET /favicon.ico HTTP/1.1" 502 456 "https://somedomain.eu/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
222.222.222.222 - - [30/Sep/2017:18:14:03 +0200] "GET / HTTP/1.1" 502 456 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
222.222.222.222 - - [30/Sep/2017:18:14:04 +0200] "GET /favicon.ico HTTP/1.1" 502 456 "https://somedomain.eu/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
111.111.111.111 - - [30/Sep/2017:18:14:15 +0200] "GET /seafhttp/repo/75a2d154-23f8-42ab-bf8d-1cfad3870823/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:14:15 +0200] "GET /seafhttp/repo/492c04d3-c7a1-4470-bddd-a26b9202680d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:14:15 +0200] "GET /seafhttp/repo/4d867114-adf5-4e5f-bc95-3a3cd4b7805a/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:14:15 +0200] "GET /seafhttp/repo/13062c20-5c5a-4e0e-a838-cfe1b0e7c99d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:14:25 +0200] "GET /seafhttp/repo/fff50b9a-1886-46a9-8445-c363230aea42/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
222.222.222.222 - - [30/Sep/2017:18:14:35 +0200] "GET /api2/account/info/ HTTP/1.1" 502 456 "-" "Mozilla/5.0"
111.111.111.111 - - [30/Sep/2017:18:14:45 +0200] "GET /seafhttp/repo/4d867114-adf5-4e5f-bc95-3a3cd4b7805a/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:14:45 +0200] "GET /seafhttp/repo/492c04d3-c7a1-4470-bddd-a26b9202680d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:14:45 +0200] "GET /seafhttp/repo/75a2d154-23f8-42ab-bf8d-1cfad3870823/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:14:45 +0200] "GET /seafhttp/repo/13062c20-5c5a-4e0e-a838-cfe1b0e7c99d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:14:55 +0200] "GET /seafhttp/repo/fff50b9a-1886-46a9-8445-c363230aea42/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:15:17 +0200] "GET /seafhttp/repo/492c04d3-c7a1-4470-bddd-a26b9202680d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:15:17 +0200] "GET /seafhttp/repo/4d867114-adf5-4e5f-bc95-3a3cd4b7805a/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:15:17 +0200] "GET /seafhttp/repo/75a2d154-23f8-42ab-bf8d-1cfad3870823/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:15:17 +0200] "GET /seafhttp/repo/13062c20-5c5a-4e0e-a838-cfe1b0e7c99d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:15:27 +0200] "GET /seafhttp/repo/fff50b9a-1886-46a9-8445-c363230aea42/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:15:48 +0200] "GET /seafhttp/repo/4d867114-adf5-4e5f-bc95-3a3cd4b7805a/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:15:48 +0200] "GET /seafhttp/repo/13062c20-5c5a-4e0e-a838-cfe1b0e7c99d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:15:48 +0200] "GET /seafhttp/repo/492c04d3-c7a1-4470-bddd-a26b9202680d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:15:48 +0200] "GET /seafhttp/repo/75a2d154-23f8-42ab-bf8d-1cfad3870823/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:15:57 +0200] "GET /seafhttp/repo/fff50b9a-1886-46a9-8445-c363230aea42/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:16:19 +0200] "GET /seafhttp/repo/13062c20-5c5a-4e0e-a838-cfe1b0e7c99d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:16:19 +0200] "GET /seafhttp/repo/4d867114-adf5-4e5f-bc95-3a3cd4b7805a/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:16:19 +0200] "GET /seafhttp/repo/492c04d3-c7a1-4470-bddd-a26b9202680d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:16:19 +0200] "GET /seafhttp/repo/75a2d154-23f8-42ab-bf8d-1cfad3870823/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:16:29 +0200] "GET /seafhttp/repo/fff50b9a-1886-46a9-8445-c363230aea42/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:16:50 +0200] "GET /seafhttp/repo/492c04d3-c7a1-4470-bddd-a26b9202680d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:16:50 +0200] "GET /seafhttp/repo/13062c20-5c5a-4e0e-a838-cfe1b0e7c99d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:16:50 +0200] "GET /seafhttp/repo/75a2d154-23f8-42ab-bf8d-1cfad3870823/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:16:50 +0200] "GET /seafhttp/repo/4d867114-adf5-4e5f-bc95-3a3cd4b7805a/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:17:00 +0200] "GET /seafhttp/repo/fff50b9a-1886-46a9-8445-c363230aea42/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:17:20 +0200] "GET /seafhttp/repo/492c04d3-c7a1-4470-bddd-a26b9202680d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:17:20 +0200] "GET /seafhttp/repo/13062c20-5c5a-4e0e-a838-cfe1b0e7c99d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:17:20 +0200] "GET /seafhttp/repo/75a2d154-23f8-42ab-bf8d-1cfad3870823/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:17:20 +0200] "GET /seafhttp/repo/4d867114-adf5-4e5f-bc95-3a3cd4b7805a/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:17:30 +0200] "GET /seafhttp/repo/fff50b9a-1886-46a9-8445-c363230aea42/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
222.222.222.222 - - [30/Sep/2017:18:17:35 +0200] "GET /api2/account/info/ HTTP/1.1" 502 456 "-" "Mozilla/5.0"
111.111.111.111 - - [30/Sep/2017:18:17:52 +0200] "GET /seafhttp/repo/492c04d3-c7a1-4470-bddd-a26b9202680d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:17:52 +0200] "GET /seafhttp/repo/75a2d154-23f8-42ab-bf8d-1cfad3870823/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:17:52 +0200] "GET /seafhttp/repo/4d867114-adf5-4e5f-bc95-3a3cd4b7805a/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:17:52 +0200] "GET /seafhttp/repo/13062c20-5c5a-4e0e-a838-cfe1b0e7c99d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:18:02 +0200] "GET /seafhttp/repo/fff50b9a-1886-46a9-8445-c363230aea42/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:18:22 +0200] "GET /seafhttp/repo/4d867114-adf5-4e5f-bc95-3a3cd4b7805a/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:18:22 +0200] "GET /seafhttp/repo/492c04d3-c7a1-4470-bddd-a26b9202680d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:18:22 +0200] "GET /seafhttp/repo/13062c20-5c5a-4e0e-a838-cfe1b0e7c99d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
111.111.111.111 - - [30/Sep/2017:18:18:22 +0200] "GET /seafhttp/repo/75a2d154-23f8-42ab-bf8d-1cfad3870823/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"

seahub.access.log

111.111.111.111 - - [30/Sep/2017:18:02:37 +0200] "GET /api2/account/info/ HTTP/1.1" 499 0 "-" "Mozilla/5.0"
111.111.111.111 - - [30/Sep/2017:18:08:35 +0200] "GET /api2/account/info/ HTTP/1.1" 499 0 "-" "Mozilla/5.0"
222.222.222.222 - - [30/Sep/2017:18:09:58 +0200] "GET /api2/avatars/user/john.doe@foo.bar/resized/80/ HTTP/1.1" 499 0 "-" "Mozilla/5.0"
111.111.111.111 - - [30/Sep/2017:18:11:35 +0200] "GET /api2/account/info/ HTTP/1.1" 499 0 "-" "Mozilla/5.0"

seahub.error.log

2017/09/30 18:13:26 [error] 919#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 188.195.250.60, server: somedomain.eu, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/09/30 18:13:28 [error] 919#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 188.195.250.60, server: somedomain.eu, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu", referrer: "https://somedomain.eu/"
2017/09/30 18:13:43 [error] 919#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 188.195.250.60, server: somedomain.eu, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/09/30 18:13:43 [error] 919#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 188.195.250.60, server: somedomain.eu, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu", referrer: "https://somedomain.eu/"
2017/09/30 18:13:45 [error] 919#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 188.195.250.60, server: somedomain.eu, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/09/30 18:13:45 [error] 919#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 188.195.250.60, server: somedomain.eu, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu", referrer: "https://somedomain.eu/"
2017/09/30 18:13:45 [error] 919#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 188.195.250.60, server: somedomain.eu, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/09/30 18:13:45 [error] 919#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 188.195.250.60, server: somedomain.eu, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu", referrer: "https://somedomain.eu/"
2017/09/30 18:13:46 [error] 919#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 188.195.250.60, server: somedomain.eu, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/09/30 18:13:46 [error] 919#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 188.195.250.60, server: somedomain.eu, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu", referrer: "https://somedomain.eu/"
2017/09/30 18:13:56 [error] 919#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 188.195.250.60, server: somedomain.eu, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/09/30 18:13:56 [error] 919#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 188.195.250.60, server: somedomain.eu, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu", referrer: "https://somedomain.eu/"
2017/09/30 18:13:57 [error] 919#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 188.195.250.60, server: somedomain.eu, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/09/30 18:13:57 [error] 919#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 188.195.250.60, server: somedomain.eu, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu", referrer: "https://somedomain.eu/"
2017/09/30 18:14:03 [error] 922#0: *27 connect() failed (111: Connection refused) while connecting to upstream, client: 188.195.250.60, server: somedomain.eu, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/09/30 18:14:04 [error] 922#0: *27 connect() failed (111: Connection refused) while connecting to upstream, client: 188.195.250.60, server: somedomain.eu, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu", referrer: "https://somedomain.eu/"
2017/09/30 18:14:35 [error] 921#0: *36 connect() failed (111: Connection refused) while connecting to upstream, client: 188.195.250.60, server: somedomain.eu, request: "GET /api2/account/info/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/09/30 18:17:35 [error] 922#0: *68 connect() failed (111: Connection refused) while connecting to upstream, client: 188.195.250.60, server: somedomain.eu, request: "GET /api2/account/info/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"

try to insert these both on / and /seafhttp nginx blocks:

proxy_http_version 1.1;

like here:

# Seafile root domain configuration
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;
      proxy_http_version 1.1;              #<-------------consider to include this

I still get a 503 error aka custom error page :confused:
Failed to load resource: the server responded with a status of 502 (Bad Gateway) (debug output on client side)

seahub.error.log

2017/10/01 01:09:23 [error] 919#0: *4633 connect() failed (111: Connection refused) while connecting to upstream, client: 99.88.77.66, server: somedomain.eu, request: "GET /api2/account/info/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/10/01 01:09:23 [error] 919#0: *4634 connect() failed (111: Connection refused) while connecting to upstream, client: 99.88.77.66, server: somedomain.eu, request: "GET /api2/ping/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/10/01 01:10:22 [error] 919#0: *4633 connect() failed (111: Connection refused) while connecting to upstream, client: 99.88.77.66, server: somedomain.eu, request: "GET /api2/repos/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/10/01 01:11:33 [error] 2751#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET /api2/account/info/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/10/01 01:11:36 [error] 2751#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/10/01 01:11:36 [error] 2751#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu", referrer: "https://somedomain.eu/"
2017/10/01 01:11:38 [error] 2751#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/10/01 01:11:38 [error] 2751#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu", referrer: "https://somedomain.eu/"
2017/10/01 01:11:38 [error] 2751#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/10/01 01:11:38 [error] 2751#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu", referrer: "https://somedomain.eu/"
2017/10/01 01:11:39 [error] 2751#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/10/01 01:11:39 [error] 2751#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu", referrer: "https://somedomain.eu/"
2017/10/01 01:12:23 [error] 2750#0: *29 connect() failed (111: Connection refused) while connecting to upstream, client: 99.88.77.66, server: somedomain.eu, request: "GET /api2/account/info/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/10/01 01:12:23 [error] 2750#0: *28 connect() failed (111: Connection refused) while connecting to upstream, client: 99.88.77.66, server: somedomain.eu, request: "GET /api2/ping/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/10/01 01:12:40 [error] 2751#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/10/01 01:12:40 [error] 2751#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu", referrer: "https://somedomain.eu/"
2017/10/01 01:12:44 [error] 2751#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/10/01 01:12:44 [error] 2751#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu", referrer: "https://somedomain.eu/"
2017/10/01 01:12:44 [error] 2751#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/10/01 01:12:44 [error] 2751#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu", referrer: "https://somedomain.eu/"
2017/10/01 01:12:45 [error] 2751#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/10/01 01:12:46 [error] 2751#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu", referrer: "https://somedomain.eu/"
2017/10/01 01:14:10 [error] 920#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/10/01 01:14:10 [error] 920#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu", referrer: "https://somedomain.eu/"
2017/10/01 01:14:33 [error] 919#0: *15 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET /api2/account/info/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/10/01 01:14:54 [error] 920#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu", referrer: "https://somedomain.eu/"
2017/10/01 01:14:55 [error] 920#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu", referrer: "https://somedomain.eu/"
2017/10/01 01:14:57 [error] 920#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu", referrer: "https://somedomain.eu/"
2017/10/01 01:15:22 [error] 922#0: *30 connect() failed (111: Connection refused) while connecting to upstream, client: 99.88.77.66, server: somedomain.eu, request: "GET /api2/repos/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/10/01 01:15:22 [error] 922#0: *30 connect() failed (111: Connection refused) while connecting to upstream, client: 99.88.77.66, server: somedomain.eu, request: "GET /api2/account/info/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"
2017/10/01 01:15:22 [error] 922#0: *30 connect() failed (111: Connection refused) while connecting to upstream, client: 99.88.77.66, server: somedomain.eu, request: "GET /api2/ping/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:8000", host: "somedomain.eu"

access.log

99.88.77.66 - - [01/Oct/2017:01:14:10 +0200] "GET / HTTP/1.1" 502 456 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
99.88.77.66 - - [01/Oct/2017:01:14:10 +0200] "GET /favicon.ico HTTP/1.1" 502 456 "https://somedomain.eu/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
11.22.33.44 - - [01/Oct/2017:01:14:13 +0200] "GET /seafhttp/repo/13062c20-5c5a-4e0e-a838-cfe1b0e7c99d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:01:14:13 +0200] "GET /seafhttp/repo/4d867114-adf5-4e5f-bc95-3a3cd4b7805a/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:01:14:13 +0200] "GET /seafhttp/repo/75a2d154-23f8-42ab-bf8d-1cfad3870823/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:01:14:13 +0200] "GET /seafhttp/repo/492c04d3-c7a1-4470-bddd-a26b9202680d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:01:14:13 +0200] "GET /seafhttp/repo/fff50b9a-1886-46a9-8445-c363230aea42/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
99.88.77.66 - - [01/Oct/2017:01:14:33 +0200] "GET /api2/account/info/ HTTP/1.1" 502 456 "-" "Mozilla/5.0"
11.22.33.44 - - [01/Oct/2017:01:14:44 +0200] "GET /seafhttp/repo/492c04d3-c7a1-4470-bddd-a26b9202680d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:01:14:44 +0200] "GET /seafhttp/repo/4d867114-adf5-4e5f-bc95-3a3cd4b7805a/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:01:14:44 +0200] "GET /seafhttp/repo/75a2d154-23f8-42ab-bf8d-1cfad3870823/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:01:14:44 +0200] "GET /seafhttp/repo/13062c20-5c5a-4e0e-a838-cfe1b0e7c99d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:01:14:44 +0200] "GET /seafhttp/repo/fff50b9a-1886-46a9-8445-c363230aea42/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
99.88.77.66 - - [01/Oct/2017:01:14:54 +0200] "GET /favicon.ico HTTP/1.1" 502 456 "https://somedomain.eu/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
99.88.77.66 - - [01/Oct/2017:01:14:55 +0200] "GET /favicon.ico HTTP/1.1" 502 456 "https://somedomain.eu/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
99.88.77.66 - - [01/Oct/2017:01:14:57 +0200] "GET /favicon.ico HTTP/1.1" 502 456 "https://somedomain.eu/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
11.22.33.44 - - [01/Oct/2017:01:15:14 +0200] "GET /seafhttp/repo/4d867114-adf5-4e5f-bc95-3a3cd4b7805a/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:01:15:14 +0200] "GET /seafhttp/repo/492c04d3-c7a1-4470-bddd-a26b9202680d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:01:15:14 +0200] "GET /seafhttp/repo/13062c20-5c5a-4e0e-a838-cfe1b0e7c99d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:01:15:14 +0200] "GET /seafhttp/repo/75a2d154-23f8-42ab-bf8d-1cfad3870823/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:01:15:14 +0200] "GET /seafhttp/repo/fff50b9a-1886-46a9-8445-c363230aea42/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:01:15:22 +0200] "GET /api2/repos/ HTTP/1.1" 502 456 "-" "Mozilla/5.0"
11.22.33.44 - - [01/Oct/2017:01:15:22 +0200] "GET /api2/account/info/ HTTP/1.1" 502 456 "-" "Mozilla/5.0"
11.22.33.44 - - [01/Oct/2017:01:15:22 +0200] "GET /api2/ping/ HTTP/1.1" 502 456 "-" "Mozilla/5.0"
11.22.33.44 - - [01/Oct/2017:01:15:46 +0200] "GET /seafhttp/repo/13062c20-5c5a-4e0e-a838-cfe1b0e7c99d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:01:15:46 +0200] "GET /seafhttp/repo/75a2d154-23f8-42ab-bf8d-1cfad3870823/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:01:15:46 +0200] "GET /seafhttp/repo/492c04d3-c7a1-4470-bddd-a26b9202680d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:01:15:46 +0200] "GET /seafhttp/repo/4d867114-adf5-4e5f-bc95-3a3cd4b7805a/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:01:15:46 +0200] "GET /seafhttp/repo/fff50b9a-1886-46a9-8445-c363230aea42/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"

error.log

2017/10/01 01:11:35 [error] 2751#0: send() failed (111: Connection refused) while resolving, resolver: 127.0.0.1:53
2017/10/01 01:14:09 [error] 920#0: send() failed (111: Connection refused) while resolving, resolver: 127.0.0.1:53

I´m confused with seahub.error.log. Why does it still say > fastcgi://127.0.0.1:8000 ?

I see you’re still using the outdated memcached format.
Replace the one with:

CACHES = {
‘default’: {
‘BACKEND’: ‘django_pylibmc.memcached.PyLibMCCache’,
‘LOCATION’: ‘127.0.0.1:11211’,
}
}

Furthermore i’m just curious but have you even reloaded the nginx conf after changing?

nginx -s reload

:slight_smile:

Reload nginx service

Ok, I´ve foud one major mistake :sweat:
I´ve linked the wrong config file from sites-enabled to sites-available. I totally forgot that I´ve built a ‘enhanced’ config for nginx a few months ago. So I´ve made the changes but I still get a 503 Bad Gateway error even with the correct config and a nginx reload/restart. I´ve also rebootet the system but it didn´t change anything.

So (hopefully) once again my configs and logs. I´m really sorry guys for that.

nginx config

# Basic HTTP Port for easy access                              
server {                                                       
        listen          80;                                    
        server_name     somedomain.eu;                            
        return          301 https://$host$request_uri;  #Redirect to HTTPS                                                                  
}

# For major security reason use SSL at all time                

server {                                                       
	## START SECURITY SETTINGS ##

	# Certs sent to the client in SERVER HELLO are concatenated in ssl_certificate
        listen			443 ssl;     
        ssl_certificate         /etc/letsencrypt/live/somedomain.eu/fullchain.pem;         # Pulbic Cert                                       
        ssl_certificate_key 	/etc/letsencrypt/live/somedomain.eu/privkey.pem;           # Private Key                                       
        ssl_session_timeout	1d;
	ssl_session_cache	shared:SSL:50m;
	ssl_session_tickets	off;
	
	# Diffie-Hellman parameter for DHE ciphersuites
	ssl_dhparam             /etc/nginx/ssl/dhparam4096.pem;				# DH-Exchange Key                                   

	# Modern Configuration               
        ssl_protocols           TLSv1.2;						# TLSv1 TLSv1.1                                 
        ssl_ciphers             'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';                                                                     
        ssl_prefer_server_ciphers on;                          

        server_name             somedomain.eu;                    
        proxy_set_header        X-Forwarded-For $remote_addr;  
        server_tokens           off;                           
        
	# HSTS (ngx_http_headers_module is required) (15768000 seconds = 6 months)
	add_header Strict-Transport-Security	"max-age=31536000; includeSubDomains";

	# OCSP Stapling (fetch OCSP records from URL in ssl_certificate and cache them)
	resolver				127.0.0.1;
	ssl_stapling 				on;
	ssl_stapling_verify			on;

	## verify chain of trust of OCSP response using Root CA and Intermediate certs 
	ssl_trusted_certificate /etc/letsencrypt/live/somedomain.eu/chain.pem;

	# Make Cookies Secure
	proxy_cookie_domain ~(?P<secure_domain>([-0-9a-z]+\.)?[-0-9a-z]+\.[a-z]+)$ "$secure_domain; secure";

	## END SECURITY SETTINGS ##

	# HTTP Error Pages
	#error_page 404 500 502 503 504 /custom_error.html;
	#location = /custom_error.html {
	#	root /usr/share/nginx/html;
	#	internal;
	#}

	# Error Test
	location /error {
		return 404;
	}                                              

	# Seafile root doamin configuration
    	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;
		proxy_http_version 1.1;

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

	# Redirect location for 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;                
			proxy_http_version			1.1;
            send_timeout                36000s;
	}
 
# Location to data directory                                   
 
   location /media {                                           
            root /mnt/pidrive/seafile/seafile-server-latest/seahub;                                                                         
        }                                                      


# For Let´s encrypt acme challenge (renew)                     
    location '/.well-known/acme-challenge' {                   
                default_type    "Text/plain";                  
                root            /var/www/webroot;              
        }                                                      
} 

error.log

2017/10/01 14:17:06 [alert] 839#0: *44 open socket #24 left in connection 6
2017/10/01 14:17:06 [alert] 839#0: aborting
2017/10/01 14:17:08 [error] 1760#0: send() failed (111: Connection refused) while resolving, resolver: 127.0.0.1:53
2017/10/01 14:19:39 [error] 1761#0: send() failed (111: Connection refused) while resolving, resolver: 127.0.0.1:53

access.log

11.22.33.44 - - [01/Oct/2017:14:19:09 +0200] "GET /seafhttp/repo/fff50b9a-1886-46a9-8445-c363230aea42/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:14:19:18 +0200] "GET /seafhttp/repo/75a2d154-23f8-42ab-bf8d-1cfad3870823/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:14:19:34 +0200] "GET /seafhttp/repo/4d867114-adf5-4e5f-bc95-3a3cd4b7805a/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:14:19:34 +0200] "GET /seafhttp/repo/492c04d3-c7a1-4470-bddd-a26b9202680d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:14:19:34 +0200] "GET /seafhttp/repo/13062c20-5c5a-4e0e-a838-cfe1b0e7c99d/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:14:19:40 +0200] "GET /seafhttp/repo/fff50b9a-1886-46a9-8445-c363230aea42/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"
11.22.33.44 - - [01/Oct/2017:14:19:49 +0200] "GET /seafhttp/repo/75a2d154-23f8-42ab-bf8d-1cfad3870823/commit/HEAD HTTP/1.1" 200 81 "-" "Seafile/6.1.0 (Windows NT)"

seahub.error.log

2017/10/01 14:18:27 [error] 1762#0: *23 connect() failed (111: Connection refused) while connecting to upstream, client: 99.88.77.66, server: somedomain.eu, request: "GET /api2/account/info/ HTTP/1.1", upstream: "http://127.0.0.1:8000/api2/account/info/", host: "somedomain.eu"
2017/10/01 14:18:27 [error] 1762#0: *24 connect() failed (111: Connection refused) while connecting to upstream, client: 99.88.77.66, server: somedomain.eu, request: "GET /api2/ping/ HTTP/1.1", upstream: "http://127.0.0.1:8000/api2/ping/", host: "somedomain.eu"
2017/10/01 14:19:39 [error] 1761#0: *40 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "somedomain.eu"
2017/10/01 14:19:39 [error] 1761#0: *40 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8000/favicon.ico", host: "somedomain.eu", referrer: "https://somedomain.eu/"
2017/10/01 14:19:51 [error] 1761#0: *46 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET /api2/ping/ HTTP/1.1", upstream: "http://127.0.0.1:8000/api2/ping/", host: "somedomain.eu"
2017/10/01 14:19:51 [error] 1761#0: *46 connect() failed (111: Connection refused) while connecting to upstream, client: 11.22.33.44, server: somedomain.eu, request: "GET /api2/account/info/ HTTP/1.1", upstream: "http://127.0.0.1:8000/api2/account/info/", host: "somedomain.eu"

seahub.access.log

11.22.33.44 - - [01/Oct/2017:14:19:39 +0200] "GET / HTTP/1.1" 502 568 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
11.22.33.44 - - [01/Oct/2017:14:19:39 +0200] "GET /favicon.ico HTTP/1.1" 502 568 "https://somedomain.eu/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
11.22.33.44 - - [01/Oct/2017:14:19:51 +0200] "GET /api2/ping/ HTTP/1.1" 502 166 "-" "Mozilla/5.0"
11.22.33.44 - - [01/Oct/2017:14:19:51 +0200] "GET /api2/account/info/ HTTP/1.1" 502 166 "-" "Mozilla/5.0"

I´ve tracked the error down to the seahub services which won´t start as user pi.

pi@pi31:/mnt/pidrive/seafile/seafile-server-latest $ sudo service seafile stop
pi@pi31:/mnt/pidrive/seafile/seafile-server-latest $ ./seafile.sh start

[10/02/17 17:51:34] ../common/session.c(132): using config file /mnt/pidrive/seafile/conf/ccnet.conf
Starting seafile server, please wait ...
Seafile server started

Done.
pi@pi31:/mnt/pidrive/seafile/seafile-server-latest $ ./seahub.sh start

LC_ALL is not set in ENV, set to en_US.UTF-8
./seahub.sh: Zeile 209: Warnung: setlocale: LC_ALL: Kann die Locale nicht ändern (en_US.UTF-8): Datei oder Verzeichnis nicht gefunden
Starting seahub at port 8000 ...
Error:Seahub failed to start.
Please try to run "./seahub.sh start" again
pi@pi31:/mnt/pidrive/seafile/seafile-server-latest $

And after a reboot the following:

pi@pi31:/mnt/pidrive/seafile/seafile-server-latest $ ./seahub.sh start

LC_ALL is not set in ENV, set to en_US.UTF-8
./seahub.sh: Zeile 209: Warnung: setlocale: LC_ALL: Kann die Locale nicht ändern (en_US.UTF-8): Datei oder Verzeichnis nicht gefunden
Starting seahub at port 8000 ...

Seahub is started

Done.

pi@pi31:/mnt/pidrive/seafile/seafile-server-latest $ ./seahub.sh stop

Seahub is not running
Done.

Forum entries about Error:Seahub failed to start didn´t fix my problem. Any ideas?
I´m really getting confused with the update of the new version :neutral_face:

Forget about these entries. It looks like that seahub started after reboot. Check it with ps - ef. Forget about LC_ALL error too. Check with netstat - tulpen that services in ports 8000, 443, etc are running

ps -ef directly after boot

UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  1 21:39 ?        00:00:02 /sbin/init
root         2     0  0 21:39 ?        00:00:00 [kthreadd]
root         3     2  0 21:39 ?        00:00:00 [ksoftirqd/0]
root         4     2  0 21:39 ?        00:00:00 [kworker/0:0]
root         5     2  0 21:39 ?        00:00:00 [kworker/0:0H]
root         6     2  0 21:39 ?        00:00:00 [kworker/u8:0]
root         7     2  0 21:39 ?        00:00:00 [rcu_sched]
root         8     2  0 21:39 ?        00:00:00 [rcu_bh]
root         9     2  0 21:39 ?        00:00:00 [migration/0]
root        10     2  0 21:39 ?        00:00:00 [lru-add-drain]
root        11     2  0 21:39 ?        00:00:00 [cpuhp/0]
root        12     2  0 21:39 ?        00:00:00 [cpuhp/1]
root        13     2  0 21:39 ?        00:00:00 [migration/1]
root        14     2  0 21:39 ?        00:00:00 [ksoftirqd/1]
root        15     2  0 21:39 ?        00:00:00 [kworker/1:0]
root        16     2  0 21:39 ?        00:00:00 [kworker/1:0H]
root        17     2  0 21:39 ?        00:00:00 [cpuhp/2]
root        18     2  0 21:39 ?        00:00:00 [migration/2]
root        19     2  0 21:39 ?        00:00:00 [ksoftirqd/2]
root        20     2  0 21:39 ?        00:00:00 [kworker/2:0]
root        21     2  0 21:39 ?        00:00:00 [kworker/2:0H]
root        22     2  0 21:39 ?        00:00:00 [cpuhp/3]
root        23     2  0 21:39 ?        00:00:00 [migration/3]
root        24     2  0 21:39 ?        00:00:00 [ksoftirqd/3]
root        25     2  0 21:39 ?        00:00:00 [kworker/3:0]
root        26     2  0 21:39 ?        00:00:00 [kworker/3:0H]
root        27     2  0 21:39 ?        00:00:00 [kdevtmpfs]
root        28     2  0 21:39 ?        00:00:00 [netns]
root        29     2  0 21:39 ?        00:00:00 [khungtaskd]
root        30     2  0 21:39 ?        00:00:00 [oom_reaper]
root        31     2  0 21:39 ?        00:00:00 [writeback]
root        32     2  0 21:39 ?        00:00:00 [kcompactd0]
root        33     2  0 21:39 ?        00:00:00 [crypto]
root        34     2  0 21:39 ?        00:00:00 [bioset]
root        35     2  0 21:39 ?        00:00:00 [kblockd]
root        36     2  0 21:39 ?        00:00:00 [watchdogd]
root        37     2  0 21:39 ?        00:00:00 [kworker/0:1]
root        38     2  0 21:39 ?        00:00:00 [rpciod]
root        39     2  0 21:39 ?        00:00:00 [xprtiod]
root        40     2  0 21:39 ?        00:00:00 [kswapd0]
root        41     2  0 21:39 ?        00:00:00 [vmstat]
root        42     2  0 21:39 ?        00:00:00 [nfsiod]
root        52     2  0 21:39 ?        00:00:00 [kthrotld]
root        53     2  0 21:39 ?        00:00:00 [bioset]
root        54     2  0 21:39 ?        00:00:00 [bioset]
root        55     2  0 21:39 ?        00:00:00 [bioset]
root        56     2  0 21:39 ?        00:00:00 [bioset]
root        57     2  0 21:39 ?        00:00:00 [bioset]
root        58     2  0 21:39 ?        00:00:00 [bioset]
root        59     2  0 21:39 ?        00:00:00 [bioset]
root        60     2  0 21:39 ?        00:00:00 [bioset]
root        61     2  0 21:39 ?        00:00:00 [bioset]
root        62     2  0 21:39 ?        00:00:00 [bioset]
root        63     2  0 21:39 ?        00:00:00 [bioset]
root        64     2  0 21:39 ?        00:00:00 [bioset]
root        65     2  0 21:39 ?        00:00:00 [bioset]
root        66     2  0 21:39 ?        00:00:00 [bioset]
root        67     2  0 21:39 ?        00:00:00 [bioset]
root        68     2  0 21:39 ?        00:00:00 [bioset]
root        69     2  0 21:39 ?        00:00:00 [bioset]
root        70     2  0 21:39 ?        00:00:00 [bioset]
root        71     2  0 21:39 ?        00:00:00 [bioset]
root        72     2  0 21:39 ?        00:00:00 [bioset]
root        73     2  0 21:39 ?        00:00:00 [bioset]
root        74     2  0 21:39 ?        00:00:00 [bioset]
root        75     2  0 21:39 ?        00:00:00 [bioset]
root        76     2  0 21:39 ?        00:00:00 [bioset]
root        77     2  0 21:39 ?        00:00:00 [iscsi_eh]
root        78     2  0 21:39 ?        00:00:00 [dwc_otg]
root        79     2  0 21:39 ?        00:00:00 [kworker/3:1]
root        80     2  0 21:39 ?        00:00:00 [DWC Notificatio]
root        81     2  0 21:39 ?        00:00:00 [VCHIQ-0]
root        82     2  0 21:39 ?        00:00:00 [VCHIQr-0]
root        83     2  0 21:39 ?        00:00:00 [VCHIQs-0]
root        84     2  0 21:39 ?        00:00:00 [VCHIQka-0]
root        85     2  0 21:39 ?        00:00:00 [kworker/3:2]
root        86     2  0 21:39 ?        00:00:00 [irq/92-mmc1]
root        87     2  0 21:39 ?        00:00:00 [kworker/3:3]
root        88     2  0 21:39 ?        00:00:00 [kworker/2:1]
root        89     2  0 21:39 ?        00:00:00 [bioset]
root        90     2  0 21:39 ?        00:00:00 [mmcqd/0]
root        91     2  0 21:39 ?        00:00:00 [kworker/1:1]
root        92     2  0 21:39 ?        00:00:00 [jbd2/mmcblk0p2-]
root        93     2  0 21:39 ?        00:00:00 [ext4-rsv-conver]
root        94     2  0 21:39 ?        00:00:00 [ipv6_addrconf]
root       109     2  0 21:39 ?        00:00:00 [kworker/2:1H]
root       115     2  0 21:39 ?        00:00:00 [kworker/u8:1]
root       119     2  0 21:39 ?        00:00:00 [scsi_eh_0]
root       120     2  0 21:39 ?        00:00:00 [scsi_tmf_0]
root       121     2  0 21:39 ?        00:00:00 [usb-storage]
root       126     2  0 21:39 ?        00:00:00 [kworker/0:2]
root       137     2  0 21:39 ?        00:00:00 [kworker/2:2]
root       141     1  0 21:39 ?        00:00:00 /lib/systemd/systemd-journald
root       145     1  0 21:39 ?        00:00:00 /lib/systemd/systemd-udevd
root       238     2  0 21:39 ?        00:00:00 [cfg80211]
root       243     2  0 21:39 ?        00:00:00 [kworker/1:2]
root       244     2  0 21:39 ?        00:00:00 [brcmf_wq/mmc1:0]
root       245     2  0 21:39 ?        00:00:00 [brcmf_wdog/mmc1]
root       251     2  0 21:39 ?        00:00:00 [bioset]
root       252     2  0 21:39 ?        00:00:00 [bioset]
root       253     2  0 21:39 ?        00:00:00 [kworker/u8:2]
root       255     2  0 21:39 ?        00:00:00 [kworker/1:1H]
root       256     2  0 21:39 ?        00:00:00 [kworker/3:1H]
root       263     2  0 21:39 ?        00:00:00 [kworker/u8:3]
root       289     2  0 21:39 ?        00:00:00 [jbd2/sda1-8]
root       290     2  0 21:39 ?        00:00:00 [ext4-rsv-conver]
root       353     2  0 21:39 ?        00:00:00 [kworker/1:3]
root       360     1  0 21:39 ?        00:00:00 /usr/sbin/rsyslogd -n
root       362     1  0 21:39 ?        00:00:00 /usr/sbin/cron -f
avahi      366     1  0 21:39 ?        00:00:00 avahi-daemon: running [pi31.local]
root       368     1  0 21:39 ?        00:00:00 /lib/systemd/systemd-logind
message+   370     1  0 21:39 ?        00:00:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
avahi      399   366  0 21:39 ?        00:00:00 avahi-daemon: chroot helper
root       448     1  0 21:39 ?        00:00:00 /sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wlan0.pid -i wlan0 -D nl80211,wext -c /etc/wpa_supplicant/wpa_supplicant.conf
root       621     1  0 21:39 ?        00:00:00 /sbin/dhcpcd -q -w
memcache   622     1  0 21:39 ?        00:00:00 /usr/bin/memcached -m 64 -p 11211 -u memcache -l 127.0.0.1
root       623     1  0 21:39 ?        00:00:00 /usr/sbin/sshd -D
root       632     2  0 21:39 ?        00:00:00 [cifsiod]
root       633     2  0 21:39 ?        00:00:00 [cifsoplockd]
root       635     2  0 21:39 ?        00:00:00 [cifsd]
root       715     1  0 21:39 tty1     00:00:00 /sbin/agetty --noclear tty1 linux
root       716     2  0 21:39 ?        00:00:00 [kworker/u9:0]
root       717     2  0 21:39 ?        00:00:00 [hci0]
root       718     2  0 21:39 ?        00:00:00 [hci0]
root       719     1  0 21:39 ?        00:00:00 /usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow - b8:27:eb:c7:d3:41
root       720     2  0 21:39 ?        00:00:00 [kworker/u9:1]
root       721     2  0 21:39 ?        00:00:00 [kworker/u9:2]
nobody     726     1  0 21:39 ?        00:00:00 /usr/sbin/thd --daemon --triggers /etc/triggerhappy/triggers.d/ --socket /var/run/thd.socket --pidfile /var/run/thd.pid --user nobody /dev/input/event*
ntp        727     1  0 21:39 ?        00:00:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -c /var/lib/ntp/ntp.conf.dhcp -u 106:111
root       745     1  0 21:39 ?        00:00:00 /usr/lib/bluetooth/bluetoothd
shellin+   763     1  0 21:39 ?        00:00:00 /usr/bin/shellinaboxd -q --background=/var/run/shellinaboxd.pid -c /var/lib/shellinabox -p 4200 -u shellinabox -g shellinabox --user-css Black on White:+/etc/shellinabox/options-enabled/00+
shellin+   764   763  0 21:39 ?        00:00:00 /usr/bin/shellinaboxd -q --background=/var/run/shellinaboxd.pid -c /var/lib/shellinabox -p 4200 -u shellinabox -g shellinabox --user-css Black on White:+/etc/shellinabox/options-enabled/00+
root       796     1  0 21:39 ?        00:00:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
www-data   797   796  0 21:39 ?        00:00:00 nginx: worker process
www-data   798   796  0 21:39 ?        00:00:00 nginx: worker process
www-data   799   796  0 21:39 ?        00:00:00 nginx: worker process
www-data   800   796  0 21:39 ?        00:00:00 nginx: worker process
root       810     1  0 21:39 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe
mysql     1257   810  1 21:39 ?        00:00:01 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=
root      1380     1 99 21:39 ?        00:02:32 /usr/bin/python /usr/bin/fail2ban-server -b -s /var/run/fail2ban/fail2ban.sock -p /var/run/fail2ban/fail2ban.pid
pi        1410     1  0 21:39 ?        00:00:00 /mnt/pidrive/seafile/seafile-server-6.2.2/seafile/bin/seafile-controller -c /mnt/pidrive/seafile/ccnet -d /mnt/pidrive/seafile/seafile-data -F /mnt/pidrive/seafile/conf
pi        1417     1  0 21:39 ?        00:00:00 ccnet-server -F /mnt/pidrive/seafile/conf -c /mnt/pidrive/seafile/ccnet -f /mnt/pidrive/seafile/logs/ccnet.log -d -P /mnt/pidrive/seafile/pids/ccnet.pid
root      1446     2  0 21:39 ?        00:00:00 [kworker/0:1H]
pi        1504     1  0 21:39 ?        00:00:00 seaf-server -F /mnt/pidrive/seafile/conf -c /mnt/pidrive/seafile/ccnet -d /mnt/pidrive/seafile/seafile-data -l /mnt/pidrive/seafile/logs/seafile.log -P /mnt/pidrive/seafile/pids/seaf-server
root      1550   623  0 21:39 ?        00:00:00 sshd: pi [priv]
pi        1557  1550  0 21:39 ?        00:00:00 sshd: pi@pts/0
pi        1559  1557  0 21:39 pts/0    00:00:00 -bash
pi        1580  1559  0 21:41 pts/0    00:00:00 ps -ef

netstat -tulpen directly after boot

Aktive Internetverbindungen (Nur Server)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode       PID/Program name
tcp        0      0 0.0.0.0:4200            0.0.0.0:*               LISTEN      0          10610       -
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      109        11852       -
tcp        0      0 127.0.0.1:11211         0.0.0.0:*               LISTEN      110        9740        -
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      0          11738       -
tcp        0      0 0.0.0.0:8082            0.0.0.0:*               LISTEN      1000       14356       -
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          9653        -
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      0          11739       -
tcp6       0      0 :::22                   :::*                    LISTEN      0          9655        -
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           105        11270       -
udp        0      0 127.0.0.1:11211         0.0.0.0:*                           110        9741        -
udp        0      0 0.0.0.0:40990           0.0.0.0:*                           105        11272       -
udp        0      0 0.0.0.0:68              0.0.0.0:*                           0          11301       -
udp        0      0 192.168.2.220:123       0.0.0.0:*                           0          11601       -
udp        0      0 127.0.0.1:123           0.0.0.0:*                           0          11600       -
udp        0      0 0.0.0.0:123             0.0.0.0:*                           0          11594       -
udp6       0      0 :::39640                :::*                                105        11273       -
udp6       0      0 :::5353                 :::*                                105        11271       -
udp6       0      0 2003:c8:2bc6:1c00:c:123 :::*                                106        11804       -
udp6       0      0 fe80::d617:fa0:e57a:123 :::*                                0          11603       -
udp6       0      0 ::1:123                 :::*                                0          11602       -
udp6       0      0 :::123                  :::*                                0          11595       -

after that I´ve stopped seafile service sudo service seafile stop and started seafile & seahub manually via shell-script as user pi. A diff of ps and netstat didn´t show any significat differences.

  • check this:
    seafile@hiperborea:~/seafile-server-6.2.2$ ./seahub.sh python-env

  • do a chown -R pi:nogroup seafile-server-latest

  • insert on line 161 in seahub.sh:

      157 function start_seahub () {
      158     before_start;
      159     echo "Starting seahub at port ${port} ..."
      160     check_init_admin;
      161     echo "$PYTHON $gunicorn_exe seahub.wsgi:application -c "${gunicorn_conf}" -b "0.0.0.0:${port}" --preload"
      162     $PYTHON $gunicorn_exe seahub.wsgi:application -c "${gunicorn_conf}" -b "0.0.0.0:${port}" --preload
      163
      164     # Ensure seahub is started successfully
    

in my case this is the output:

seafile@hiperborea:~/seafile-server-6.2.2$ ./seahub.sh start

Starting seahub at port 8000 ...
python2.7 /media/sda/seafile/seafile-server-6.2.2/seahub/thirdpart/gunicorn seahub.wsgi:application -c /media/sda/seafile/seafile-server-6.2.2/runtime/seahub.conf -b 0.0.0.0:8000 --preload

Seahub is started

Done.

I´ve changed the permission, edited the script and rebooted the system. Here´s the output afterwars:

pi@pi31:/mnt/pidrive/seafile/seafile-server-latest $ sudo service seafile stop
pi@pi31:/mnt/pidrive/seafile/seafile-server-latest $ ./seahub.sh stop  #(just for clarification)

Seahub is not running
Done.

pi@pi31:/mnt/pidrive/seafile/seafile-server-latest $ ./seafile.sh stop   #(just for clarification)

seafile server not running yet
Done.
pi@pi31:/mnt/pidrive/seafile/seafile-server-latest $ ./seafile.sh start

[10/04/17 00:33:51] ../common/session.c(132): using config file /mnt/pidrive/seafile/conf/ccnet.conf
Starting seafile server, please wait ...
Seafile server started

Done.
pi@pi31:/mnt/pidrive/seafile/seafile-server-latest $ ./seahub.sh start

LC_ALL is not set in ENV, set to en_US.UTF-8
./seahub.sh: Zeile 210: Warnung: setlocale: LC_ALL: Kann die Locale nicht ändern (en_US.UTF-8): Datei oder Verzeichnis nicht gefunden
Starting seahub at port 8000 ...
python2.7 /mnt/pidrive/seafile/seafile-server-6.2.2/seahub/thirdpart/gunicorn seahub.wsgi:application -c /mnt/pidrive/seafile/seafile-server-6.2.2/runtime/seahub.conf -b 0.0.0.0:8000 --preload

Seahub is started

Done.

pi@pi31:/mnt/pidrive/seafile/seafile-server-latest $ ./seahub.sh stop

Seahub is not running
Done.

Still a 502 error with no running service at port 8000.

which version do you have?

It looks like seahub is starting:

Seahub is started

Done.

but immediatly dying. If the process would not start at all, we will get another error. We should insert a wait immediatly before than the scripts check with psgrep and print maybe the results with echo. This way we cold see if starts or not.

If you have some firewall protection rule, try to disable it, because gunicorn/phyton tries to listen at 0.0.0.0

I´m working with seafile 6.2.2

I´ve added a line on the script to see if the service is running.
echo $(netstat -tulpen | grep sea)

Unfortunatley it´s only showing the seafile-service deamon running at 8082. As far as I know I´m not using any additional firewall protection than fail2ban which isn´t really what you´re looking for I guess.
Looks like we´re running out of ideas. Is there any way to go back to 6.1.1 after running the upgrade script from 6.1 to 6.2 (also back to fastcgi)?

I mean the Phyton version. Therefore run the mentioned script with phyton-env.

Sure, a fallback is anytime possible. Just delete the symlink that point to seafile-server-latest to 6.2.2 and create a new one ln - sf … pointing to i.e 6.1.2.

My Python version is 2.7.9.
I havn´t understand yet what ‘script’ you mean concerning the python-env call of the script. When i execute ./seahub.sh python-env I simply get a python console. Yet I also don´t know which script you are refering to.

pi@pi31:/mnt/pidrive/seafile/seafile-server-latest $ ./seahub.sh python-env

LC_ALL is not set in ENV, set to en_US.UTF-8
./seahub.sh: Zeile 210: Warnung: setlocale: LC_ALL: Kann die Locale nicht ändern (en_US.UTF-8): Datei oder Verzeichnis nicht gefunden
Python 2.7.9 (default, Sep 17 2016, 20:26:04)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>