启动失败,日志不更新

Error:Seahub failed to start.报错之后就去看seafile.log。然后发现日志只更新到了start to serve on pipe client。后面就没了,后面的日志打印哪里去了

您看下seahub.log日志,有什么报错

seahub.log日志未更新

您可以先将conf/gunicorn.conf.py 中的damon = True 设置成 damon = False,然后去执行./seahub.sh start 截图看下有什么报错?

Traceback (most recent call last):
File “/usr/local/lib/python3.12/dist-packages/MySQLdb/init.py”, line 18, in
from . import _mysql
ImportError: libmysqlclient.so.21: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/bin/gunicorn”, line 8, in
sys.exit(run())
^^^^^
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/gunicorn/app/wsgiapp.py”, line 67, in run
WSGIApplication(“%(prog)s [OPTIONS] [APP_MODULE]”).run()
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/gunicorn/app/base.py”, line 231, in run
super().run()
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/gunicorn/app/base.py”, line 72, in run
Arbiter(self).run()
^^^^^^^^^^^^^
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/gunicorn/arbiter.py”, line 58, in init
self.setup(app)
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/gunicorn/arbiter.py”, line 118, in setup
self.app.wsgi()
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/gunicorn/app/base.py”, line 67, in wsgi
self.callable = self.load()
^^^^^^^^^^^
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/gunicorn/app/wsgiapp.py”, line 58, in load
return self.load_wsgiapp()
^^^^^^^^^^^^^^^^^^^
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/gunicorn/app/wsgiapp.py”, line 48, in load_wsgiapp
return util.import_app(self.app_uri)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/gunicorn/util.py”, line 359, in import_app
mod = importlib.import_module(module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.12/importlib/init.py”, line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “”, line 1387, in _gcd_import
File “”, line 1360, in _find_and_load
File “”, line 1331, in _find_and_load_unlocked
File “”, line 935, in _load_unlocked
File “”, line 995, in exec_module
File “”, line 488, in _call_with_frames_removed
File “/opt/seafile/seafile-server-11.0.10/seahub/seahub/wsgi.py”, line 25, in
application = get_wsgi_application()
^^^^^^^^^^^^^^^^^^^^^^
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/django/core/wsgi.py”, line 12, in get_wsgi_application
django.setup(set_prefix=False)
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/django/init.py”, line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/django/apps/registry.py”, line 116, in populate
app_config.import_models()
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/django/apps/config.py”, line 269, in import_models
self.models_module = import_module(models_module_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.12/importlib/init.py”, line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “”, line 1387, in _gcd_import
File “”, line 1360, in _find_and_load
File “”, line 1331, in _find_and_load_unlocked
File “”, line 935, in _load_unlocked
File “”, line 995, in exec_module
File “”, line 488, in _call_with_frames_removed
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/django/contrib/sessions/models.py”, line 1, in
from django.contrib.sessions.base_session import AbstractBaseSession, BaseSessionManager
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/django/contrib/sessions/base_session.py”, line 26, in
class AbstractBaseSession(models.Model):
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/django/db/models/base.py”, line 143, in new
new_class.add_to_class(“_meta”, Options(meta, app_label))
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/django/db/models/base.py”, line 371, in add_to_class
value.contribute_to_class(cls, name)
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/django/db/models/options.py”, line 243, in contribute_to_class
self.db_table, connection.ops.max_name_length()
^^^^^^^^^^^^^^
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/django/utils/connection.py”, line 15, in getattr
return getattr(self._connections[self._alias], item)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/django/utils/connection.py”, line 62, in getitem
conn = self.create_connection(alias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/django/db/utils.py”, line 193, in create_connection
backend = load_backend(db[“ENGINE”])
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/django/db/utils.py”, line 113, in load_backend
return import_module(“%s.base” % backend_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.12/importlib/init.py”, line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/seafile/seafile-server-11.0.10/seahub/thirdpart/django/db/backends/mysql/base.py”, line 15, in
import MySQLdb as Database
File “/usr/local/lib/python3.12/dist-packages/MySQLdb/init.py”, line 24, in
version_info, _mysql.version_info, _mysql.file
^^^^^^
NameError: name ‘_mysql’ is not defined
Error:Seahub failed to start.
Please try to run “./seahub.sh start” ag

从日志上看,应该是python环境依赖的问题,如果是本地安装,可以尝试重装mysqlclient。不过还是建议使用docker标准化部署,这样能避免环境问题,操作维护起来都很方便。

好吧,我换docker