centos7,seafile-server7.1.5,新安装社区版,seahub.sh启动失败


#1

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

LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub at port 8000 …
Traceback (most recent call last):
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/bin/gunicorn”, line 8, in
sys.exit(run())
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/app/wsgiapp.py”, line 58, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/app/base.py”, line 228, in run
super().run()
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/app/base.py”, line 72, in run
Arbiter(self).run()
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/arbiter.py”, line 58, in init
self.setup(app)
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/arbiter.py”, line 118, in setup
self.app.wsgi()
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/app/base.py”, line 67, in wsgi
self.callable = self.load()
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/app/wsgiapp.py”, line 49, in load
return self.load_wsgiapp()
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/app/wsgiapp.py”, line 39, in load_wsgiapp
return util.import_app(self.app_uri)
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/util.py”, line 358, in import_app
mod = importlib.import_module(module)
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 955, in _find_and_load_unlocked
File “”, line 665, in _load_unlocked
File “”, line 678, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/haiwen/seafile-server-7.1.5/seahub/seahub/wsgi.py”, line 25, in
application = get_wsgi_application()
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/django/core/wsgi.py”, line 13, in get_wsgi_application
django.setup(set_prefix=False)
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/django/init.py”, line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/django/apps/registry.py”, line 85, in populate
app_config = AppConfig.create(entry)
File “/haiwen/seafile-server-7.1.5/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.
Please try to run “./seahub.sh start” again
[root@localhost seafile-server-7.1.5]#


#2

翻了下论坛,captcha需要安装。
pip3 install captcha
安装后重启seahub.sh
程序停留在booting working with pid :31689
ctrl+c后报错
[root@localhost seafile-server-7.1.5]# ./seahub.sh start

LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub at port 8000 …
[2021-02-13 09:27:16 +0000] [31906] [INFO] Starting gunicorn 20.0.4
[2021-02-13 09:27:16 +0000] [31906] [INFO] Listening at: http://127.0.0.1:8000 (31906)
[2021-02-13 09:27:16 +0000] [31906] [INFO] Using worker: sync
[2021-02-13 09:27:16 +0000] [31912] [INFO] Booting worker with pid: 31912
[2021-02-13 09:27:16 +0000] [31913] [INFO] Booting worker with pid: 31913
[2021-02-13 09:27:16 +0000] [31914] [INFO] Booting worker with pid: 31914
[2021-02-13 09:27:16 +0000] [31915] [INFO] Booting worker with pid: 31915
[2021-02-13 09:27:16 +0000] [31916] [INFO] Booting worker with pid: 31916
^C[2021-02-13 09:43:41 +0000] [31906] [INFO] Handling signal: int
[2021-02-13 09:43:41 +0000] [31914] [INFO] Worker exiting (pid: 31914)
[2021-02-13 09:43:41 +0000] [31912] [INFO] Worker exiting (pid: 31912)
[2021-02-13 09:43:41 +0000] [31913] [INFO] Worker exiting (pid: 31913)
[2021-02-13 09:43:41 +0000] [31915] [INFO] Worker exiting (pid: 31915)
[2021-02-13 09:43:41 +0000] [31916] [INFO] Worker exiting (pid: 31916)
[2021-02-13 09:43:42 +0000] [31906] [INFO] Shutting down: Master
Error:Seahub failed to start.
Please try to run “./seahub.sh start” again


#3

又安装了一个django-simple-captcha.
pip3 install django-simple-captcha
之后,运行./seahub.sh start
程序停留在第五个 进程。
但是本地127.0.0.1:8000能出现了。


#4

更换了/haiwen/conf/gunicorn.conf.py中

# default localhost:8000
#bind = "127.0.0.1:8000"
bind = "192.168.15.233:8000"

本地192.168.15.233:8000能访问了,但是外部计算机ie访问不正常,提示输入用户名,密码,但是显示白板。防火墙已经关闭。
服务器端报错信息:
root@localhost seafile-server-7.1.5]# ./seahub.sh restart

Seahub is not running
LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub at port 8000 …
[2021-02-13 11:38:41 +0000] [9679] [INFO] Starting gunicorn 20.0.4
[2021-02-13 11:38:41 +0000] [9679] [INFO] Listening at: http://192.168.15.233:8000 (9679)
[2021-02-13 11:38:41 +0000] [9679] [INFO] Using worker: sync
[2021-02-13 11:38:41 +0000] [9725] [INFO] Booting worker with pid: 9725
[2021-02-13 11:38:41 +0000] [9726] [INFO] Booting worker with pid: 9726
[2021-02-13 11:38:41 +0000] [9727] [INFO] Booting worker with pid: 9727
[2021-02-13 11:38:41 +0000] [9728] [INFO] Booting worker with pid: 9728
[2021-02-13 11:38:41 +0000] [9729] [INFO] Booting worker with pid: 9729
[2021-02-13 11:41:22 +0000] [9725] [ERROR] Socket error processing request.
Traceback (most recent call last):
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/workers/sync.py”, line 133, in handle
req = next(parser)
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/http/parser.py”, line 41, in next
self.mesg = self.mesg_class(self.cfg, self.unreader, self.req_count)
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/http/message.py”, line 186, in init
super().init(cfg, unreader)
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/http/message.py”, line 53, in init
unused = self.parse(self.unreader)
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/http/message.py”, line 235, in parse
self.headers = self.parse_headers(data[:idx])
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/http/message.py”, line 73, in parse_headers
remote_addr = self.unreader.sock.getpeername()
OSError: [Errno 107] Transport endpoint is not connected
[2021-02-13 11:41:22 +0000] [9729] [ERROR] Socket error processing request.
Traceback (most recent call last):
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/workers/sync.py”, line 133, in handle
req = next(parser)
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/http/parser.py”, line 41, in next
self.mesg = self.mesg_class(self.cfg, self.unreader, self.req_count)
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/http/message.py”, line 186, in init
super().init(cfg, unreader)
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/http/message.py”, line 53, in init
unused = self.parse(self.unreader)
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/http/message.py”, line 235, in parse
self.headers = self.parse_headers(data[:idx])
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/http/message.py”, line 73, in parse_headers
remote_addr = self.unreader.sock.getpeername()
OSError: [Errno 107] Transport endpoint is not connected[2021-02-13 11:41:22 +0000] [9728] [ERROR] Socket error processing request.
Traceback (most recent call last):
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/workers/sync.py”, line 133, in handle
req = next(parser)
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/http/parser.py”, line 41, in next
self.mesg = self.mesg_class(self.cfg, self.unreader, self.req_count)
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/http/message.py”, line 186, in init
super().init(cfg, unreader)
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/http/message.py”, line 53, in init
unused = self.parse(self.unreader)
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/http/message.py”, line 235, in parse
self.headers = self.parse_headers(data[:idx])
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/http/message.py”, line 73, in parse_headers
remote_addr = self.unreader.sock.getpeername()
OSError: [Errno 107] Transport endpoint is not connected
[2021-02-13 11:41:22 +0000] [9726] [ERROR] Socket error processing request.
Traceback (most recent call last):
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/workers/sync.py”, line 133, in handle
req = next(parser)
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/http/parser.py”, line 41, in next
self.mesg = self.mesg_class(self.cfg, self.unreader, self.req_count)
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/http/message.py”, line 186, in init
super().init(cfg, unreader)
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/http/message.py”, line 53, in init
unused = self.parse(self.unreader)
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/http/message.py”, line 235, in parse
self.headers = self.parse_headers(data[:idx])
File “/haiwen/seafile-server-7.1.5/seahub/thirdpart/gunicorn/http/message.py”, line 73, in parse_headers
remote_addr = self.unreader.sock.getpeername()
OSError: [Errno 107] Transport endpoint is not connected


#5

论坛里说,安装apache 反向代理就可以解决,安装了apache2.4,复制粘贴了操作说明,现在启动./seahub.sh start-fastcgi报错:
[root@localhost seafile-server-7.1.5]# ./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 …
Unknown command: ‘runfcgi’
Type ‘manage.py help’ for usage.
Error:Seahub failed to start.


#7

查资料说Unknown command: ‘runfcgi’,是由于django版本太高,需要降级到1.8.
卸载了django3.1.6,重新安装了django1.8.19。
重启了系统,但是还是同样报错。