Seahub 啟動不能.

OS 是Centos 7

依照文件做到Step5 運行這行便出現問題…

[root@localhost seafile-server]# systemctl status seahub -l
● seahub.service - Seafile Hub
Loaded: loaded (/etc/systemd/system/seahub.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2020-04-04 18:48:29 HKT; 57min ago
Process: 3323 ExecStart=/var/www/seafile/seafile-server/seahub.sh start (code=exited, status=1/FAILURE)
Main PID: 3323 (code=exited, status=1/FAILURE)

Apr 04 18:48:24 localhost.localdomain seahub.sh[3323]: ----------------------------------------
Apr 04 18:48:24 localhost.localdomain seahub.sh[3323]: It’s the first time you start the seafile server. Now let’s create the admin account
Apr 04 18:48:24 localhost.localdomain seahub.sh[3323]: ----------------------------------------
Apr 04 18:48:24 localhost.localdomain seahub.sh[3323]: What is the email for the admin account?
Apr 04 18:48:24 localhost.localdomain seahub.sh[3323]: [ admin email ]
Apr 04 18:48:24 localhost.localdomain seahub.sh[3323]: Error happened during creating seafile admin.
Apr 04 18:48:29 localhost.localdomain systemd[1]: seahub.service: main process exited, code=exited, status=1/FAILURE
Apr 04 18:48:29 localhost.localdomain systemd[1]: Failed to start Seafile Hub.
Apr 04 18:48:29 localhost.localdomain systemd[1]: Unit seahub.service entered failed state.
Apr 04 18:48:29 localhost.localdomain systemd[1]: seahub.service failed.

:frowning:

先设置Seahub的管理员账号,再用systemctl启动

但是我在step 4那個位入了一次.
那我現在可以在那個位置入多一次管理員帳號?

剛reset了admin.
但都是發生錯誤.
Error happened during creating seafile admin.

最新:
● seahub.service - Seafile Hub
Loaded: loaded (/etc/systemd/system/seahub.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2020-04-05 20:31:02 HKT; 31s ago
Process: 11222 ExecStart=/var/www/seafile/seafile-server/seahub.sh start (code=exited, status=1/FAILURE)
Main PID: 11222 (code=exited, status=1/FAILURE)

Apr 05 20:30:56 localhost.localdomain systemd[1]: Starting Seafile Hub…
Apr 05 20:30:56 localhost.localdomain seahub.sh[11222]: LC_ALL is not set in ENV, set to en_US.UTF-8
Apr 05 20:30:56 localhost.localdomain seahub.sh[11222]: Starting seahub at port 8000 …
Apr 05 20:31:02 localhost.localdomain systemd[1]: seahub.service: main process exited, code=exited, status=1/FAILURE
Apr 05 20:31:02 localhost.localdomain systemd[1]: Failed to start Seafile Hub.
Apr 05 20:31:02 localhost.localdomain systemd[1]: Unit seahub.service entered failed state.
Apr 05 20:31:02 localhost.localdomain systemd[1]: seahub.service failed.

[root@localhost seafile-server]# ./seahub.sh start-fastcgi

LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub (fastcgi) at 127.0.0.1:8000 …
Traceback (most recent call last):
File “/var/www/seafile/seafile-server/seahub/manage.py”, line 10, in
execute_from_command_line(sys.argv)
File “/var/www/seafile/seafile-server/seahub/thirdpart/django/core/management/init.py”, line 364 , in execute_from_command_line
utility.execute()
File “/var/www/seafile/seafile-server/seahub/thirdpart/django/core/management/init.py”, line 338 , in execute
django.setup()
File “/var/www/seafile/seafile-server/seahub/thirdpart/django/init.py”, line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File “/var/www/seafile/seafile-server/seahub/thirdpart/django/apps/registry.py”, line 85, in populat e
app_config = AppConfig.create(entry)
File “/var/www/seafile/seafile-server/seahub/thirdpart/django/apps/config.py”, line 94, in create
module = import_module(entry)
File “/usr/lib64/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘captcha’
Error:Seahub failed to start.

最後放棄了使用fastcgi 模式.
&
運行這句後正常運行seahub

pip3 install captcha

nginx

nginx 的配置
server {
listen 80;
server_name cssvr.abc.com;
rewrite ^ https://$http_host$request_uri? permanent;
server_tokens off;
}

server {
listen 443 ssl;
server_name cssvr.abc.com;

ssl on;

ssl_protocols           TLSv1 TLSv1.1 TLSv1.2;
ssl_certificate         /etc/nginx/ssl/server.crt;
ssl_certificate_key    /etc/nginx/ssl/server.key;

ssl_ciphers  'ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4';
ssl_dhparam   /etc/nginx/ssl/dhparam.pem;
ssl_prefer_server_ciphers  on;

location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_read_timeout 1200s;

used for view/edit office file via Office Online Server

client_max_body_size 0;
access_log /var/log/nginx/seahub.access.log;
error_log /var/log/nginx/seahub.error.log;
}

location /seafhttp {
    rewrite ^/seafhttp(.*)$ $1 break;
    proxy_pass http://127.0.0.1:8082;
    client_max_body_size 0;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 36000s;
proxy_read_timeout 36000s;
proxy_send_timeout 36000s;
send_timeout 36000s;
access_log /var/log/nginx/seahub.access.log;
error_log /var/log/nginx/seahub.error.log;

}

#CHANGE THIS PATH WITH YOUR OWN DIRECTORY
location /media {
    root /var/www/seafile/seafile-server/seahub;
}

}

参考:https://my.oschina.net/inpool/blog/3217189

有參考過.
我昨天花了1整天時間終於弄好了.
感謝.