Can not start seahub

6,089 views
Skip to first unread message

Emil Sandnabba

unread,
Aug 17, 2013, 6:16:55 PM8/17/13
to sea...@googlegroups.com
Hello!

I have a fresh install of Seafile on a Ubuntu 12.04 server.
Seafile (./seafile.sh start) starts fine, but seahub fails with the following:

seafile@sandnabba: ~/seafile-server-1.8.0 $> ./seahub.sh start

Starting seahub at port 8000 ...
Loading ccnet config from /home/seafile/ccnet
Loading seafile config from /filer/seafile
Error:Seahub failed to start.
Please try to run "./seafile.sh start" again


seafile@sandnabba: ~/seafile-server-1.8.0 $> ./seafile.sh start

Seafile controller is already running, pid 20309

I have enabled debugging in seahub_settings.py, but logs/seahub.log is empty!?

Any ideas?

Shuai Lin

unread,
Aug 18, 2013, 10:57:59 PM8/18/13
to sea...@googlegroups.com
Hi,

Can you find these two log files?

seafile-server-1.8.0/runtime/access.log
seafile-server-1.8.0/runtime/error.log

Regards,
Lin


--
You received this message because you are subscribed to the Google Groups "seafile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seafile+u...@googlegroups.com.
To post to this group, send email to sea...@googlegroups.com.
Visit this group at http://groups.google.com/group/seafile.
For more options, visit https://groups.google.com/groups/opt_out.

Emil Sandnabba

unread,
Aug 19, 2013, 4:50:57 PM8/19/13
to sea...@googlegroups.com
Yes, access.log is empty however.
error.log contains only the following:

2013-08-18 05:50:06 [19671] [INFO] Starting gunicorn 0.16.1
2013-08-18 05:55:17 [19840] [INFO] Starting gunicorn 0.16.1
2013-08-18 06:05:36 [20262] [INFO] Starting gunicorn 0.16.1
2013-08-18 06:09:30 [20355] [INFO] Starting gunicorn 0.16.1

Lingtao Pan

unread,
Aug 20, 2013, 2:47:06 AM8/20/13
to sea...@googlegroups.com
Can you modify seahub.sh as

function start_seahub () {
    before_start;
    echo "Starting seahub at port ${port} ..."
    echo "CCNET_CONF_DIR is $CCNET_CONF_DIR"
    echo "SEAFILE_CONF_DIR is $SEAFILE_CONF_DIR"
    echo "PYTHON PATH is $PYTHONPATH"
    echo $PYTHON "${manage_py}" run_gunicorn -c "${gunicorn_conf}" -b "0.0.0.0:${port}"
    $PYTHON "${manage_py}" run_gunicorn -c "${gunicorn_conf}" -b "0.0.0.0:${port}"


And run "seahub.sh start" again to print the environment set by the seahub.sh.

Then you can start seahub manually such as:

    export CCNET_CONF_DIR=/home/plt/Downloads/seafile2/ccnet
    export SEAFILE_CONF_DIR=/home/plt/Downloads/seafile2/seafile-data
    export PYTHONPATH=/home/plt/Downloads/seafile2/seafile-server-1.8.0/seafile/lib/python2.7/site-packages:/home/plt/Downloads/seafile2/seafile-server-1.8.0/seafile/lib64/python2.7/site-packages:/home/plt/Downloads/seafile2/seafile-server-1.8.0/seafile/lib/python2.6/site-packages:/home/plt/Downloads/seafile2/seafile-server-1.8.0/seafile/lib64/python2.6/site-packages:/home/plt/Downloads/seafile2/seafile-server-1.8.0/seahub/thirdpart
    python2.7 /home/plt/Downloads/seafile2/seafile-server-1.8.0/seahub/manage.py run_gunicorn -b 0.0.0.0:8000

This will give more information on when gunicorn failed to start.

Emil Sandnabba

unread,
Aug 21, 2013, 6:09:21 PM8/21/13
to sea...@googlegroups.com
Tried with that, but it seems like there is no differance. I have also upgraded to version 1.8.1.

seafile@sandnabba: ~/seafile-server-1.8.1 $> ./seahub.sh start                                                                                                                                                                                    

Starting seahub at port 8000 ...                                                                                                                                                                                                                  
CCNET_CONF_DIR is /home/seafile/ccnet
SEAFILE_CONF_DIR is /filer/seafile
PYTHON PATH is /home/seafile/seafile-server-1.8.1/seafile/lib/python2.7/site-packages:/home/seafile/seafile-server-1.8.1/seafile/lib64/python2.7/site-packages:/home/seafile/seafile-server-1.8.1/seafile/lib/python2.6/site-packages:/home/seafile/seafile-server-1.8.1/seafile/lib64/python2.6/site-packages:/home/seafile/seafile-server-1.8.1/seahub/thirdpart:/home/seafile/seafile-server-1.8.1/seafile/lib/python2.7/site-packages:/home/seafile/seafile-server-1.8.1/seafile/lib64/python2.7/site-packages:/home/seafile/seafile-server-1.8.1/seafile/lib/python2.6/site-packages:/home/seafile/seafile-server-1.8.1/seafile/lib64/python2.6/site-packages:/home/seafile/seafile-server-1.8.1/seahub/thirdpart:
python2.7 /home/seafile/seafile-server-1.8.1/seahub/manage.py run_gunicorn -c /home/seafile/seafile-server-1.8.1/runtime/seahub.conf -b 0.0.0.0:8000

Loading ccnet config from /home/seafile/ccnet
Loading seafile config from /filer/seafile
Error:Seahub failed to start.
Please try to run "./seafile.sh start" again

seafile@sandnabba: ~/seafile-server-1.8.1 $> export CCNET_CONF_DIR=/home/seafile/ccnet
seafile@sandnabba: ~/seafile-server-1.8.1 $> export SEAFILE_CONF_DIR=/filer/seafile
seafile@sandnabba: ~/seafile-server-1.8.1 $> export PYTHONPATH=/home/seafile/seafile-server-1.8.1/seafile/lib/python2.7/site-packages:/home/seafile/seafile-server-1.8.1/seafile/lib64/python2.7/site-packages:/home/seafile/seafile-server-1.8.1/seafile/lib/python2.6/site-packages:/home/seafile/seafile-server-1.8.1/seafile/lib64/python2.6/site-packages:/home/seafile/seafile-server-1.8.1/seahub/thirdpart:

seafile@sandnabba: ~/seafile-server-1.8.1 $> python2.7 /home/seafile/seafile-server-1.8.1/seahub/manage.py run_gunicorn -c /home/seafile/seafile-server-1.8.1/runtime/seahub.conf -b 0.0.0.0:8000

Loading ccnet config from /home/seafile/ccnet
Loading seafile config from /filer/seafile
seafile@sandnabba: ~/seafile-server-1.8.1 $>

And there is no more information in any logfile that I can find!?

Lingtao Pan

unread,
Aug 21, 2013, 9:47:34 PM8/21/13
to sea...@googlegroups.com
Run seahub with

    python2.7 /home/seafile/seafile-server-1.8.1/seahub/manage.py run_gunicorn -b 0.0.0.0:8000

Remove "-c home/seafile/seafile-server-1.8.1/runtime/seahub.conf"

This will run seahub in foreground.

 


2013/8/22 Emil Sandnabba <emil.sa...@gmail.com>

--
You received this message because you are subscribed to a topic in the Google Groups "seafile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/seafile/f2dN-yxaO_4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to seafile+u...@googlegroups.com.

Emil Sandnabba

unread,
Aug 21, 2013, 10:37:09 PM8/21/13
to sea...@googlegroups.com
Ah, missed that!

Well, now it works:
seafile@sandnabba: ~/seafile-server-1.8.1 $> python2.7 /home/seafile/seafile-server-1.8.1/seahub/manage.py run_gunicorn -c -b 0.0.0.0:8000

Loading ccnet config from /home/seafile/ccnet
Loading seafile config from /filer/seafile
2013-08-22 10:30:05 [9384] [INFO] Starting gunicorn 0.16.1
2013-08-22 10:30:05 [9384] [INFO] Listening at: http://0.0.0.0:8000 (9384)
2013-08-22 10:30:05 [9384] [INFO] Using worker: sync
2013-08-22 10:30:05 [9391] [INFO] Booting worker with pid: 9391

So I guess that there is something wrong in the configuration then?!

It looks like this:
seafile@sandnabba: ~/seafile-server-1.8.1 $> cat runtime/seahub.conf
import os

daemon = True
workers = 3

# Logging
runtime_dir = os.path.dirname(__file__)
pidfile = os.path.join(runtime_dir, 'seahub.pid')
errorlog = os.path.join(runtime_dir, 'error.log')
accesslog = os.path.join(runtime_dir, 'access.log')
# for file upload, we need a longer timeout value (default is only 30s, too short)
timeout = 1200


Shuai Lin

unread,
Aug 22, 2013, 12:13:44 AM8/22/13
to sea...@googlegroups.com
How many RAM, and other resources,  is there on your server ?

Several days ago we have also experienced this problem when testing seafile server 1.8.1 for raspberry pi. I just log out of the ssh session to the raspberry pi, and then log in again, and this problem disappears. So far I can't tell whether this problem exists in the seafile server(or gunicorn) code, or just results from a system resource shortage.

Regards,
Lin


--
You received this message because you are subscribed to the Google Groups "seafile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seafile+u...@googlegroups.com.

Emil Sandnabba

unread,
Aug 22, 2013, 12:05:08 PM8/22/13
to sea...@googlegroups.com
It's running on this one:
http://sandnabba.se/phpsysinfo/index.php?disp=dynamic
So 4GB RAM, and an Intel Core 2 Duo CPU.

I did however tried it on another server that I have with 8GB RAM, and an Core i3 CPU (Also with Ubuntu 12.04 LTS), and there it started without problems.
But I have hard to believe that it's a hardware issue!?

I have tried to start everything as root, but it fails anyway...

Lingtao Pan

unread,
Aug 22, 2013, 9:02:13 PM8/22/13
to sea...@googlegroups.com
Maybe it is a bug of Gunicorn and using the newest version can solve the problem.


2013/8/23 Emil Sandnabba <emil.sa...@gmail.com>

--
You received this message because you are subscribed to a topic in the Google Groups "seafile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/seafile/f2dN-yxaO_4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to seafile+u...@googlegroups.com.

Emil Sandnabba

unread,
Aug 28, 2013, 6:14:32 PM8/28/13
to sea...@googlegroups.com
Installed the latest package (17.5) from saucy's repositories:
http://packages.ubuntu.com/saucy/gunicorn

But it made no difference.

Lingtao Pan

unread,
Aug 29, 2013, 11:49:40 PM8/29/13
to sea...@googlegroups.com
You can config seafile web behind apache or nginx to bypass this problem. Or if you can provide an ssh user on your machine, we can login and debug there.

Bjarni Þórisson

unread,
Mar 24, 2014, 7:11:10 AM3/24/14
to sea...@googlegroups.com
Hi, I just had a similar/same problem.
The seafile-server-latest/runtime folder and contents need to be read/writeable by the user running the server. Could that also be your problem?

Christoph Zimmermann

unread,
Jun 30, 2014, 12:31:58 PM6/30/14
to sea...@googlegroups.com
Another problem is buried deep down in gunicorn. In the module six.py, the function _check_if_pyc investigates what beast a given module name precisely reflects (ordinary python code ending in .py, compiled python code ending in .pyc, or even a shared library with the suffix .so). Unfortunately, Python is under the impression that ".conf" is not a valid file name extension and hence decides to raise an IOError. A simple symlink from seahub.conf to seahub.py in the same directory (runtime) does the trick. As soon as I get around to it I'll post a patch to the seahub code base if nobody else is quicker than me.

What surprises me is that this error has gone unnoticed til now. It may be down to the platform I'm using: Arch running on an ARM system, the gunicorn version reports 19.0 as installed from the AUR.
Reply all
Reply to author
Forward
0 new messages