Seahub not starting

i upgraded to version seafile-pro-server-6.3.7 in an ubuntu 18.04 vm,

seafile is running fine but when i start seahub it gives an error

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

then i tried running ./seahub start-fastcgi, as i read that it displays more error info and it gave this error

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 “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/manage.py”, line 10, in
execute_from_command_line(sys.argv)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/core/management/init.py”, line 364, in execute_from_command_line
utility.execute()
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/core/management/init.py”, line 338, in execute
django.setup()
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/init.py”, line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/apps/registry.py”, line 108, in populate
app_config.import_models()
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/apps/config.py”, line 202, in import_models
self.models_module = import_module(models_module_name)
File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module
import(name)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/seahub/base/models.py”, line 13, in
from seahub.group.models import GroupMessage
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/seahub/group/models.py”, line 13, in
from seahub.profile.models import Profile
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/seahub/profile/models.py”, line 206, in
from .utils import refresh_cache
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/seahub/profile/utils.py”, line 8, in
from seahub.utils import normalize_cache_key
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/seahub/utils/init.py”, line 1187, in
seafevents_api.init(EVENTS_CONFIG_FILE)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/pro/python/seafevents/seafevents_api.py”, line 9, in init
load_config(config_file)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/pro/python/seafevents/app/config.py”, line 27, in load_config
appconfig.seaf_session_cls = init_db_session_class(appconfig.seaf_conf_path, db = ‘seafile’)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/pro/python/seafevents/db.py”, line 111, in init_db_session_class
engine = create_engine_from_conf(config_file, db)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/pro/python/seafevents/db.py”, line 52, in create_engine_from_conf
backend = config.get(db_sec, ‘type’)
File “/usr/lib/python2.7/ConfigParser.py”, line 607, in get
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: ‘database’
Error:Seahub failed to start.

before that it was running fine and i am using sqlite3 as the default option for database

i edited seafile.conf to be like this

[fileserver]

bind address for fileserver

default to 0.0.0.0, if deployed without proxy: no access restriction

set to 127.0.0.1, if used with local proxy: only access by local

host = 127.0.0.1

tcp port for fileserver

port = 8082

[database]
type = sqlite

now it gives this error

Starting seahub (fastcgi) at 127.0.0.1:8000 …
Traceback (most recent call last):
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/manage.py”, line 10, in
execute_from_command_line(sys.argv)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/core/management/init.py”, line 364, in execute_from_command_line
utility.execute()
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/core/management/init.py”, line 338, in execute
django.setup()
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/init.py”, line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/apps/registry.py”, line 108, in populate
app_config.import_models()
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/apps/config.py”, line 202, in import_models
self.models_module = import_module(models_module_name)
File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module
import(name)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/seahub/base/models.py”, line 13, in
from seahub.group.models import GroupMessage
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/seahub/group/models.py”, line 13, in
from seahub.profile.models import Profile
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/seahub/profile/models.py”, line 206, in
from .utils import refresh_cache
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/seahub/profile/utils.py”, line 8, in
from seahub.utils import normalize_cache_key
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/seahub/utils/init.py”, line 1187, in
seafevents_api.init(EVENTS_CONFIG_FILE)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/pro/python/seafevents/seafevents_api.py”, line 9, in init
load_config(config_file)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/pro/python/seafevents/app/config.py”, line 27, in load_config
appconfig.seaf_session_cls = init_db_session_class(appconfig.seaf_conf_path, db = ‘seafile’)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/pro/python/seafevents/db.py”, line 113, in init_db_session_class
raise RuntimeError(“invalid config file %s”, config_file)
RuntimeError: (‘invalid config file %s’, ‘/mnt/Seafile/Server/conf/seafile.conf’)
Error:Seahub failed to start.

i changed the file seafile.conf to this

[fileserver]

bind address for fileserver

default to 0.0.0.0, if deployed without proxy: no access restriction

set to 127.0.0.1, if used with local proxy: only access by local

host = 127.0.0.1

tcp port for fileserver

port = 8082

[database]
type = sqlite3
path = /mnt/Seafile/seafile-data/seafile.db

and now it only run if i use sudo even tho i changed all the folder permissions to the seafile username

and this is the output if i run it with the -x argument: bash -x /mnt/Seafile/Server/seafile-server-latest/seahub.sh start

export SEAFES_DIR=/mnt/Seafile/Server/seafile-pro-server-6.3.7/pro/python/seafes

  • SEAFES_DIR=/mnt/Seafile/Server/seafile-pro-server-6.3.7/pro/python/seafes
  • echo ‘Starting seahub at port 8000 …’
    Starting seahub at port 8000 …
  • check_init_admin
  • check_init_admin_script=/mnt/Seafile/Server/seafile-pro-server-6.3.7/check_init_admin.py
  • python2.7 /mnt/Seafile/Server/seafile-pro-server-6.3.7/check_init_admin.py
  • export DJANGO_SETTINGS_MODULE=seahub.settings
  • DJANGO_SETTINGS_MODULE=seahub.settings
  • python2.7 /mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/gunicorn seahub.wsgi:application -c /mnt/Seafile/Server/conf/gunicorn.conf --preload
  • sleep 5
  • pgrep -f seahub.wsgi:application
  • printf ‘\033[33mError:Seahub failed to start.\033[m\n’
    Error:Seahub failed to start.
  • echo ‘Please try to run “./seahub.sh start” again’
    Please try to run “./seahub.sh start” again
  • exit 1

2018-10-31 16:43:18,341 [ERROR] seahub.api2.endpoints.admin.sysinfo:113 get Erro r received: 511 Unknown service (In _start_service)
2018-10-31 16:43:18,343 [ERROR] seahub.api2.endpoints.admin.sysinfo:120 get Erro r received: 511 Unknown service (In _start_service)
2018-10-31 16:43:33,234 [ERROR] django.request:135 handle_uncaught_exception Int ernal Server Error: /api2/events/
Traceback (most recent call last):
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/cor e/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/cor e/handlers/base.py”, line 249, in _legacy_get_response
response = self._get_response(request)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/cor e/handlers/base.py”, line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/cor e/handlers/base.py”, line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/vie ws/decorators/csrf.py”, line 58, in wrapped_view
return view_func(*args, **kwargs)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/vie ws/generic/base.py”, line 68, in view
return self.dispatch(request, *args, **kwargs)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/seahub/api2/base.py” , line 23, in dispatch
response = super(APIView, self).dispatch(*a, **kw)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/rest_frame work/views.py”, line 466, in dispatch
response = self.handle_exception(exc)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/seahub/api2/base.py” , line 20, in handle_exception
return super(APIView, self).handle_exception(exc)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/rest_frame work/views.py”, line 463, in dispatch
response = handler(request, *args, **kwargs)
File "/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/seahub/api2/views.py ", line 4125, in get
events_count)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/seahub/utils/_init _.py”, line 648, in get_user_events
return _get_events(username, start, count)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/seahub/utils/_init _.py”, line 565, in _get_events
count, org_id)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/seahub/utils/_init _.py”, line 618, in _get_events_inner
repo = seafile_api.get_repo(ev.repo_id)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seafile/lib64/python2.7/sit e-packages/seaserv/api.py”, line 98, in get_repo
return seafserv_threaded_rpc.get_repo(repo_id)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seafile/lib64/python2.7/sit e-packages/pysearpc/client.py”, line 110, in newfunc
ret_str = self.call_remote_func_sync(fcall_str)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seafile/lib64/python2.7/sit e-packages/ccnet/rpc.py”, line 75, in call_remote_func_sync
req_id = self._start_service(client)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seafile/lib64/python2.7/sit e-packages/ccnet/rpc.py”, line 36, in _start_service
raise SearpcError(“Error received: %s %s (In _start_service)” % (rsp.code, r sp.code_msg))
SearpcError: Error received: 511 Unknown service (In _start_service)
2018-10-31 16:43:35,374 [ERROR] django.request:135 handle_uncaught_exception Int ernal Server Error: /ajax/space_and_traffic/
Traceback (most recent call last):
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/cor e/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/cor e/handlers/base.py”, line 249, in _legacy_get_response
response = self._get_response(request)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/cor e/handlers/base.py”, line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/cor e/handlers/base.py”, line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/seahub/auth/decorato rs.py”, line 70, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/seahub/views/ajax.py ", line 1104, in space_and_traffic
space_quota = seafile_api.get_user_quota(username)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seafile/lib64/python2.7/sit e-packages/seaserv/api.py”, line 790, in get_user_quota
return seafserv_threaded_rpc.get_user_quota(username)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seafile/lib64/python2.7/sit e-packages/pysearpc/client.py”, line 110, in newfunc
ret_str = self.call_remote_func_sync(fcall_str)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seafile/lib64/python2.7/sit e-packages/ccnet/rpc.py”, line 75, in call_remote_func_sync
req_id = self._start_service(client)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seafile/lib64/python2.7/sit e-packages/ccnet/rpc.py”, line 36, in _start_service
raise SearpcError(“Error received: %s %s (In _start_service)” % (rsp.code, r sp.code_msg))
SearpcError: Error received: 511 Unknown service (In _start_service)
2018-10-31 16:43:37,143 [ERROR] django.request:135 handle_uncaught_exception Int ernal Server Error: /accounts/logout/
Traceback (most recent call last):
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/cor e/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/cor e/handlers/base.py”, line 249, in _legacy_get_response
response = self._get_response(request)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/cor e/handlers/base.py”, line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/thirdpart/django/cor e/handlers/base.py”, line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/seahub/auth/views.py ", line 236, in logout
logout(request)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/seahub/auth/init .py”, line 110, in logout
request.user.remove_repo_passwds()
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/seahub/base/accounts .py”, line 438, in remove_repo_passwds
owned_repos, shared_repos, groups_repos, public_repos = get_user_repos(self. email)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seahub/seahub/utils/_init _.py”, line 316, in get_user_repos
owned_repos = seafile_api.get_owned_repo_list(username)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seafile/lib64/python2.7/sit e-packages/seaserv/api.py”, line 139, in get_owned_repo_list
start, limit)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seafile/lib64/python2.7/sit e-packages/pysearpc/client.py”, line 110, in newfunc
ret_str = self.call_remote_func_sync(fcall_str)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seafile/lib64/python2.7/sit e-packages/ccnet/rpc.py”, line 75, in call_remote_func_sync
req_id = self._start_service(client)
File “/mnt/Seafile/Server/seafile-pro-server-6.3.7/seafile/lib64/python2.7/sit e-packages/ccnet/rpc.py”, line 36, in _start_service
raise SearpcError(“Error received: %s %s (In _start_service)” % (rsp.code, r sp.code_msg))
SearpcError: Error received: 511 Unknown service (In _start_service)

it crashes as soon as i enter

Fastcgi is not supported any longer. Please read the manual as it contains information about this.

i am not using fastcgi, i was just testing the command to get a better error message

here is my nginx config

location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_read_timeout 1200s;

     # used for view/edit office file via Office Online Server
     client_max_body_size 0;

     access_log      /var/log/nginx/seahub.access.log;
     error_log       /var/log/nginx/seahub.error.log;
}

#location / {
#    fastcgi_param   REMOTE_ADDR         $http_x_real_ip;
#    fastcgi_pass    127.0.0.1:8000;
#    fastcgi_param   SCRIPT_FILENAME     $document_root$fastcgi_script_name;
#    fastcgi_param   PATH_INFO           $fastcgi_script_name;

#    fastcgi_param   SERVER_PROTOCOL     $server_protocol;
#    fastcgi_param   QUERY_STRING        $query_string;
#    fastcgi_param   REQUEST_METHOD      $request_method;
#    fastcgi_param   CONTENT_TYPE        $content_type;
#    fastcgi_param   CONTENT_LENGTH      $content_length;
#    fastcgi_param   SERVER_ADDR         $server_addr;
#    fastcgi_param   SERVER_PORT         $server_port;
#    fastcgi_param   SERVER_NAME         $server_name;
#    fastcgi_param   HTTPS               on;
#    fastcgi_param   HTTP_SCHEME         https;

#    access_log      /var/log/nginx/seahub.access.log;
#    error_log       /var/log/nginx/seahub.error.log;
#    fastcgi_read_timeout 36000;
#}

location /seafhttp {
    rewrite ^/seafhttp(.*)$ $1 break;
    proxy_pass http://127.0.0.1:8082;
    #proxy_set_header        X-Real-IP       $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    client_max_body_size 0;
    proxy_connect_timeout  36000s;
    proxy_read_timeout  36000s;
    proxy_send_timeout  36000s;
    send_timeout  36000s;
}

i reverted back to version 6.2.13 and it worked fine.

then i tried again version 6.3.7 and a version before and it gave the same error

looking at controller.log it gives these errors:

[11/11/18 15:32:52] seafile-controller.c(102): spawned /usr/bin/python2.7, pid 28975
[11/11/18 15:33:02] seafile-controller.c(590): pid file /mnt/Seafile/Server/pids/seafevents.pid does not exist
[11/11/18 15:33:02] seafile-controller.c(616): seafevents need restart…
[11/11/18 15:33:02] seafile-controller.c(87): spawn_process: /usr/bin/python2.7 -m seafevents.main --config-file /mnt/Seafile/Server/conf/seafevents.conf --logfile /mnt/Seafile/Server/logs/seafevents.log -P /mnt/Seafile/Server/pids/seafevents.pid
[11/11/18 15:33:02] seafile-controller.c(102): spawned /usr/bin/python2.7, pid 28986
[11/11/18 15:33:12] seafile-controller.c(590): pid file /mnt/Seafile/Server/pids/seafevents.pid does not exist
[11/11/18 15:33:12] seafile-controller.c(616): seafevents need restart…
[11/11/18 15:33:12] seafile-controller.c(87): spawn_process: /usr/bin/python2.7 -m seafevents.main --config-file /mnt/Seafile/Server/conf/seafevents.conf --logfile /mnt/Seafile/Server/logs/seafevents.log -P /mnt/Seafile/Server/pids/seafevents.pid
[11/11/18 15:33:12] seafile-controller.c(102): spawned /usr/bin/python2.7, pid 28991
[11/11/18 15:33:22] seafile-controller.c(590): pid file /mnt/Seafile/Server/pids/seafevents.pid does not exist
[11/11/18 15:33:22] seafile-controller.c(616): seafevents need restart…
[11/11/18 15:33:22] seafile-controller.c(87): spawn_process: /usr/bin/python2.7 -m seafevents.main --config-file /mnt/Seafile/Server/conf/seafevents.conf --logfile /mnt/Seafile/Server/logs/seafevents.log -P /mnt/Seafile/Server/pids/seafevents.pid
[11/11/18 15:33:22] seafile-controller.c(102): spawned /usr/bin/python2.7, pid 28995

and trying to upgrade again from version 6.2 to 6.3, it told me that seafevents do not support sqlite3 database, so is that the reason for seahub not starting ? is this something new in version 6.3 ?

I have the same problem. I’m running the Pro version (trial) on sqlite.

When I upgraded from 6.3.6 to 6.3.7, I threw the exact same errors. Thinking it was a buggy release, I backed out. Now with 6.3.9 the same thing happens.

Is this something that can be fixed?

yeah i tried the same thing and i also got the same issue.

i was running version 6.2.13 then i upgraded to version 6.3.6 without an issue, then when i upgraded to version 6.3.7 it gave me that error then i tried also the latest version 6.3.9 it also gave the same error

so it seams there is a bug starting from version 6.3.7 with sqlite as i haven’t seen people using mysql complaining

Did you get an official response? I don’t know what to do about this.

Maybe this can help:

SQLite is not supported with Pro.

Thank you
for now i changed to the community edition and its working fine