Seafile server 6.2.0 beta is ready for testing!

There is a problem in sqlite upgrade, you can find ccnet/PeerMgr/usermgr.db and manually run sqls below:

sqlite3 usermgr.db
alter table LDAPUsers add column reference_id VARCHAR(255);
alter table EmailUser add column reference_id VARCHAR(255);
CREATE UNIQUE INDEX IF NOT EXISTS reference_id_index on EmailUser (reference_id);
CREATE UNIQUE INDEX IF NOT EXISTS ldapusers_reference_id_index on LDAPUsers(reference_id);

@Plague @raimue

Thank you @haikuo. The database fixed, the other problem jumped in:

Starting seahub at port 8000 ...
Traceback (most recent call last):
  File "/opt/seafile/seafile-server-6.2.0/seahub/thirdpart/gunicorn", line 9, in <module>
    load_entry_point('gunicorn==19.4.5', 'console_scripts', 'gunicorn')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 542, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2569, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2229, in load
    return self.resolve()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2235, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/opt/seafile/seafile-server-6.2.0/seahub/thirdpart/gunicorn-19.4.5-py2.7.egg/gunicorn/app/wsgiapp.py", line 10, in <module>
    from gunicorn.app.base import Application
  File "/opt/seafile/seafile-server-6.2.0/seahub/thirdpart/gunicorn-19.4.5-py2.7.egg/gunicorn/app/base.py", line 14, in <module>
    from gunicorn.config import Config, get_default_config_file
  File "/opt/seafile/seafile-server-6.2.0/seahub/thirdpart/gunicorn-19.4.5-py2.7.egg/gunicorn/config.py", line 17, in <module>
    import ssl
  File "/usr/lib/python2.7/ssl.py", line 97, in <module>
    import _ssl             # if we can't import it, let the error propagate
ImportError: /usr/lib/python2.7/lib-dynload/_ssl.x86_64-linux-gnu.so: symbol SSL_CTX_set_alpn_protos, version OPENSSL_1.0.2 not defined in file libssl.so.1.0.0 with link time reference

This happens only when I start Seahub with ./seahub.sh start.
No problem when started with ./seahub.sh start-fastcgi though…
Any idea?

What operation system do you use? Ubuntu 16.04?

Yes. It is 16.04

Thank you, the SQL statements fixed the database problem for me.

Syncing with the Seafile desktop client works now and Seahub started on Debian 9 stretch (still using fcgi, though). However, Seahub fails to serve pages with “Page unavailable” after login. Now I will have to investigate where this is coming from.

Hmm… After fixing db-problem I get:
502 Bad Gateway

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name seafile.mydomain.de;

ssl_protocols TLSv1.2;
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-SHA2$
ssl_prefer_server_ciphers On;

ssl_certificate /etc/letsencrypt/live/seafile.mydomain.de/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/seafile.mydomain.de/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/seafile.mydomain.de/chain.pem;

ssl_session_cache shared:SSL:128m;
add_header Strict-Transport-Security "max-age=31557600; includeSubDomains";
ssl_stapling on;
ssl_stapling_verify on;

add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "DENY" always;
add_header X-Xss-Protection "1";

add_header Content-Security-Policy "default-src 'self' 'unsafe-inline' 'unsafe-eval' data: blob: https://co.mydomain.de";
add_header Referrer-Policy same-origin;

proxy_set_header X-Forwarded-For $remote_addr;

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;

    client_max_body_size 0;

    access_log off;
    error_log /var/log/nginx/seahub.error.log error;
    fastcgi_read_timeout 36000;
}

location /seafhttp {
    rewrite ^/seafhttp(.*)$ $1 break;
    proxy_pass http://127.0.0.1:8082;
    client_max_body_size 0;
    proxy_connect_timeout  36000s;
    proxy_read_timeout  36000s;
    proxy_send_timeout  36000s;
    send_timeout  36000s;
    proxy_request_buffering off;
    proxy_http_version 1.1;
}

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

Anyone could help please?

Fixed my Seahub. I also had to manually apply the DB upgrade for Seahub by running the SQLite3 queries in seafile-server-6.2.0/upgrade/sql/6.2.0/sqlite/seahub.sql against seahub.db.

That fixed it for me, too.
Thank you!

Could you pls check if you already got the below installed and linked to the correct environment?

apt-get update -y
apt-get install -y libssl-dev

I have installed libssl-dev how should I link it to the environment?

@Jack_Miller any suggestion?

Please provide a properly displayed code example. Ty! :slight_smile:

Hello everybody,

6.1.2 to 6.2.1 failed to upgrade SQLlite DB for me :’(
[seafile@birdie upgrade]$ sh upgrade_6.1_6.2.sh


This script would upgrade your seafile server from 6.1 to 6.2
Press [ENTER] to contiune

Updating seafile/seahub database …

[INFO] You are using SQLite3
[INFO] updating seahub database…
Traceback (most recent call last):
File “/home/sites/teufou.net/seafile/seafile-server-6.2.1/upgrade/db_update_helper.py”, line 363, in
main()
File “/home/sites/teufou.net/seafile/seafile-server-6.2.1/upgrade/db_update_helper.py”, line 358, in main
db_updater.update_db()
File “/home/sites/teufou.net/seafile/seafile-server-6.2.1/upgrade/db_update_helper.py”, line 259, in update_db
super(SQLiteDBUpdater, self).update_db()
File “/home/sites/teufou.net/seafile/seafile-server-6.2.1/upgrade/db_update_helper.py”, line 120, in update_db
self.update_seahub_sql(seahub_sql)
File “/home/sites/teufou.net/seafile/seafile-server-6.2.1/upgrade/db_update_helper.py”, line 283, in update_seahub_sql
self.apply_sqls(self.seahub_db, sql_path)
File “/home/sites/teufou.net/seafile/seafile-server-6.2.1/upgrade/db_update_helper.py”, line 273, in apply_sqls
conn.execute(line)
sqlite3.OperationalError: no such table: sysadmin_extra_userloginlog

Failed to upgrade your database

any suggestion ?

Best Regards

Just a little question: Testing WSGI mode here (with 6.1.2 version, 6.2.1 isnt out for rpi), but thats working fine. The only problem is login page, after typing user and password it didnt redirect to library page. But login works, as if i manually type server adress (which is https://xyz:8001) i get library page. Nginx config is same like posted above, nothing else changed, with fcgi login works normal.
Maybe thats only while using older 6.1.2 version and i have to wait for new 6.2.1? or did i something wrong?

server {
    listen 8001 ssl http2;
	  
    ssl_certificate /etc/nginx/ssl/###.crt;
    ssl_certificate_key /etc/nginx/ssl/###.key;
    server_name ###;
  	proxy_set_header X-Forwarded-For $remote_addr;
	add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
    server_tokens off;
	
    client_max_body_size 10G; # set max upload size
    
	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;
    }
	
    location /seafhttp {
        rewrite ^/seafhttp(.*)$ $1 break;
        proxy_pass http://127.0.0.1:8082;
        client_max_body_size 0;
		proxy_connect_timeout  36000s;
        proxy_read_timeout  36000s;
		proxy_send_timeout  36000s;
	    send_timeout  36000s;
        proxy_request_buffering off;
        proxy_http_version 1.1;
	}
    
    #location /media {
    #    root /root/seafile-server-latest/seahub;
    #}
location /seafdav {
        fastcgi_pass    127.0.0.1:8090;
        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;

        client_max_body_size 0;

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

I’m having the same problem as you and the others are describing. Can you elaborate on this step? Thanks. I’m not exactly sure on how to proceed to carry out what you wrote.

6.2.1 was released as stable before the 14 days of beta time were over. 6.2.1 still has some bugs, hence is still rather beta than stable.
If you state on your website that you run 2 weeks in beta please stick to it. It is not consequent and gives an impression that you don’t care much about what you tell/sell your clients. :frowning:

Thanks for making CE available to us.

1 Like

In your nginx config can you reorder the modules this way and see if the error still repeats? I have the same issue with 6.1.2 with Apache.

The order:

location /seafdav

and then

location /seafhttp

It seems to have solved the issue for me: URL rewrite issue. sf.domain.tld/seafdav turns in to sf.domain.tldseafdav

I don’t know why table sysadmin_extra_userloginlog is missing in your sqlite3 db. Anyway, you can create it by yourself via the following sentence:

CREATE TABLE "sysadmin_extra_userloginlog" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "username" varchar(255) NOT NULL, "login_date" datetime NOT NULL, "login_ip" varchar(128) NOT NULL);
CREATE INDEX "sysadmin_extra_userloginlog_14c4b06b" ON "sysadmin_extra_userloginlog" ("username");
CREATE INDEX "sysadmin_extra_userloginlog_28ed1ef0" ON "sysadmin_extra_userloginlog" ("login_date");

then rerun upgrade_6.1_6.2.sh。

@Captain_Rage I don’t know and have not checked if 6.2.2 fixed this already, but what I had to run was sqlite3 seahub.db < seafile-server-latest/upgrade/sql/6.2.0/sqlite/seahub.sql.

2 Likes

It is for “about 2 weeks”, not for exactly 2 weeks. As the SQLite upgrade script bug is urgent, we publish a new version sooner than waiting 2 weeks. As I don’t see there are other significant bugs, I remove the beta mark.

2 Likes