23年初了解到了Seafile,按官网服务器手册在Ubuntu 22.04 上用 Docker 部署 Seafile 开源版,并正常使用至今。已经存储在了100G的资料。我想迁移到另一台电脑上,也是安装好了Ubuntu 22.04。
我试了官网服务器手册中的备份和恢复的方式,但重启服务器后就报 502 Bad Gateway。
备份数据库:
docker exec -it seafile-mysql mysqldump -uroot -p** --opt ccnet_db > ccnet_db.sqldocker exec -it seafile-mysql mysqldump -uroot -p** --opt seafile_db > seafile_db.sqldocker exec -it seafile-mysql mysqldump -uroot -p** --opt seahub_db > seahub_db.sql
恢复备份数据库:
docker cp /opt/seafile-backup/databases/ccnet_db.sql seafile-mysql:/tmp/ccnet_db.sql
docker cp /opt/seafile-backup/databases/seafile_db.sql seafile-mysql:/tmp/seafile_db.sql
docker cp /opt/seafile-backup/databases/seahub_db.sql seafile-mysql:/tmp/seahub_db.sql
docker exec -it seafile-mysql /bin/sh -c “mysql -uroot -p** ccnet_db < /tmp/ccnet_db.sql”
docker exec -it seafile-mysql /bin/sh -c “mysql -uroot -p** seafile_db < /tmp/seafile_db.sql”
docker exec -it seafile-mysql /bin/sh -c “mysql -uroot -p** seahub_db < /tmp/seahub_db.sql”
备份和恢复数据,就是cp /seafile-data/seafile。
经过几次尝试后,确认备份和恢复数据库是没问题的,就是复制 /seafile-data/seafile后就会出错 502 Bad Gateway
你应该手动启动一下 看一下 seafile的报错
一樣,我也是到了這裡就沒辦法了。
您现在具体是什么操作遇到的什么问题,能否详细描述下,也是恢复数据后服务起不来吗?
是的,數據恢復後訪問顯示502bad gateway,在數據局導入,數據導入時都很成功,沒有報錯,但是就是不能訪問網站了
有教程或者解決方法的話就發一下哈,兄弟
您可以将conf/gunicorn.conf.py中的daemon设置成false,手动启动一下服务,看下具体报错
好像還是錯誤,哪個報錯信息在哪裡看的呀,是這個嗎
修改设置后,依次运行./seafile.sh start , ./seahub.sh start就会有报错
你好,報錯信息為這個Error happened during creating seafile admin.
/opt/seafile-data/seafile/seafile-server-11.0.6/seahub/seahub/settings.py:915: SyntaxWarning: invalid escape sequence ‘\w’
match = re.search(‘^EXTRA_(\w+)’, attr)
Traceback (most recent call last):
File “/opt/seafile-data/seafile/seafile-server-11.0.6/seahub/thirdpart/bin/gunicorn”, line 8, in
sys.exit(run())
^^^^^
File “/opt/seafile-data/seafile/seafile-server-11.0.6/seahub/thirdpart/gunicorn/app/wsgiapp.py”, line 67, in run
WSGIApplication(“%(prog)s [OPTIONS] [APP_MODULE]”).run()
File “/opt/seafile-data/seafile/seafile-server-11.0.6/seahub/thirdpart/gunicorn/app/base.py”, line 231, in run
super().run()
File “/opt/seafile-data/seafile/seafile-server-11.0.6/seahub/thirdpart/gunicorn/app/base.py”, line 72, in run
Arbiter(self).run()
^^^^^^^^^^^^^
File “/opt/seafile-data/seafile/seafile-server-11.0.6/seahub/thirdpart/gunicorn/arbiter.py”, line 58, in init
self.setup(app)
File “/opt/seafile-data/seafile/seafile-server-11.0.6/seahub/thirdpart/gunicorn/arbiter.py”, line 118, in setup
self.app.wsgi()
File “/opt/seafile-data/seafile/seafile-server-11.0.6/seahub/thirdpart/gunicorn/app/base.py”, line 67, in wsgi
self.callable = self.load()
^^^^^^^^^^^
File “/opt/seafile-data/seafile/seafile-server-11.0.6/seahub/thirdpart/gunicorn/app/wsgiapp.py”, line 58, in load
return self.load_wsgiapp()
^^^^^^^^^^^^^^^^^^^
File “/opt/seafile-data/seafile/seafile-server-11.0.6/seahub/thirdpart/gunicorn/app/wsgiapp.py”, line 48, in load_wsgiapp
return util.import_app(self.app_uri)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/seafile-data/seafile/seafile-server-11.0.6/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-data/seafile/seafile-server-11.0.6/seahub/seahub/wsgi.py”, line 25, in
application = get_wsgi_application()
^^^^^^^^^^^^^^^^^^^^^^
File “/opt/seafile-data/seafile/seafile-server-11.0.6/seahub/thirdpart/django/core/wsgi.py”, line 12, in get_wsgi_application
django.setup(set_prefix=False)
File “/opt/seafile-data/seafile/seafile-server-11.0.6/seahub/thirdpart/django/init.py”, line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File “/opt/seafile-data/seafile/seafile-server-11.0.6/seahub/thirdpart/django/apps/registry.py”, line 91, in populate
app_config = AppConfig.create(entry)
^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/seafile-data/seafile/seafile-server-11.0.6/seahub/thirdpart/django/apps/config.py”, line 193, in create
import_module(entry)
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 1324, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘captcha’
Error:Seahub failed to start.
Please try to run “./seahub.sh start” again
root@ubuntu-server:/opt/seafile-data/seafile/seafile-server-latest# 我是用docker部署的。所以我輸入了對應yaml上面的用戶和密碼,得到如下的信息
docker部署的话正常来说不需要额外安装python3,不会出现python3依赖的问题,建议您参照docker部署重新安装下用 Docker 部署 Seafile 专业版 - seafile-manual-cn
那這個是什麼原因造成的呢,也是安裝官方教程安裝的
这个是系统python环境依赖的问题
稍等,我重新docker安裝,看看是否有不同變化
你好,都是一樣的結果,重新docker安裝的seafile都是一樣,都是剛才的錯誤,是什麼原因造成的呢