Upgrade from 6.2.2 to 6.3.1 - Can't access via browser


#1

Tried to upgraded from 6.2.2 to 6.3.1

I ran

seafile-server-latest/seahub.sh stop
seafile-server-latest/seafile.sh stop

upgrade_6.2_6.3.sh

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

I can’t access the server from a browser (server running apache)

Logs:

gunicorn_error.log
[2018-07-03 20:37:51 +0000] [1957] [INFO] Starting gunicorn 19.8.1
[2018-07-03 20:37:51 +0000] [1957] [INFO] Listening at: http://0.0.0.0:8000 (1957)
[2018-07-03 20:37:51 +0000] [1957] [INFO] Using worker: sync
[2018-07-03 20:37:51 +0000] [1965] [INFO] Booting worker with pid: 1965
[2018-07-03 20:37:51 +0000] [1966] [INFO] Booting worker with pid: 1966
[2018-07-03 20:37:51 +0000] [1967] [INFO] Booting worker with pid: 1967
[2018-07-03 20:37:52 +0000] [1968] [INFO] Booting worker with pid: 1968
[2018-07-03 20:37:52 +0000] [1969] [INFO] Booting worker with pid: 1969

ccnet.log
[07/03/18 16:32:24] …/common/session.c(132): using config file /home/cloud/Seafile/conf/ccnet.conf
[07/03/18 16:32:24] …/common/session.c(455): socket file exists, delete it anyway
[07/03/18 16:32:24] …/common/session.c(484): Listen on /home/cloud/Seafile/ccnet/ccnet.sock for local clients
[07/03/18 16:32:24] …/common/session.c(290): Update pubinfo file
[07/03/18 16:32:25] …/common/session.c(398): Accepted a local client
[07/03/18 16:32:25] …/common/session.c(398): Accepted a local client
[07/03/18 16:32:25] …/common/session.c(398): Accepted a local client
[07/03/18 16:32:25] …/common/session.c(398): Accepted a local client
[07/03/18 16:37:51] …/common/session.c(398): Accepted a local client
[07/03/18 16:37:51] …/common/peer.c(943): Local peer down

seafile.log
[07/03/18 16:32:25] http-server.c(163): fileserver: worker_threads = 10
[07/03/18 16:32:25] http-server.c(178): fileserver: fixed_block_size = 8388608
[07/03/18 16:32:25] http-server.c(193): fileserver: web_token_expire_time = 3600
[07/03/18 16:32:25] http-server.c(208): fileserver: max_indexing_threads = 1
[07/03/18 16:32:25] http-server.c(223): fileserver: max_index_processing_threads= 3
[07/03/2018 04:32:25 PM] …/common/mq-mgr.c(54): [mq client] mq cilent is started
[07/03/2018 04:32:26 PM] size-sched.c(96): Repo size compute queue size is 0
[07/03/2018 04:37:26 PM] size-sched.c(96): Repo size compute queue size is 0

controller.log
[07/03/18 16:32:24] seafile-controller.c(169): starting ccnet-server …
[07/03/18 16:32:24] seafile-controller.c(73): spawn_process: ccnet-server -F /home/cloud/Seafile/conf -c /home/cloud/Seafile/ccnet -f /home/cloud/Seafile/logs/ccnet.log -d -P /home/cloud/Seafile/pids/ccnet.pid
[07/03/18 16:32:24] seafile-controller.c(88): spawned ccnet-server, pid 1909
[07/03/18 16:32:25] seafile-controller.c(571): ccnet daemon connected.
[07/03/18 16:32:25] seafile-controller.c(201): starting seaf-server …
[07/03/18 16:32:25] seafile-controller.c(73): spawn_process: seaf-server -F /home/cloud/Seafile/conf -c /home/cloud/Seafile/ccnet -d /home/cloud/Seafile/seafile-data -l /home/cloud/Seafile/logs/seafile.log -P /home/cloud/Seafile/pids/seaf-server.pid
[07/03/18 16:32:25] seafile-controller.c(88): spawned seaf-server, pid 1914
[07/03/18 16:32:25] seafile-controller.c(544): seafdav not enabled.


#2

Maybe you can try this.


#3

Maybe you can post the seahub.log, too? I guess seafile is working with the seafile client?
Does the new folder “/home/cloud/Seafile/seafile-server-6.3.1/” is chowned by the seafile user? (chown -R seafile:seafile /home/cloud/Seafile/seafile-server-6.3.1/)


#4

seafile.log I do see a “error:Seahub failed to start” in seahub.init.log (see below)

[07/10/18 12:26:04] http-server.c(178): fileserver: fixed_block_size = 8388608
[07/10/18 12:26:04] http-server.c(193): fileserver: web_token_expire_time = 3600
[07/10/18 12:26:04] http-server.c(208): fileserver: max_indexing_threads = 1
[07/10/18 12:26:04] http-server.c(223): fileserver: max_index_processing_threads= 3
[07/10/2018 12:26:04 PM] …/common/mq-mgr.c(54): [mq client] mq cilent is started
[07/10/2018 12:26:05 PM] size-sched.c(96): Repo size compute queue size is 0

I did find seahub.init.log date Jul 3

About to perform start for seahub at 2018-07-03T15:21:16-0400

LANG is not set in ENV, set to en_US.UTF-8
LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub (fastcgi) at 127.0.0.1:8000 …

Warning: File comment has changed since version 6.3, while table base_filecomment is not migrated yet, please consider migrate it according to v6.3.0 release note, otherwise the file comment feature will not work correctly.

Error:Seahub failed to start.

About to perform stop for seahub at 2018-07-03T15:21:27-0400

Seahub is not running
Done.


#5

I see the following in the apache2 error log - I think I saw a post that sez FASTCGI is no longer supported

Could that be the problem and how do I fix it

Tue Jul 10 10:47:31.622638 2018] [fastcgi:error] [pid 6919] (111)Connection refused: [client 172.16.50.50:59161] FastCGI: failed to connect to server “/var/www/seahub.fcgi”: connect() failed
[Tue Jul 10 10:47:31.622708 2018] [fastcgi:error] [pid 6919] [client 172.16.50.50:59161] FastCGI: incomplete headers (0 bytes) received from server “/var/www/seahub.fcgi”


#6

Yes since 6.3.1 FastCGI is no longer supported, also described here: https://github.com/haiwen/seafile-rpi/releases/tag/v6.3.1

And to fix this issue you have to configure your Apache/Nginx to use WSGI Mode and also start just with ./seahub.sh start instead of ./seahub.sh start-fastcgi if you start manually or edit your unit file or initscript with whith this little correction. Also on github is the description: https://github.com/haiwen/seafile-rpi/releases/tag/v6.3.1

Hope this helps.


#7

It helps a little - So I know I have to change from FastCGI to someotherport or WSGI mode I’m not sure what I have to change in … conf/gunicorn.conf & I have to remember where the startup file is rc3.d maybe … Ahh I did it in /etc/init.d/seafile-server

import os

daemon = True
workers = 5

default localhost:8000

bind = “0.0.0.0:8000”

Pid

pids_dir = ‘/home/cloud/Seafile/pids’
pidfile = os.path.join(pids_dir, ‘seahub.pid’)

Logging

logs_dir = ‘/home/cloud/Seafile/logs’
errorlog = os.path.join(logs_dir, ‘gunicorn_error.log’)
accesslog = os.path.join(logs_dir, ‘gunicorn_access.log’)

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

timeout = 1200

limit_request_line = 8190


#8

OK so I modified/added this to my /etc/apache2/sites-available/default-ssl.conf

seahub

##Not Working with 6.x RewriteRule ^/(media.)$ /$1 [QSA,L,PT]
##Not Working with 6.3 RewriteCond %{REQUEST_FILENAME} !-f
##Not Working with 6.3 RewriteRule ^(.
)$ /seahub.fcgi/$1 [QSA,L,E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

#WSGI Mode
SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1
ProxyPass / http://127.0.0.1:8000/
ProxyPassReverse / http://127.0.0.1:8000/

and the server started

I ran

./seahub.sh python-env seahub/manage.py migrate_file_comment

I modified /etc/init.d/seafile-server to remove all the fastcgi stuff, setting the var FASTCGI to false

fastcgi=false

Now I can browser to the seafile BUT My custom color settings seem to be gone

seahub_settings.py does have the setting

BRANDING_CSS = ‘custom/custom.css’

and the custom file does exist


#9

Glad that everything works now, branding was fixed in 6.3.2