When I visit the website from my seafile server, only “502 Bad Gateway nginx/1.14.0 (Ubuntu)” is shown. I have checked the server and found out that seahub does not start anymore. In syslog the following information for “(seafile|seahub)” is shown (after a reboot):
Oct 28 16:42:25 Seafile seafile.sh[1021]: [10/28/19 16:42:25] …/common/session.c(132): using config file /opt/seafile/conf/ccnet.conf
Oct 28 16:42:25 Seafile seafile.sh[1021]: Starting seafile server, please wait …
Oct 28 16:42:25 Seafile seafile-controller[1058]: seafile-controller.c(154): starting ccnet-server …
Oct 28 16:42:25 Seafile seafile-controller[1058]: seafile-controller.c(73): spawn_process: ccnet-server -F /opt/seafile/conf -c /opt/seafile/ccnet -f /opt/seafile/logs/ccnet.log -d -P /opt/seafile/pids/cc
Oct 28 16:42:25 Seafile seafile-controller[1058]: seafile-controller.c(88): spawned ccnet-server, pid 1059
Oct 28 16:42:26 Seafile seafile-controller[1060]: seafile-controller.c(555): ccnet daemon connected.
Oct 28 16:42:26 Seafile seafile-controller[1060]: seafile-controller.c(186): starting seaf-server …
Oct 28 16:42:26 Seafile seafile-controller[1060]: seafile-controller.c(73): spawn_process: seaf-server -F /opt/seafile/conf -c /opt/seafile/ccnet -d /opt/seafile/seafile-data -l /opt/seafile/logs/seafile.
Oct 28 16:42:26 Seafile seafile-controller[1060]: seafile-controller.c(88): spawned seaf-server, pid 1063
Oct 28 16:42:26 Seafile seafile-controller[1060]: seafile-controller.c(528): seafdav not enabled.
Oct 28 16:42:26 Seafile seaf-server[1064]: …/common/mq-mgr.c(54): [mq client] mq cilent is started
Oct 28 16:42:26 Seafile seaf-server[1064]: listen-mgr.c(120): listen on port 12001 for block tranfer
Oct 28 16:42:27 Seafile seaf-server[1064]: size-sched.c(96): Repo size compute queue size is 0
Oct 28 16:42:28 Seafile seafile.sh[1021]: Seafile server started
Oct 28 16:42:28 Seafile seafile.sh[1021]: Done.
Oct 28 16:42:28 Seafile seahub.sh[1079]: LC_ALL is not set in ENV, set to en_US.UTF-8
Oct 28 16:42:28 Seafile seahub.sh[1079]: Starting seahub at port 8000 …
Oct 28 16:42:33 Seafile seahub.sh[1079]: #033[33mError:Seahub failed to start.#033[m
Oct 28 16:42:33 Seafile seahub.sh[1079]: Please try to run “./seahub.sh start” again
Oct 28 16:42:33 Seafile systemd[1]: seahub.service: Main process exited, code=exited, status=1/FAILURE
Oct 28 16:42:33 Seafile systemd[1]: seahub.service: Failed with result ‘exit-code’.
This is /etc/nginx/sites-enabled/seafile.conf:
server {
listen 8443;
server_name seafile.mydomain;
I have upgraded ubuntu on this server from 16.04 to 18.04 ten days ago, but I didn’t realize that seafile didn’t work. Maybe the upgrade isn’t the reason.
I configured seahub_settings.py for the syslog integration of seahub (syslog integration). So there is no file logs/seahub.log. These lines from syslog and systemd’s journalctl are the only information for seahub which I can find:
syslog:
Oct 31 12:32:20 Seafile systemd[1]: Starting Seafile hub...
Oct 31 12:32:20 Seafile seahub.sh[12889]: LC_ALL is not set in ENV, set to en_US.UTF-8
Oct 31 12:32:20 Seafile seahub.sh[12889]: Starting seahub at port 8000 ...
Oct 31 12:32:26 Seafile seahub.sh[12889]: #033[33mError:Seahub failed to start.#033[m
Oct 31 12:32:26 Seafile seahub.sh[12889]: Please try to run "./seahub.sh start" again
Oct 31 12:32:26 Seafile systemd[1]: seahub.service: Main process exited, code=exited, status=1/FAILURE
Oct 31 12:32:26 Seafile systemd[1]: seahub.service: Failed with result 'exit-code'.
Oct 31 12:32:26 Seafile systemd[1]: Failed to start Seafile hub.
journalctl -xe:
Okt 31 12:32:16 Seafile polkitd(authority=local)[861]: Registered Authentication Agent for unix-process:12880:24419901 (system bus name :1.160 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale de_DE.UTF-8)
Okt 31 12:32:20 Seafile polkitd(authority=local)[861]: Operator of unix-process:12880:24419901 successfully authenticated as unix-user:sfadmin to gain ONE-SHOT authorization for action org.freedesktop.systemd1.manage-units for system-bus-name::1.161 [systemctl start seahub.service] (owned by unix-user:sfadmin)
Okt 31 12:32:20 Seafile systemd[1]: Starting Seafile hub...
-- Subject: Unit seahub.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit seahub.service has begun starting up.
Okt 31 12:32:20 Seafile seahub.sh[12889]: LC_ALL is not set in ENV, set to en_US.UTF-8
Okt 31 12:32:20 Seafile seahub.sh[12889]: Starting seahub at port 8000 ...
Okt 31 12:32:26 Seafile seahub.sh[12889]: Error:Seahub failed to start.
Okt 31 12:32:26 Seafile seahub.sh[12889]: Please try to run "./seahub.sh start" again
Okt 31 12:32:26 Seafile systemd[1]: seahub.service: Main process exited, code=exited, status=1/FAILURE
Okt 31 12:32:26 Seafile systemd[1]: seahub.service: Failed with result 'exit-code'.
Okt 31 12:32:26 Seafile systemd[1]: Failed to start Seafile hub.
-- Subject: Unit seahub.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit seahub.service has failed.
--
-- The result is RESULT.
Okt 31 12:32:26 Seafile polkitd(authority=local)[861]: Unregistered Authentication Agent for unix-process:12880:24419901 (system bus name :1.160, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale de_DE.UTF-8) (disconnected from bus)
Btw when I undo the changes for syslog integraton in seahub_settings.py there is no logs/seahub.log created, but the information still is shown in syslog.
Unfortunately I can’t show more information. No logs are saved, when I try to start seahub. Syslog shows only information for seahub’s systemd service. But it’s same info as if I start seahub manually.
/opt/seafile/seafile-server-latest$ sudo ./seahub.sh start
LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub at port 8000 ...
Error:Seahub failed to start.
Please try to run "./seahub.sh start" again
Hi,
if seahub log no much information then maybe your seahub_setting.py config wrongly.
i always have that error if i have any typo issue the seahub can not start.
you may want to share your seahub_setting.py here
also you enable the debug mode in seahub already… maybe can try and i am able to see more things after enable it
can refer to here
Unfortunately no log is generated even after activating the DEBUG mode. Also I don’t get any more information when starting seahub with DEBUG activated.
I can’t find much information / logs for seahub. syslog shows only those lines which I have already listed. For nginx shows two more log files seahub.access,log and seahub.error.log. But they aren’t of any use for this issue:
Finally I configured a new server and restored the backup (files and mysql db). Now everything and especially seahub works properly. The upgrade to the latest version 7.1.3 is successful completed.
Unfortunately I could not find out what prevented seahub from starting on the original server.