备份迁移seahub.sh无法启动

版本:seafile-server-10.0.1

原服务器启动正常。

/opt/seafile、/var/lib/mysql rsync完整备份迁移
MySQL、seafile.sh 启动正常

seahub.sh 如下

# ./seahub.sh 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


# tail ../logs/seahub.log 
2024-04-17 16:43:33,963 [ERROR] root:64 <module> Failed to import seafevents package.
Traceback (most recent call last):
  File "/opt/seafile/seafile-server-10.0.1/seahub/seahub/utils/__init__.py", line 62, in <module>
    from seafevents import seafevents_api
ModuleNotFoundError: No module named 'seafevents'
2024-04-17 16:43:33,973 [ERROR] root:557 <module> Failed to import seafevents package.
Traceback (most recent call last):
  File "/opt/seafile/seafile-server-10.0.1/seahub/seahub/utils/__init__.py", line 553, in <module>
    import seafevents
ModuleNotFoundError: No module named 'seafevents'


# tail -f logs/controller.log 
2024-04-18 09:52:19 seafile-controller.c(447): pid file /opt/seafile/pids/seafevents.pid does not exist
2024-04-18 09:52:19 seafile-controller.c(532): seafevents need restart...
2024-04-18 09:52:19 seafile-controller.c(82): spawn_process: /usr/bin/python3 -m seafevents.main --config-file /opt/seafile/conf/seafevents.conf --logfile /opt/seafile/logs/seafevents.log -P /opt/seafile/pids/seafevents.pid
2024-04-18 09:52:19 seafile-controller.c(116): spawned /usr/bin/python3, pid 146827
2024-04-18 09:52:19 seafile-controller.c(124): /usr/bin/python3: Error while finding module specification for 'seafevents.main' (ModuleNotFoundError: No module named 'seafevents')

部署方式是什么呢,依赖都安装吗

手动安装的,依赖都安装了。

今天又重新安装一次,先安装了一个新的,正常运行后;
再把老的,数据库、/opt/*、nginx 覆盖过了,完成迁移,可以正常运行。

有个疑问,
./seahub.sh 启动时会创建账号,判断是否创建账号的逻辑是什么(还是会检查某个文件是否存在),迁移过来的数据库中肯定已经有账号了。如下是之前启动时的报错信息:

Starting seahub at port 8000 ...
+ check_init_admin
+ check_init_admin_script=/opt/seafile/seafile-server-10.0.1/check_init_admin.py
+ python3 /opt/seafile/seafile-server-10.0.1/check_init_admin.py

Error happened during creating seafile admin.

目录权限啥的对吗

权限应该没问题,用root账号启动的
chown -R root:root /opt ,也启动不了