seafile linux版本添加或者删除资料库报错


#1

seafile linux版本添加或者删除资料库报错,但是还是可以添加删除完成


#2

什么版本的seafile,看下服务端日志有什么相关报错贴出来看下


#3

2019-09-18 10:08:17,956 [ERROR] django.request:135 handle_uncaught_exception Internal Server Error: /api2/repos/
Traceback (most recent call last):
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/django/core/handlers/base.py”, line 249, in _legacy_get_response
response = self._get_response(request)
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/django/core/handlers/base.py”, line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/django/core/handlers/base.py”, line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/django/views/decorators/csrf.py”, line 58, in wrapped_view
return view_func(*args, **kwargs)
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/django/views/generic/base.py”, line 68, in view
return self.dispatch(request, *args, **kwargs)
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/seahub/api2/base.py”, line 23, in dispatch
response = super(APIView, self).dispatch(*a, **kw)
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/rest_framework/views.py”, line 466, in dispatch
response = self.handle_exception(exc)
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/seahub/api2/base.py”, line 20, in handle_exception
return super(APIView, self).handle_exception(exc)
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/rest_framework/views.py”, line 463, in dispatch
response = handler(request, *args, **kwargs)
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/seahub/api2/views.py”, line 967, in post
library_template=library_template)
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/django/dispatch/dispatcher.py”, line 193, in send
for receiver in self._live_receivers(sender)
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/seahub/handlers.py”, line 46, in repo_created_cb
seafevents.save_user_activity(session, record)
File “/home/vmctx/seafile-pro-server-7.0.8/pro/python/seafevents/events/db.py”, line 156, in save_user_activity
session.commit()
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/sqlalchemy/orm/session.py”, line 1027, in commit
self.transaction.commit()
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/sqlalchemy/orm/session.py”, line 494, in commit
self._prepare_impl()
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/sqlalchemy/orm/session.py”, line 473, in _prepare_impl
self.session.flush()
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/sqlalchemy/orm/session.py”, line 2459, in flush
self._flush(objects)
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/sqlalchemy/orm/session.py”, line 2597, in _flush
transaction.rollback(_capture_exception=True)
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/sqlalchemy/util/langhelpers.py”, line 68, in exit
compat.reraise(exc_type, exc_value, exc_tb)
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/sqlalchemy/orm/session.py”, line 2557, in _flush
flush_context.execute()
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/sqlalchemy/orm/unitofwork.py”, line 422, in execute
rec.execute(self)
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/sqlalchemy/orm/unitofwork.py”, line 589, in execute
uow,
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/sqlalchemy/orm/persistence.py”, line 245, in save_obj
insert,
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/sqlalchemy/orm/persistence.py”, line 1138, in _emit_insert_statements
statement, params
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/sqlalchemy/engine/base.py”, line 988, in execute
return meth(self, multiparams, params)
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/sqlalchemy/sql/elements.py”, line 287, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/sqlalchemy/engine/base.py”, line 1107, in _execute_clauseelement
distilled_params,
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/sqlalchemy/engine/base.py”, line 1248, in _execute_context
e, statement, parameters, cursor, context
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/sqlalchemy/engine/base.py”, line 1466, in _handle_dbapi_exception
util.raise_from_cause(sqlalchemy_exception, exc_info)
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/sqlalchemy/util/compat.py”, line 398, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/sqlalchemy/engine/base.py”, line 1244, in _execute_context
cursor, statement, parameters, context
File “/home/vmctx/seafile-pro-server-7.0.8/seahub/thirdpart/sqlalchemy/engine/default.py”, line 552, in do_execute
cursor.execute(statement, parameters)
File “/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/usr/lib64/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
ProgrammingError: (_mysql_exceptions.ProgrammingError) (1146, “Table ‘seahubdb.Activity’ doesn’t exist”)
[SQL: INSERT INTO Activity (op_type, op_user, obj_type, timestamp, repo_id, commit_id, path, detail) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)]
[parameters: (‘create’, u’37658056@qq.com’, ‘repo’, datetime.datetime(2019, 9, 18, 10, 8, 17, 949576), u’9385fe0e-6d85-4550-adc7-d0b18cb01e77’, None, ‘/’, ‘{“repo_name”: “888888888888888”}’)]
(Background on this error at: http://sqlalche.me/e/f405)


#4

我的版本是linux 7.08版本


#5

猜测你是低版本升级过程中数据库升级不完全导致的,备份数据库,重装一下,再恢复数据库,或者等人说下怎么建这个seahubdb.Activity的表。