Update from Seafile Server 6.1.2 to Seafile Server 6.2.1 for Raspberry Pi

Sorry my english is from google.

I want to update my Seafile Server from 6.1.2 to 6.2.1. Unfortunately, this has not been funky. What am I doing wrong?

my old config nginx

sudo nano /etc/nginx/sites-available/seahub

    server {
        listen 8001;
        ssl on;
        ssl_certificate /etc/nginx/ssl/seahub.crt;            # Pfad zu Ihrem cacert.pem
        ssl_certificate_key /etc/nginx/ssl/seahub.key;    # Pfad zu Ihrem privkey.pem
        server_name www.yourdoamin.com;
        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   HTTPS               on;
            fastcgi_param   HTTP_SCHEME         https;

            access_log      /var/log/nginx/seahub.access.log;
            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;
        }
        location /media {
            root /home/"USER"/"ORDNER"/seafile-server-latest/seahub;
        }
    }

sudo ln -s /etc/nginx/sites-available/seahub /etc/nginx/sites-enabled/seahub

my new config nginx?

 server {
        listen 8001;
        ssl on;
        ssl_certificate /etc/nginx/ssl/seahub.crt;            # Pfad zu Ihrem cacert.pem
        ssl_certificate_key /etc/nginx/ssl/seahub.key;    # Pfad zu Ihrem privkey.pem
        server_name www.yourdoamin.com;
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;     # not sure if necessary 

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

        location /seafhttp {
            rewrite ^/seafhttp(.*)$ $1 break;
            proxy_pass http://127.0.0.1:8082;
            client_max_body_size 0;
        }
        location /media {
            root /home/"USER"/"ORDNER"/seafile-server-latest/seahub;
        }
    }

Where can I configure Apache?

I have never used.

thanks for your help

  • First, you must run the upgrade script from 6.1.x to 6.2.x
  • Then, probably need what @nihilistaX already had commented here
    proxy_set_header Host $host:8001; (because you ngnix server listen under 8001 server { listen 8001;
  • Explain exactly which is your problem in case it doesn’t work

Hello,
this is now my config

 server {
    	listen 8001;
    	ssl on;
    	ssl_certificate /etc/nginx/ssl/seahub.crt;            # Pfad zu Ihrem cacert.pem
    	ssl_certificate_key /etc/nginx/ssl/seahub.key;    # Pfad zu Ihrem privkey.pem
    	server_name 192.168.178.77;
    	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;
              fastcgi_read_timeout 36000;

             client_max_body_size 0;

             access_log      /var/log/nginx/seahub.access.log;
              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_connect_timeout  36000s;
            proxy_read_timeout  36000s;
            proxy_send_timeout  36000s;

            send_timeout  36000s;
        }
        location /media {
            root /home/seafile/seafile/seafile-server-latest/seahub;
        }
    }

problem

https://192.168.178.77:8001/

502 Bad Gateway nginx/1.6.2

I have used this guide.

https://manual.seafile.com/deploy/deploy_with_nginx.html

if I set

 server {
    	listen 80;

then I have no connection.

nano /home/seafile/seafile/conf/ccnet.conf

SERVICE_URL = https://192.168.178.77:8001

nano /home/seafile/conf/seahub_settings.py

HTTP_SERVER_ROOT = ‘https://192.168.178.77:8001/seafhttp

sudo nano /etc/rc.local

su seafile -c ‘/home/seafile/seafile/seafile-server-latest/seafile.sh start && /home/seafile/seafile/seafile-server-latest/seahub.sh start-fastcgi’

I’m having exactly the same problem. Try starting seahub wihtout “start-fastcgi” (referring to the last line in your post).

Edit:
I don’t know what is causing it or how to fix it, but try starting it without the start-fastcgi argument.

https://192.168.178.77:8001/
502 Bad Gateway
nginx/1.6.2
no change. Problem remains even without fastcgi in rc.local.

@Maxxib your configuration is not good fow wsgi. You have to adapt it, check manual.

If you change the nginx listen port from 8001 to 80, you should adapt seahub_settings.py and ccnet.conf as well. For example: SERVICE_URL = https://192.168.178.77 and HTTP_SERVER_ROOT = 'https://192.168.178.77/seafhttp Port 80 is implicit with http and port 443 is implicit with https.

If you keep 8001, you must adapt with wscgi this line proxy_set_header Host $host; to this other proxy_set_header Host $host:8001;

I had the configuration from here taken over.
https://manual.seafile.com/deploy/deploy_with_nginx.html

What would be the better configuration? Where can I find the configuration of Apache?

server {
        listen 8001;
        ssl on;
        ssl_certificate /etc/nginx/ssl/seahub.crt;            # Pfad zu Ihrem cacert.pem
        ssl_certificate_key /etc/nginx/ssl/seahub.key;    # Pfad zu Ihrem privkey.pem
        server_name 192.168.178.77;

location / {
      proxy_pass         http://127.0.0.1:8000;
      proxy_set_header   Host $host:8001;
      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;     # not sure if necessary 

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

        location /seafhttp {
            rewrite ^/seafhttp(.*)$ $1 break;
            proxy_pass http://127.0.0.1:8082;
            client_max_body_size 0;
        }

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

Can it be that the update of the Autostart no longer works?
If I seafiel service times started manually after the start of the PI.

/home/seafile/seafile/seafile-server-latest/seafile.sh start
/home/seafile/seafile/seafile-server-latest/seahub.sh start-fastcgi

https://192.168.178.77:8001/ I will be forwarded here http://192.168.178.77:8001/accounts/login?next=/
400 Bad Request
The plain HTTP request was sent to HTTPS port
nginx/1.6.2

The autostart must be changed to wscgi (not fastcgi). Wenn you use wscgi you don’t need to start with seahub.sh start-fastcgi. You only use seahub.sh start

OK. Now i make the Update 6.2.2.

Now this ist my Problem

/home/seafile/seafile/seafile-server-latest/seafile.sh start

[09/30/17 17:17:22] …/common/session.c(132): using config file /home/seafile/seafile/conf/ccnet.conf
[09/30/17 17:17:22] …/common/ccnet-db.c(142): Error exec query CREATE UNIQUE INDEX IF NOT EXISTS reference _id_index on EmailUser (reference_id): sqlite3_exec failed: table EmailUser has no column named reference_i d.
failed to run “ccnet-server -t”

you can read more about this problem here, in this thread.

Have you runned the upgrade script?