Error:Seahub failed to start

Hello,

I move seafile database from one server (postgresql on centos 7) to other (dump and restore BDD + rsync of data and seafile directory)
On the new server (postgresql on centos 7) I use the same folder name an PATH than old serv.

./seafile.sh start
[03/02/17 12:07:04] ../common/session.c(132): using config file /seafile/haiwen/conf/ccnet.conf
NOTICE:  la relation « emailuser » existe déjà, poursuite du traitement
NOTICE:  la relation « binding » existe déjà, poursuite du traitement
NOTICE:  la relation « userrole » existe déjà, poursuite du traitement
NOTICE:  la relation « ldapusers » existe déjà, poursuite du traitement
NOTICE:  la relation « Group » existe déjà, poursuite du traitement
NOTICE:  la relation « groupuser » existe déjà, poursuite du traitement
NOTICE:  la relation « groupdnpair » existe déjà, poursuite du traitement
NOTICE:  la relation « organization » existe déjà, poursuite du traitement
NOTICE:  la relation « orguser » existe déjà, poursuite du traitement
NOTICE:  la relation « orggroup » existe déjà, poursuite du traitement
Starting seafile server, please wait ...
Seafile server started

./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

ls -ltr /seafile/haiwen/logs/
...
-rw-r--r--. 1 haiwen haiwen     37659  2 mars  12:07 controller.log
-rw-r--r--. 1 haiwen haiwen    504895  2 mars  12:07 seafile.log
-rw-r--r--. 1 haiwen haiwen  60738305  2 mars  12:07 ccnet.log


ccnet.log
[03/02/17 12:07:05] ../common/session.c(132): using config file /seafile/haiwen/conf/ccnet.conf
[03/02/17 12:07:05] ../common/session.c(455): socket file exists, delete it anyway
[03/02/17 12:07:05] ../common/session.c(484): Listen on /seafile/haiwen/ccnet/ccnet.sock for local clients
[03/02/17 12:07:05] ../common/session.c(290): Update pubinfo file
[03/02/17 12:07:05] ../common/connect-mgr.c(515): Opened port 10001 to listen for incoming peer connections
[03/02/17 12:07:06] ../common/session.c(398): Accepted a local client
[03/02/17 12:07:06] ../common/session.c(398): Accepted a local client
[03/02/17 12:07:06] ../common/session.c(398): Accepted a local client
[03/02/17 12:07:06] ../common/session.c(398): Accepted a local client
[03/02/17 12:07:18] ../common/session.c(398): Accepted a local client
[03/02/17 12:07:18] ../common/peer.c(943): Local peer down

seafile.log
[03/02/2017 12:07:06 PM] ../common/mq-mgr.c(54): [mq client] mq cilent is started
[03/02/2017 12:07:06 PM] listen-mgr.c(120): listen on port 12001 for block tranfer

controller.log
[03/02/17 12:00:34] seafile-controller.c(88): spawned /bin/python2.7, pid 4554
[03/02/17 12:07:05] seafile-controller.c(154): starting ccnet-server ...
[03/02/17 12:07:05] seafile-controller.c(73): spawn_process: ccnet-server -F /seafile/haiwen/conf -c /seafile/haiwen/ccnet -f /seafile/haiwen/logs/ccnet.log -d -P /seafile/haiwen/pids/ccnet.pid
[03/02/17 12:07:05] seafile-controller.c(88): spawned ccnet-server, pid 3200
[03/02/17 12:07:06] seafile-controller.c(555): ccnet daemon connected.
[03/02/17 12:07:06] seafile-controller.c(186): starting seaf-server ...
[03/02/17 12:07:06] seafile-controller.c(73): spawn_process: seaf-server -F /seafile/haiwen/conf -c /seafile/haiwen/ccnet -d /seafile/haiwen/seafile-data -l /seafile/haiwen/logs/seafile.log -P /seafile/haiwen/pids/seaf-server.pid
[03/02/17 12:07:06] seafile-controller.c(88): spawned seaf-server, pid 3206
[03/02/17 12:07:06] seafile-controller.c(396): pid file /seafile/haiwen/pids/seafdav.pid does not exist
[03/02/17 12:07:06] seafile-controller.c(73): spawn_process: /bin/python2.7 -m wsgidav.server.run_server runfcgi --log-file /seafile/haiwen/logs/seafdav.log --pid /seafile/haiwen/pids/seafdav.pid --port 18080 --host localhost
[03/02/17 12:07:06] seafile-controller.c(88): spawned /bin/python2.7, pid 3207

Could someone please help me ?
Thanks !

try ./seahub.sh start-fastcgi, this will show error details.

2 Likes

Try these two commands:

sudo rm /tmp/seahub_cache -rf
sudo rm /runtime/*.log
1 Like

Invaluable. This shold absolutely be in the docs.

1 Like

This just was a complete showstopper for Seafile for me, as I had run it as a different user before. This also should be in the docs. Thanks!

Probably related to changes in Debian (buster) and Ubuntu (18 → 20.4), I encountered this problem as well. However, the failure notice on the end of start-fastgci was as follows:

django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Did you install mysqlclient?

After following & trying a couple of tips out there I finally found the following crucial install:

apt install default-libmysqlclient-dev

since Ubuntu 20.4, the former package name is prepended by “default-”!
(with thanks to www.edureka(dot)co/community/96803/install-mysql-python-environmenterror-mysql-config-found)

It is important to install mysqlclient via pip3:

pip3 install mysqlclient

I’d suggest to add the above apt install to the server installation manual (it took a few hours before I got it right).

1 Like

This one reason LINUX is having a hard time taking off main stream is because of things like this… I am not a pro linux user, more of a tinker in that i am moving away from windows to do daily stuff but when things like trying to install seafile was suppose to be as easy as extract file and run the setup… SAYS it on its own website…

My ERROR: and yes installed mysqlite3, python3
the
/seafile/seafile-server-9.0.4$ sudo ./seahub.sh start-fastcgi
THE SEAFILE server started no issues the SEAFILE HUB fails

LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub (fastcgi) at 127.0.0.1:8000 …
Traceback (most recent call last):
File “/seafile/seafile-server-9.0.4/seahub/manage.py”, line 10, in
execute_from_command_line(sys.argv)
File “/seafile/seafile-server-9.0.4/seahub/thirdpart/django/core/management/init.py”, line 419, in execute_from_command_line
utility.execute()
File “/seafile/seafile-server-9.0.4/seahub/thirdpart/django/core/management/init.py”, line 395, in execute
django.setup()
File “/seafile/seafile-server-9.0.4/seahub/thirdpart/django/init.py”, line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File “/seafile/seafile-server-9.0.4/seahub/thirdpart/django/apps/registry.py”, line 91, in populate
app_config = AppConfig.create(entry)
File “/seafile/seafile-server-9.0.4/seahub/thirdpart/django/apps/config.py”, line 224, in create
import_module(entry)
File “/usr/lib/python3.8/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1014, in _gcd_import
File “”, line 991, in _find_and_load
File “”, line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘captcha’
Error:Seahub failed to start.