Seahub doesn't start after upgrade to 6.0

today i tried to update my working seafile 5.0 server. Both updatescripts worked without error. Seafile and cc-net starting without any error, but the seahub service don’t start working.This is the output:

Traceback (most recent call last):
File “/opt/seafile/haiwen/seafile-server-6.0.3/seahub/”, line 10, in
File “/opt/seafile/haiwen/seafile-server-6.0.3/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/management/”, line 354, in execute_from_command_line
File “/opt/seafile/haiwen/seafile-server-6.0.3/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/management/”, line 328, in execute
File “/opt/seafile/haiwen/seafile-server-6.0.3/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/”, line 18, in setup
File “/opt/seafile/haiwen/seafile-server-6.0.3/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/apps/”, line 108, in populate
File “/opt/seafile/haiwen/seafile-server-6.0.3/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/apps/”, line 198, in import_models
self.models_module = import_module(models_module_name)
File “/usr/lib/python2.7/importlib/”, line 37, in import_module
File “/opt/seafile/haiwen/seafile-server-6.0.3/seahub/thirdpart/registration/”, line 13, in
from seahub.base.accounts import User
File “/opt/seafile/haiwen/seafile-server-6.0.3/seahub/seahub/base/”, line 13, in
from seaserv import ccnet_threaded_rpc, unset_repo_passwd, is_passwd_set,
ImportError: cannot import name ccnet_api

Can anybody help?

What is the output of this command?

find /opt/seafile/haiwen/seafile-server-6.0.3/ -type f -name "*.py"  |grep ccnet



What about:

 grep -l -r ccnet_api /opt/seafile/haiwen/seafile-server-6.0.3/seafile

Also, have you checked the permissions of all the files? If you use the “seafile” user to run the program, try run “chown -R seafile:seafile /opt/seafile/haiwen/” to fix the possible permission problems, then restart seafile server again.

1 Like

Hi, actually i run Seafile as root. Is there any posibillity to get more info from the start? Here’s the output:


Meanwhile i tried a few things on my own:

  1. Checked owner (shouldn’t be importatnt because root but …)
  2. removed seahub_settings.pyc
  3. emptied the cachfolder
  4. removed a lot of settings in seahub_settings (email etc.)
  5. removed the innodb things which stopped working after the ubuntu upgrade from 14 → 16. Wondering that there is no errormessage, so it must crash before it starts reading the configfiles?
  6. checked for urllib
  7. installed gunicorn from the repository and use this
  8. append --error-logfile “/tmp/error.log” --log-level “debug” to the startscript and wondering, because the errorlog always stop at “statsd_prefix:”. I think there must be at least an entry.

Maybe anybody can chech this for me on a running system.
If i do a fresh install is there a possibility to use the existent databases and files or do i have to use a new database and use the importscript?


[2016-09-07 15:00:16 +0000] [4047] [DEBUG] Current configuration:
proxy_protocol: False
worker_connections: 1000
statsd_host: None
max_requests_jitter: 0
post_fork: <function post_fork at 0xb6b3f6f4>
pythonpath: None
enable_stdio_inheritance: False
worker_class: sync
ssl_version: 3
suppress_ragged_eofs: True
syslog: False
syslog_facility: user
when_ready: <function when_ready at 0xb6b3f5a4>
pre_fork: <function pre_fork at 0xb6b3f64c>
cert_reqs: 0
preload_app: True
keepalive: 2
accesslog: /opt/seafile/haiwen/seafile-server-6.0.3/runtime/access.log
group: 0
graceful_timeout: 30
do_handshake_on_connect: False
spew: False
workers: 3
proc_name: None
sendfile: None
pidfile: /opt/seafile/haiwen/seafile-server-6.0.3/runtime/
umask: 0
on_reload: <function on_reload at 0xb6b3f4fc>
pre_exec: <function pre_exec at 0xb6b3f994>
worker_tmp_dir: None
post_worker_init: <function post_worker_init at 0xb6b3f79c>
limit_request_fields: 100
on_exit: <function on_exit at 0xb6b3fca4>
config: /opt/seafile/haiwen/seafile-server-6.0.3/runtime/seahub.conf
secure_scheme_headers: {‘X-FORWARDED-PROTOCOL’: ‘ssl’, ‘X-FORWARDED-PROTO’: ‘https’, ‘X-FORWARDED-SSL’: ‘on’}
proxy_allow_ips: [‘’]
pre_request: <function pre_request at 0xb6b3fa3c>
post_request: <function post_request at 0xb6b3faac>
user: 0
forwarded_allow_ips: [‘’]
worker_int: <function worker_int at 0xb6b3f844>
threads: 1
max_requests: 0
limit_request_line: 4094
access_log_format: %(h)s %(l)s %(u)s %(t)s “%(r)s” %(s)s %(b)s “%(f)s” “%(a)s”
certfile: None
worker_exit: <function worker_exit at 0xb6b3fb54>
chdir: /opt/seafile/haiwen/seafile-server-6.0.3
paste: None
default_proc_name: seahub.wsgi:application
errorlog: /tmp/error.log
loglevel: debug
logconfig: None
syslog_addr: udp://localhost:514
syslog_prefix: None
daemon: True
ciphers: TLSv1
on_starting: <function on_starting at 0xb6b3f454>
worker_abort: <function worker_abort at 0xb6b3f8ec>
bind: [‘’]
reload: False
check_config: False
limit_request_field_size: 8190
nworkers_changed: <function nworkers_changed at 0xb6b3fbfc>
timeout: 1200
ca_certs: None
django_settings: None
tmp_upload_dir: None
keyfile: None
backlog: 2048
logger_class: gunicorn.glogging.Logger

Can you think of anything you have done to your system before the upgrade to seafile 6.0? E.g. updated the system or some critical packages like python?

The last big thing was on 27.08. I tried to setup a diaspora pod and secured one of my domains with letsencrypt. For this i installed some packages, list below of all things i installed/upgraded. For diaspora i enabled proxy_balancer. But diaspora is all ruby stuff

--------------------- dpkg status changes Begin ------------------------

bison:i386 2:3.0.4.dfsg-1
bzip2-doc:all 1.0.6-8
comerr-dev:i386 2.1-1.42.13-1ubuntu1
extundelete:i386 0.2.4-1
gir1.2-freedesktop:i386 1.46.0-3ubuntu1
gir1.2-gdkpixbuf-2.0:i386 2.32.2-1ubuntu1
gir1.2-rsvg-2.0:i386 2.40.13-3
icu-devtools:i386 55.1-7
krb5-multidev:i386 1.13.2+dfsg-5
letsencrypt:all 0.4.1-1
libbison-dev:i386 2:3.0.4.dfsg-1
libbz2-dev:i386 1.0.6-8
libcairo-script-interpreter2:i386 1.14.6-1
libcairo2-dev:i386 1.14.6-1
libcdt5:i386 2.38.0-12ubuntu2
libcgraph6:i386 2.38.0-12ubuntu2
libcurl4-openssl-dev:i386 7.47.0-1ubuntu2.1
libexif-dev:i386 0.6.21-2
libfontconfig1-dev:i386 2.11.94-0ubuntu1.1
libfreetype6-dev:i386 2.6.1-0.1ubuntu2
libgdbm-dev:i386 1.8.3-13.1
libgdk-pixbuf2.0-dev:i386 2.32.2-1ubuntu1
libglib2.0-bin:i386 2.48.1-1~ubuntu16.04.1
libglib2.0-dev:i386 2.48.1-1~ubuntu16.04.1
libgmp-dev:i386 2:6.1.0+dfsg-2
libgmpxx4ldbl:i386 2:6.1.0+dfsg-2
libgraphviz-dev:i386 2.38.0-12ubuntu2
libgssrpc4:i386 1.13.2+dfsg-5
libgvc6:i386 2.38.0-12ubuntu2
libgvpr2:i386 2.38.0-12ubuntu2
libice-dev:i386 2:1.0.9-1
libicu-dev:i386 55.1-7
libilmbase-dev:i386 2.2.0-11ubuntu2
libjasper-dev:i386 1.900.1-debian1-2.4ubuntu1
libjbig-dev:i386 2.1-3.1
libjemalloc1:i386 3.6.0-9ubuntu1
libjpeg-dev:i386 8c-2ubuntu8
libjpeg-turbo8-dev:i386 1.4.2-0ubuntu3
libjpeg8-dev:i386 8c-2ubuntu8
libkadm5clnt-mit9:i386 1.13.2+dfsg-5
libkadm5srv-mit9:i386 1.13.2+dfsg-5
libkdb5-8:i386 1.13.2+dfsg-5
liblcms2-dev:i386 2.6-3ubuntu2
liblqr-1-0-dev:i386 0.4.2-2
liblzma-dev:i386 5.1.1alpha+20120614-2ubuntu2
libmagickcore-6-arch-config:i386 8:
libmagickcore-6-headers:all 8:
libmagickcore-6.q16-dev:i386 8:
libmagickwand-6-headers:all 8:
libmagickwand-6.q16-dev:i386 8:
libmagickwand-dev:all 8:
libncurses5-dev:i386 6.0+20160213-1ubuntu1
libopenexr-dev:i386 2.2.0-10ubuntu2
libpcre3-dev:i386 2:8.38-3.1
libpcre32-3:i386 2:8.38-3.1
libpcrecpp0v5:i386 2:8.38-3.1
libpixman-1-dev:i386 0.33.6-1
libpng12-dev:i386 1.2.54-1ubuntu1
libpq-dev:i386 9.5.4-0ubuntu0.16.04
libpthread-stubs0-dev:i386 0.3-4
libreadline6-dev:i386 6.3-8ubuntu2
librsvg2-dev:i386 2.40.13-3
libsm-dev:i386 2:1.2.2-1
libsqlite3-dev:i386 3.11.0-1ubuntu1
libtiff5-dev:i386 4.0.6-1
libtiffxx5:i386 4.0.6-1
libtinfo-dev:i386 6.0+20160213-1ubuntu1
libuv1:i386 1.8.0-1
libx11-dev:i386 2:1.6.3-1ubuntu2
libx11-doc:all 2:1.6.3-1ubuntu2
libxau-dev:i386 1:1.0.8-1
libxcb-render0-dev:i386 1.11.1-1ubuntu1
libxcb-shm0-dev:i386 1.11.1-1ubuntu1
libxcb1-dev:i386 1.11.1-1ubuntu1
libxdmcp-dev:i386 1:1.1.2-1.1
libxdot4:i386 2.38.0-12ubuntu2
libxext-dev:i386 2:1.3.3-1
libxml2-dev:i386 2.9.3+dfsg1-1ubuntu0.1
libxrender-dev:i386 1:0.9.9-0ubuntu1
libxslt1-dev:i386 1.1.28-2.1
libxt-dev:i386 1:1.1.5-0ubuntu1
libyaml-dev:i386 0.1.6-3
nodejs:i386 4.2.6~dfsg-1ubuntu4.1
pkg-config:i386 0.29.1-0ubuntu1
python-acme:all 0.4.1-1
python-configargparse:all 0.10.0-2
python-dialog:i386 3.3.0-2
python-funcsigs:all 0.4-2
python-letsencrypt:all 0.4.1-1
python-mock:all 1.3.0-2.1ubuntu1
python-parsedatetime:all 1.4-1
python-pbr:all 1.8.0-4ubuntu1
python-psutil:i386 3.4.2-1
python-pyicu:i386 1.9.2-2build1
python-rfc3339:all 1.0-4
python-tz:all 2014.10~dfsg1-0ubuntu2
python-zope.component:all 4.2.2-1
python-zope.event:all 4.2.0-1
python-zope.hookable:i386 4.0.4-4build2
redis-server:i386 2:3.0.6-1
redis-tools:i386 2:3.0.6-1
x11proto-core-dev:all 7.0.28-2ubuntu1
x11proto-input-dev:all 2.3.1-1
x11proto-kb-dev:all 1.0.7-0ubuntu1
x11proto-render-dev:all 2:0.11.1-2
x11proto-xext-dev:all 7.3.0-1
xorg-sgml-doctools:all 1:1.11-1
xtrans-dev:all 1.3.5-1

libdrm-amdgpu1:i386 2.4.67-1ubuntu0.16.04.1 => 2.4.67-1ubuntu0.16.04.2
libdrm-intel1:i386 2.4.67-1ubuntu0.16.04.1 => 2.4.67-1ubuntu0.16.04.2
libdrm-nouveau2:i386 2.4.67-1ubuntu0.16.04.1 => 2.4.67-1ubuntu0.16.04.2
libdrm-radeon1:i386 2.4.67-1ubuntu0.16.04.1 => 2.4.67-1ubuntu0.16.04.2
libdrm2:i386 2.4.67-1ubuntu0.16.04.1 => 2.4.67-1ubuntu0.16.04.2
ntp:i386 1:4.2.8p4+dfsg-3ubuntu5 => 1:4.2.8p4+dfsg-3ubuntu5.1
ntpdate:i386 1:4.2.8p4+dfsg-3ubuntu5 => 1:4.2.8p4+dfsg-3ubuntu5.1

libgvc5:i386 2.26.3-10ubuntu1.2
libmagickcore4-extra:i386 8:
radicale:all 1.1.1-1

radicale:all 1.1.1-1

After this i did a reboot and seafile was still working. After that this packages were upgraded:

linux-headers-4.4.0-36-generic:i386 4.4.0-36.55
linux-headers-4.4.0-36:all 4.4.0-36.55
linux-image-4.4.0-36-generic:i386 4.4.0-36.55
linux-image-extra-4.4.0-36-generic:i386 4.4.0-36.55

linux-generic:i386 =>
linux-headers-generic:i386 =>
linux-image-generic:i386 =>
linux-libc-dev:i386 4.4.0-34.53 => 4.4.0-36.55

No reboot

libmysqlclient-dev:i386 5.7.13-0ubuntu0.16.04.2

clamav-base:all 0.99+dfsg-1ubuntu1.1 => 0.99+dfsg-1ubuntu1.2
clamav-daemon:i386 0.99+dfsg-1ubuntu1.1 => 0.99+dfsg-1ubuntu1.2
clamav-freshclam:i386 0.99+dfsg-1ubuntu1.1 => 0.99+dfsg-1ubuntu1.2
clamav:i386 0.99+dfsg-1ubuntu1.1 => 0.99+dfsg-1ubuntu1.2
clamdscan:i386 0.99+dfsg-1ubuntu1.1 => 0.99+dfsg-1ubuntu1.2
libclamav7:i386 0.99+dfsg-1ubuntu1.1 => 0.99+dfsg-1ubuntu1.2
libcupsfilters1:i386 1.8.3-2ubuntu3 => 1.8.3-2ubuntu3.1
sudo:i386 1.8.16-0ubuntu1.1 => 1.8.16-0ubuntu1.2
ubuntu-mono:all 14.04+16.04.20160621-0ubuntu1 => 14.04+16.04.20160804-0ubuntu1

linux-headers-3.13.0-93-generic:i386 3.13.0-93.140
linux-headers-3.13.0-93:all 3.13.0-93.140
linux-image-3.13.0-93-generic:i386 3.13.0-93.140
linux-image-extra-3.13.0-93-generic:i386 3.13.0-93.140

And finally this:

python-ldap:i386 2.4.22-0.1
ruby-bundler:all 1.11.2-1
ruby-molinillo:all 0.4.3-1
ruby-net-http-persistent:all 2.9.4-1
ruby-thor:all 0.19.1-2

Actually diaspora isn’t running, i also tried seahub with disabled apache.

So the help is very poor i decided not to wait any longer and going back to my old 5.0.4 installation which works fine and i haven’t the time to debug your software. But a few more things if you ever want to fix this problem:

  • I using a VMware virtual machine with Ubuntu 16.04 LTS 32bit.
  • 5.0.4 works fine, i upgraded to 5.0.5 which also runs without problems.
  • Next version i have tested is the 5.1.4 which doesn’t work. So you can look in your code what you have changed.
  • The error is always the “ImportError: cannot import name ccnet_api”
  • I use the start-fastcgi option, standardport
  • The datadir is on a mounted xfs formatted harddisk
  • If you need any additional information feel free to ask


Thanks for the details. The problem is weird and not reported by other users. I don’t see a way to fix it without ssh-ing to your server to debug directly.

Thanks for the offer, but actually this isn’t possible. Maybe i can make you a chroot env but i think then you can’t work :slight_smile:

I have the same issue right now. I haven’t updated seafile. I didn’t even restart it. I got a notification that the web interface is down. Then I restarted seafile and got the same error.

I’m using seafile 6.0.4. I tried to update to 6.0.6 - this didn’t change anything.

I can’t prove it, but I think some recent updates in debian caused this. I’m using debian stable with some packages from testing.

Best Regards,

I also have the same problem. I am running Debian stable 8.6 and recently updated. I do not restart my system often. Yesterday there was a power outage and seafile did not come up.

Traceback (most recent call last):
File “/opt/docker-data/seafile/seafile-server-5.1.3/seahub/”, line 10, in
File “/opt/docker-data/seafile/seafile-server-5.1.3/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/management/”, line 354, in execute_from_command_line
File “/opt/docker-data/seafile/seafile-server-5.1.3/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/core/management/”, line 328, in execute
File “/opt/docker-data/seafile/seafile-server-5.1.3/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/”, line 18, in setup
File “/opt/docker-data/seafile/seafile-server-5.1.3/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/apps/”, line 108, in populate
File “/opt/docker-data/seafile/seafile-server-5.1.3/seahub/thirdpart/Django-1.8.10-py2.7.egg/django/apps/”, line 198, in import_models
self.models_module = import_module(models_module_name)
File “/usr/lib/python2.7/importlib/”, line 37, in import_module
File “/opt/docker-data/seafile/seafile-server-5.1.3/seahub/seahub/notifications/”, line 13, in
from seaserv import seafile_api, ccnet_api
ImportError: cannot import name ccnet_api
Error:Seahub failed to start.

I have downgraded to version 5.1.0 -> unhandeld excepton when opening the webpage
Downgraded to 5.0.5 -> everything is working again.

Will this downgrade from 5.1.3 to 5.0.5 create problems with the database?

Not on my system, everything is working well.

Well, i have the same problem. The last thing i had done, was installing python 2.7 (running Centos 6.6 which has python2.6). I also get stuck on:

keyfile: None
backlog: 2048
logger_class: gunicorn.glogging.Logger

there is nothing in logs/* or runtime/errror.log

So at this point, i’m hitting myself why did i even went with the upgrade :confused:

Im here as well :frowning:
All checked what is in this thread but still, I can not start seahub anymore.
What did the others do to solve this ? What can I further do to debug ? I’m on a Ubuntu 16.04 with the latest patches applied. I feel the issue is related to Python. But that is just a feeling. I would rather like to collect information on this. Help is very much appreciated.

I kept the old system for a while, the make a new installation on a fresh debian system and everything’s working well.

can i import the data to a fresh installation ?

I don’t know if this is the official way :wink:
I make the fresh installation with the same program- and seafiledata path. then shut down both seafilesystems, copy the data from old to the new installation, make a mysqldump on the old system and an insert on the new. Then start the (new) system again and it works.
My server is in germany and i’m actually in the caribbean with low bandwidth so this was a solution for me. If i had a fast line i would had done it with the client.