After upgrading from Ubuntu 14.04 to 16.04 seafile server stop running

Previously I was on Ubuntu 14.04 with Seafile Server 5.1.1
I upgraded to 6.0.6 without any issues.
Today I upgraded Ubuntu 14.04 to 16.04 and after the reboot, Seafile is not working.
What logs can I look at to find out?
I’ve looked under logs:
controller.log

[11/29/16 23:07:59] seafile-controller.c(154): starting ccnet-server …
[11/29/16 23:07:59] seafile-controller.c(73): spawn_process: ccnet-server -F /root/guide/conf -c /root/guide/ccnet -f /root/guide/logs/ccnet.log -d -P /root/guide/pids/ccnet.pid
[11/29/16 23:07:59] seafile-controller.c(88): spawned ccnet-server, pid 1446
[11/29/16 23:08:00] seafile-controller.c(555): ccnet daemon connected.
[11/29/16 23:08:00] seafile-controller.c(186): starting seaf-server …
[11/29/16 23:08:00] seafile-controller.c(73): spawn_process: seaf-server -F /root/guide/conf -c /root/guide/ccnet -d /root/guide/seafile-data -l /root/guide/logs/seafile.log -P /root/guide/pids/seaf-server.pid
[11/29/16 23:08:00] seafile-controller.c(88): spawned seaf-server, pid 1450
[11/29/16 23:08:00] seafile-controller.c(528): seafdav not enabled.

ccnet.log:

[11/29/16 23:07:59] …/common/session.c(132): using config file /root/guide/conf/ccnet.conf
[11/29/16 23:07:59] …/common/session.c(455): socket file exists, delete it anyway
[11/29/16 23:07:59] …/common/session.c(484): Listen on /root/guide/ccnet/ccnet.sock for local clients
[11/29/16 23:07:59] …/common/session.c(290): Update pubinfo file
[11/29/16 23:08:00] …/common/session.c(398): Accepted a local client
[11/29/16 23:08:00] …/common/session.c(398): Accepted a local client
[11/29/16 23:08:00] …/common/session.c(398): Accepted a local client
[11/29/16 23:08:00] …/common/session.c(398): Accepted a local client
[11/29/16 23:08:12] …/common/session.c(398): Accepted a local client
[11/29/16 23:08:12] …/common/peer.c(943): Local peer down

seafile.logs

[11/29/2016 10:58:49 PM] …/common/mq-mgr.c(54): [mq client] mq cilent is started
[11/29/2016 11:01:51 PM] …/common/mq-mgr.c(54): [mq client] mq cilent is started
[11/29/2016 11:08:00 PM] …/common/mq-mgr.c(54): [mq client] mq cilent is started

seahub_django_request.log

2016-11-29 23:14:57,404 [ERROR] django.request:256 handle_uncaught_exception Internal Server Error: /api2/account/info/
Traceback (most recent call last):
File “/root/guide/seafile-server-6.0.6/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 “/root/guide/seafile-server-6.0.6/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 “/root/guide/seafile-server-6.0.6/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 “/root/guide/seafile-server-6.0.6/seahub/seahub/api2/base.py”, line 23, in dispatch
response = super(APIView, self).dispatch(*a, **kw)
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py”, line 466, in dispatch
response = self.handle_exception(exc)
File “/root/guide/seafile-server-6.0.6/seahub/seahub/api2/base.py”, line 20, in handle_exception
return super(APIView, self).handle_exception(exc)
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py”, line 454, in dispatch
self.initial(request, *args, **kwargs)
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py”, line 376, in initial
self.perform_authentication(request)
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/views.py”, line 310, in perform_authentication
request.user
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/request.py”, line 353, in getattribute
return super(Request, self).getattribute(attr)
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/request.py”, line 193, in user
self._authenticate()
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/djangorestframework-3.3.2-py2.7.egg/rest_framework/request.py”, line 316, in _authenticate
user_auth_tuple = authenticator.authenticate(self)
File “/root/guide/seafile-server-6.0.6/seahub/seahub/api2/authentication.py”, line 63, in authenticate
ret = self.authenticate_v2(request, key)
File “/root/guide/seafile-server-6.0.6/seahub/seahub/api2/authentication.py”, line 92, in authenticate_v2
token = TokenV2.objects.get(key=key)
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/models/manager.py”, line 127, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/models/query.py”, line 328, in get
num = len(clone)
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/models/query.py”, line 144, in len
self._fetch_all()
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/models/query.py”, line 965, in _fetch_all
self._result_cache = list(self.iterator())
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/models/query.py”, line 238, in iterator
results = compiler.execute_sql()
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/models/sql/compiler.py”, line 829, in execute_sql
sql, params = self.as_sql()
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/models/sql/compiler.py”, line 387, in as_sql
where, w_params = self.compile(self.query.where)
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/models/sql/compiler.py”, line 357, in compile
sql, params = node.as_sql(self, self.connection)
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/models/sql/where.py”, line 104, in as_sql
sql, params = compiler.compile(child)
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/models/sql/compiler.py”, line 357, in compile
sql, params = node.as_sql(self, self.connection)
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/models/lookups.py”, line 218, in as_sql
lhs_sql, params = self.process_lhs(compiler, connection)
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/models/lookups.py”, line 211, in process_lhs
db_type = self.lhs.output_field.db_type(connection=connection)
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/models/fields/init.py”, line 614, in db_type
return connection.data_types[self.get_internal_type()] % data
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/utils/functional.py”, line 59, in get
res = instance.dict[self.name] = self.func(instance)
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/backends/mysql/base.py”, line 196, in data_types
if self.features.supports_microsecond_precision:
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/utils/functional.py”, line 59, in get
res = instance.dict[self.name] = self.func(instance)
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/backends/mysql/features.py”, line 52, in supports_microsecond_precision
return self.connection.mysql_version >= (5, 6, 4) and Database.version_info >= (1, 2, 5)
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/utils/functional.py”, line 59, in get
res = instance.dict[self.name] = self.func(instance)
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/backends/mysql/base.py”, line 371, in mysql_version
with self.temporary_connection():
File “/usr/lib/python2.7/contextlib.py”, line 17, in enter
return self.gen.next()
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/backends/base/base.py”, line 462, in temporary_connection
cursor = self.cursor()
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/backends/base/base.py”, line 164, in cursor
cursor = self.make_cursor(self._cursor())
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/backends/base/base.py”, line 135, in _cursor
self.ensure_connection()
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/backends/base/base.py”, line 130, in ensure_connection
self.connect()
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/utils.py”, line 98, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/backends/base/base.py”, line 130, in ensure_connection
self.connect()
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/backends/base/base.py”, line 119, in connect
self.connection = self.get_new_connection(conn_params)
File “/root/guide/seafile-server-6.0.6/seahub/thirdpart/Django-1.8.16-py2.7.egg/django/db/backends/mysql/base.py”, line 276, in get_new_connection
conn = Database.connect(**conn_params)
File “/usr/lib/python2.7/dist-packages/MySQLdb/init.py”, line 81, in Connect
return Connection(*args, **kwargs)
File “/usr/lib/python2.7/dist-packages/MySQLdb/connections.py”, line 204, in init
super(Connection, self).init(*args, **kwargs2)
OperationalError: (1193, “Unknown system variable ‘storage_engine’”)

Not sure what else to do… any help appreciated.

From the client logs…
applet.log:

[11/29/16 23:28:00]request failed for http://192.168.1.188:8000/api2/unseen_messages/:

Page unavailable

Page unavailable

<p>Sorry, but the requested page is unavailable due to a
server hiccup.</p>
<p>Our eng

Seafile.log:

[11/26/16 15:04:11] sync-mgr.c(1479): Removing blocks for repo My Library(67609d1b).
[11/29/16 17:32:51] sync-mgr.c(728): Repo ‘My Library’ sync state transition from initializing to ‘error’: ‘Repo is damaged on relay.’.
[11/29/16 17:33:22] sync-mgr.c(728): Repo ‘My Library’ sync state transition from initializing to ‘error’: ‘Repo is damaged on relay.’.
[11/29/16 17:33:54] sync-mgr.c(728): Repo ‘My Library’ sync state transition from initializing to ‘error’: ‘Repo is damaged on relay.’.
[11/29/16 17:34:24] sync-mgr.c(728): Repo ‘My Library’ sync state transition from initializing to ‘error’: ‘Repo is damaged on relay.’.
[11/29/16 17:34:55] sync-mgr.c(728): Repo ‘My Library’ sync state transition from initializing to ‘error’: ‘Repo is damaged on relay.’.
[11/29/16 17:35:26] sync-mgr.c(728): Repo ‘My Library’ sync state transition from initializing to ‘error’: ‘Repo is damaged on relay.’.
[11/29/16 17:35:57] sync-mgr.c(728): Repo ‘My Library’ sync state transition from initializing to ‘error’: ‘Repo is damaged on relay.’.
[11/29/16 17:36:28] sync-mgr.c(728): Repo ‘My Library’ sync state transition from initializing to ‘error’: ‘Repo is damaged on relay.’.
[11/29/16 17:36:59] sync-mgr.c(728): Repo ‘My Library’ sync state transition from initializing to ‘error’: ‘Repo is damaged on relay.’.
[11/29/16 22:26:31] http-tx-mgr.c(707): libcurl failed to GET http://192.168.1.188:8082/repo/67609d1b-11cc-4966-92fd-0f945d8c08e6/commit/HEAD: Couldn’t connect to server.
[11/29/16 22:26:31] sync-mgr.c(728): Repo ‘My Library’ sync state transition from initializing to ‘error’: ‘Failed to get sync info from server.’.

Check the database settings in your seahub_settings.py, you should be able to safely remove the storage_engine parameter from there. AFAIK, InnoDB ist the default in later MySQL versions anyway.

Best regards,
Moritz

Hi Moritz,

I removed the following lines:

    'OPTIONS': {
        'init_command': 'SET storage_engine=INNODB',

After that seahub.sh won’t 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

If you really just removed those lines you will have a trailing } after them which makes the settings file invalid python.

Ah that’s right. Sorry I missed that Moritz.
After removing the trailing } it is working now.
Thank you very much!