PDF preview Internal Error

Hi all,

i’m on 6.05 pro version

When i click on a pdf file, the preview doesn’t show up and i have an Internal error

the seahub.log shows :

2017-01-06 13:47:52,372 [ERROR] root:1088 prepare_converted_html failed to add_office_convert_task:
Traceback (most recent call last):
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/seahub/utils/__init__.py", line 1086, in prepare_converted_html
    add_office_convert_task(obj_id, doctype, raw_path)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/seahub/utils/__init__.py", line 1000, in real_func
    return func(*args)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/seahub/utils/__init__.py", line 1059, in add_office_convert_task
    d = rpc.add_task(file_id, doctype, raw_path)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seafile/lib64/python2.6/site-packages/pysearpc/client.py", line 110, in newfunc
    ret_str = self.call_remote_func_sync(fcall_str)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seafile/lib64/python2.6/site-packages/ccnet/rpc.py", line 92, in call_remote_func_sync
    req_id = self._start_service(client)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seafile/lib64/python2.6/site-packages/ccnet/rpc.py", line 36, in _start_service
    raise SearpcError("Error received: %s %s (In _start_service)" % (rsp.code, rsp.code_msg))
SearpcError: Error received: 511 Unknown service (In _start_service)
2017-01-06 16:41:43,989 [ERROR] root:1088 prepare_converted_html failed to add_office_convert_task:
Traceback (most recent call last):
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/seahub/utils/__init__.py", line 1086, in prepare_converted_html
    add_office_convert_task(obj_id, doctype, raw_path)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/seahub/utils/__init__.py", line 1000, in real_func
    return func(*args)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/seahub/utils/__init__.py", line 1059, in add_office_convert_task
    d = rpc.add_task(file_id, doctype, raw_path)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seafile/lib64/python2.6/site-packages/pysearpc/client.py", line 110, in newfunc
    ret_str = self.call_remote_func_sync(fcall_str)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seafile/lib64/python2.6/site-packages/ccnet/rpc.py", line 92, in call_remote_func_sync
    req_id = self._start_service(client)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seafile/lib64/python2.6/site-packages/ccnet/rpc.py", line 36, in _start_service
    raise SearpcError("Error received: %s %s (In _start_service)" % (rsp.code, rsp.code_msg))
SearpcError: Error received: 511 Unknown service (In _start_service)
2017-01-06 18:11:56,667 [ERROR] seahub_extra.wopi.views:171 get access_token invalid.
2017-01-06 18:23:09,921 [ERROR] root:1088 prepare_converted_html failed to add_office_convert_task:
Traceback (most recent call last):
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/seahub/utils/__init__.py", line 1086, in prepare_converted_html
    add_office_convert_task(obj_id, doctype, raw_path)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/seahub/utils/__init__.py", line 1000, in real_func
    return func(*args)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/seahub/utils/__init__.py", line 1059, in add_office_convert_task
    d = rpc.add_task(file_id, doctype, raw_path)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seafile/lib64/python2.6/site-packages/pysearpc/client.py", line 110, in newfunc
    ret_str = self.call_remote_func_sync(fcall_str)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seafile/lib64/python2.6/site-packages/ccnet/rpc.py", line 92, in call_remote_func_sync
    req_id = self._start_service(client)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seafile/lib64/python2.6/site-packages/ccnet/rpc.py", line 36, in _start_service
    raise SearpcError("Error received: %s %s (In _start_service)" % (rsp.code, rsp.code_msg))
SearpcError: Error received: 511 Unknown service (In _start_service)
2017-01-06 18:23:56,031 [ERROR] root:1088 prepare_converted_html failed to add_office_convert_task:
Traceback (most recent call last):
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/seahub/utils/__init__.py", line 1086, in prepare_converted_html
    add_office_convert_task(obj_id, doctype, raw_path)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/seahub/utils/__init__.py", line 1000, in real_func
    return func(*args)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/seahub/utils/__init__.py", line 1059, in add_office_convert_task
    d = rpc.add_task(file_id, doctype, raw_path)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seafile/lib64/python2.6/site-packages/pysearpc/client.py", line 110, in newfunc
    ret_str = self.call_remote_func_sync(fcall_str)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seafile/lib64/python2.6/site-packages/ccnet/rpc.py", line 92, in call_remote_func_sync
    req_id = self._start_service(client)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seafile/lib64/python2.6/site-packages/ccnet/rpc.py", line 36, in _start_service
    raise SearpcError("Error received: %s %s (In _start_service)" % (rsp.code, rsp.code_msg))
SearpcError: Error received: 511 Unknown service (In _start_service)

Any idea ?
I use collabora but file converting is allowed on seafevents.conf

[OFFICE CONVERTER]
enabled = true
workers = 1

Can you check logs/seafevents.log and logs/controller.log ?

This should be caused by the background task, seafevents, is not correctly started. Please check seafevents.log and controller.log.

Hi,
After restarting the server, i still have this issue

controller.log

[01/07/17 11:17:23] seafile-controller.c(87): spawn_process: /usr/bin/python2.7 -m seafevents.main --config-file /home/cc/seafile/conf/seafevents.conf --loglevel debug --logfile /home/cc/seafile/logs/seafevents.log -P /home/cc/seafile/pids/seafevents.pid
[01/07/17 11:17:23] seafile-controller.c(102): spawned /usr/bin/python2.7, pid 22343
[01/07/17 11:17:33] seafile-controller.c(575): pid file /home/cc/seafile/pids/seafevents.pid does not exist
[01/07/17 11:17:33] seafile-controller.c(600): seafevents need restart...
[01/07/17 11:17:33] seafile-controller.c(87): spawn_process: /usr/bin/python2.7 -m seafevents.main --config-file /home/cc/seafile/conf/seafevents.conf --loglevel debug --logfile /home/cc/seafile/logs/seafevents.log -P /home/cc/seafile/pids/seafevents.pid
[01/07/17 11:17:33] seafile-controller.c(102): spawned /usr/bin/python2.7, pid 22380

But i have these log lines since many month ago, with no consequences…

seafevents.log does not log anything, all theses lines are quite older

[2016-12-22 10:39:04,759] [DEBUG] Running command: "/usr/bin/python2.7" "-m" "seafes.update_repos" "--logfile" "/home/cc/seafile/logs/index.log" "update", cwd = /home/cc/seafile/seafile-pro-server-5.1.4/pro/python/seafes
[2016-12-22 10:44:36,468] [INFO] exit with code 0
[2016-12-22 10:44:36,473] [INFO] stop libreoffice...
[2016-12-22 10:44:36,475] [INFO] remove pidfile /home/cc/seafile/pids/seafevents.pid

seahub_django_request.log logs something weird

2017-01-07 11:16:33,305 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /api2/account/info/
Traceback (most recent call last):
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/views/decorators/csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/seahub/api2/base.py", line 23, in dispatch
    response = super(APIView, self).dispatch(*a, **kw)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py", line 466, in dispatch
    response = self.handle_exception(exc)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/seahub/api2/base.py", line 20, in handle_exception
    return super(APIView, self).handle_exception(exc)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py", line 454, in dispatch
    self.initial(request, *args, **kwargs)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py", line 376, in initial
    self.perform_authentication(request)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py", line 310, in perform_authentication
    request.user
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/request.py", line 353, in __getattribute__
    return super(Request, self).__getattribute__(attr)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/request.py", line 193, in user
    self._authenticate()
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/request.py", line 316, in _authenticate
    user_auth_tuple = authenticator.authenticate(self)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/seahub/api2/authentication.py", line 63, in authenticate
    ret = self.authenticate_v2(request, key)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/seahub/api2/authentication.py", line 101, in authenticate_v2
    user = User.objects.get(email=token.user)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seahub/seahub/base/accounts.py", line 86, in get
    emailuser = ccnet_threaded_rpc.get_emailuser(email)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seafile/lib64/python2.6/site-packages/pysearpc/client.py", line 110, in newfunc
    ret_str = self.call_remote_func_sync(fcall_str)
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seafile/lib64/python2.6/site-packages/ccnet/rpc.py", line 71, in call_remote_func_sync
    client = self.pool.get_client()
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seafile/lib64/python2.6/site-packages/ccnet/pool.py", line 29, in get_client
    client = self._create_client()
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seafile/lib64/python2.6/site-packages/ccnet/pool.py", line 21, in _create_client
    client.connect_daemon()
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seafile/lib64/python2.6/site-packages/ccnet/client.py", line 131, in connect_daemon
    return self.connect_daemon_with_pipe()
  File "/home/cc/seafile/seafile-pro-server-6.0.5/seafile/lib64/python2.6/site-packages/ccnet/client.py", line 113, in connect_daemon_with_pipe
    raise NetworkError("Can't connect to daemon")
NetworkError: Can't connect to daemon

regards,

Gautier

Please check whether /home/cc/seafile/pids/seafevents.pid is already there. If so, delete the file and restart seafile server should solve the problem.

The file does not exists and restarting seafile server does not create it…

Is there any way to create it ?

Regards

The file is not there is a correct behaviour. So it is not the problem of seafevents.pid.

Can you check whether the permission and owner of the file seafevents.log is correct?

Hi,
The permisisons were not appropriate (root as owner)
I reset all permissions on /seafile and the problem does not occur anymore.
Thank you very much !
Regards.