部署过程中seahub.sh启动失败

输入完电子邮件后就是这样了
[root@localhost seafile-pro-server-7.0.2]# ./seahub.sh start

Starting seahub at port 8000 …
Failed to read config file: /root/panseafile/conf/gunicorn.conf
Traceback (most recent call last):
File “/root/panseafile/seafile-pro-server-7.0.2/seahub/thirdpart/gunicorn-19.8.1-py2.7.egg/gunicorn/app/base.py”, line 106, in get_config_from_filename
execfile_(filename, cfg, cfg)
File "/root/panseafile/seafile-pro-server-7.0.2/seahub/thirdpart/gunicorn-19.8.1-py2.7.egg/gunicorn/compat.py", line 91, in execfile
return execfile(fname, *args)
File “/root/panseafile/conf/gunicorn.conf”, line 4, in
daemon = true
NameError: name ‘true’ is not defined
Error:Seahub failed to start.
Please try to run “./seahub.sh start” again

望协助处理

补充一下

Starting seahub (fastcgi) at 127.0.0.1:8000 …
Traceback (most recent call last):
File “/root/panseafile/seafile-pro-server-7.0.2/seahub/manage.py”, line 10, in
execute_from_command_line(sys.argv)
File “/root/panseafile/seafile-pro-server-7.0.2/seahub/thirdpart/django/core/management/init.py”, line 364, in execute_from_command_line
utility.execute()
File “/root/panseafile/seafile-pro-server-7.0.2/seahub/thirdpart/django/core/management/init.py”, line 338, in execute
django.setup()
File “/root/panseafile/seafile-pro-server-7.0.2/seahub/thirdpart/django/init.py”, line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File “/root/panseafile/seafile-pro-server-7.0.2/seahub/thirdpart/django/apps/registry.py”, line 108, in populate
app_config.import_models()
File “/root/panseafile/seafile-pro-server-7.0.2/seahub/thirdpart/django/apps/config.py”, line 202, in import_models
self.models_module = import_module(models_module_name)
File “/usr/lib64/python2.7/importlib/init.py”, line 37, in import_module
import(name)
File “/root/panseafile/seafile-pro-server-7.0.2/seahub/seahub/base/models.py”, line 13, in
from seahub.group.models import GroupMessage
File “/root/panseafile/seafile-pro-server-7.0.2/seahub/seahub/group/models.py”, line 13, in
from seahub.profile.models import Profile
File “/root/panseafile/seafile-pro-server-7.0.2/seahub/seahub/profile/models.py”, line 220, in
from .utils import refresh_cache
File “/root/panseafile/seafile-pro-server-7.0.2/seahub/seahub/profile/utils.py”, line 8, in
from seahub.utils import normalize_cache_key
File “/root/panseafile/seafile-pro-server-7.0.2/seahub/seahub/utils/init.py”, line 65, in
seafevents_api.init(EVENTS_CONFIG_FILE)
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/seafevents/seafevents_api.py”, line 13, in init
load_config(config_file)
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/seafevents/app/config.py”, line 40, in load_config
appconfig.seaf_session_cls = init_db_session_class(appconfig.seaf_conf_path, db = ‘seafile’)
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/seafevents/db.py”, line 117, in init_db_session_class
SeafBase.prepare(engine, reflect=True)
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/ext/automap.py”, line 753, in prepare
autoload_replace=False
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/sql/schema.py”, line 3755, in reflect
with bind.connect() as conn:
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py”, line 2085, in connect
return self._connection_cls(self, **kwargs)
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py”, line 90, in init
if connection is not None else engine.raw_connection()
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py”, line 2171, in raw_connection
self.pool.unique_connection, _connection)
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py”, line 2145, in _wrap_pool_connect
e, dialect, self)
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py”, line 1456, in _handle_dbapi_exception_noconnection
exc_info
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/util/compat.py”, line 202, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py”, line 2141, in _wrap_pool_connect
return fn()
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/pool.py”, line 328, in unique_connection
return _ConnectionFairy._checkout(self)
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/pool.py”, line 766, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/pool.py”, line 516, in checkout
rec = pool._do_get()
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/pool.py”, line 1138, in _do_get
self._dec_overflow()
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/util/langhelpers.py”, line 60, in exit
compat.reraise(exc_type, exc_value, exc_tb)
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/pool.py”, line 1135, in _do_get
return self._create_connection()
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/pool.py”, line 333, in _create_connection
return _ConnectionRecord(self)
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/pool.py”, line 461, in init
self.__connect(first_connect_check=True)
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/pool.py”, line 661, in __connect
exec_once(self.connection, self)
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/event/attr.py”, line 246, in exec_once
self(*args, **kw)
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/event/attr.py”, line 256, in call
fn(*args, **kw)
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/util/langhelpers.py”, line 1321, in go
return once_fn(*arg, **kw)
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/engine/strategies.py”, line 181, in first_connect
dialect.initialize©
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/dialects/mysql/base.py”, line 1632, in initialize
default.DefaultDialect.initialize(self, connection)
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/engine/default.py”, line 249, in initialize
self.get_isolation_level(connection.connection)
File “/root/panseafile/seafile-pro-server-7.0.2/pro/python/SQLAlchemy-1.1.3-py2.6-linux-x86_64.egg/sqlalchemy/dialects/mysql/base.py”, line 1496, in get_isolation_level
cursor.execute(‘SELECT @@tx_isolation’)
File “/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/usr/lib64/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (1193, “Unknown system variable ‘tx_isolation’”)
Error:Seahub failed to start.

image

这个配置应该是True

对的,是可以启动了,但是还有两个错误,能帮排查一下吗

日志里报错一共有两个,其他正常,目前网页无法访问

一个是controller.log

这个是反复重启
[05/30/19 18:02:19] seafile-controller.c(594): pid file /root/panseafile/pids/elasticsearch.pid does not exist
[05/30/19 18:02:19] seafile-controller.c(637): elasticsearch need restart…
[05/30/19 18:02:19] seafile-controller.c(94): spawn_process: /root/panseafile/seafile-pro-server-7.0.2/pro/elasticsearch/bin/elasticsearch -Epath.logs=/root/panseafile/logs -Epath.data=/root/panseafile/pro-data/search/data -Enetwork.host=127.0.0.1 -p /root/panseafile/pids/elasticsearch.pid
[05/30/19 18:02:19] seafile-controller.c(109): spawned /root/panseafile/seafile-pro-server-7.0.2/pro/elasticsearch/bin/elasticsearch, pid 19749
[05/30/19 18:02:29] seafile-controller.c(594): pid file /root/panseafile/pids/elasticsearch.pid does not exist
[05/30/19 18:02:29] seafile-controller.c(637): elasticsearch need restart…
[05/30/19 18:02:29] seafile-controller.c(94): spawn_process: /root/panseafile/seafile-pro-server-7.0.2/pro/elasticsearch/bin/elasticsearch -Epath.logs=/root/panseafile/logs -Epath.data=/root/panseafile/pro-data/search/data -Enetwork.host=127.0.0.1 -p /root/panseafile/pids/elasticsearch.pid
[05/30/19 18:02:29] seafile-controller.c(109): spawned /root/panseafile/seafile-pro-server-7.0.2/pro/elasticsearch/bin/elasticsearch, pid 19795
[05/30/19 18:02:39] seafile-controller.c(594): pid file /root/panseafile/pids/elasticsearch.pid does not exist
[05/30/19 18:02:39] seafile-controller.c(637): elasticsearch need restart…
[05/30/19 18:02:39] seafile-controller.c(94): spawn_process: /root/panseafile/seafile-pro-server-7.0.2/pro/elasticsearch/bin/elasticsearch -Epath.logs=/root/panseafile/logs -Epath.data=/root/panseafile/pro-data/search/data -Enetwork.host=127.0.0.1 -p /root/panseafile/pids/elasticsearch.pid
[05/30/19 18:02:39] seafile-controller.c(109): spawned /root/panseafile/seafile-pro-server-7.0.2/pro/elasticsearch/bin/elasticsearch, pid 19841
[05/30/19 18:02:49] seafile-controller.c(594): pid file /root/panseafile/pids/elasticsearch.pid does not exist
[05/30/19 18:02:49] seafile-controller.c(637): elasticsearch need restart…
[05/30/19 18:02:49] seafile-controller.c(94): spawn_process: /root/panseafile/seafile-pro-server-7.0.2/pro/elasticsearch/bin/elasticsearch -Epath.logs=/root/panseafile/logs -Epath.data=/root/panseafile/pro-data/search/data -Enetwork.host=127.0.0.1 -p /root/panseafile/pids/elasticsearch.pid
[05/30/19 18:02:49] seafile-controller.c(109): spawned /root/panseafile/seafile-pro-server-7.0.2/pro/elasticsearch/bin/elasticsearch, pid 19891

还有一个是elasticsearch.log

[2019-05-30T18:05:00,592][ERROR][o.e.b.Bootstrap ] Exception
java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:106) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:195) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:342) [elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132) [elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:123) [elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:70) [elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134) [elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) [elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) [elasticsearch-5.6.13.jar:5.6.13]
[2019-05-30T18:05:00,603][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:123) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:70) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-5.6.13.jar:5.6.13]
Caused by: java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:106) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:195) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:342) ~[elasticsearch-5.6.13.jar:5.6.13]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132) ~[elasticsearch-5.6.13.jar:5.6.13]
… 6 more

多出一个错误的index.log

05/30/2019 19:36:17 [INFO] root:208 main: storage: using filesystem storage backend
05/30/2019 19:36:17 [INFO] root:210 main: index office pdf: True
05/30/2019 19:36:17 [ERROR] seafes:158 start_index_local: Index process init error: ConnectionError(<urllib3.connection.HTTPConnection object at 0x7f97f9bc6950>: Failed to establish a new connection: [Errno 111] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7f97f9bc6950>: Failed to establish a new connection: [Errno 111] Connection refused).
05/30/2019 19:46:18 [INFO] root:208 main: storage: using filesystem storage backend
05/30/2019 19:46:18 [INFO] root:210 main: index office pdf: True
05/30/2019 19:46:18 [ERROR] seafes:158 start_index_local: Index process init error: ConnectionError(<urllib3.connection.HTTPConnection object at 0x7f8733974950>: Failed to establish a new connection: [Errno 111] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7f8733974950>: Failed to establish a new connection: [Errno 111] Connection refused).

elas的报错应该不会影响页面的访问,还有之所出现elas无法启动是因为5.6以后的elas不允许用户使用root身份运行了,所以你也不应该用root身份运行seafile程序

我的也同样这个错“%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20190730000445 ” 。麻烦这个错该怎么解决,无论是改它上级目录权限还是改这个执行的文件权限,都不行。

我是在搜索文件时,环境显示不结果来,查看“elasticsearch.log”,原因如下图:

这个跟该目录权限没啥关系,你需要做的是切换启动seafile的用户身份,使用非root的用户去启动seafile

您好打扰了,请教一下。Seafile一定要使用非root用户才能成功启动对吗?我这边的报错非常奇怪:

./seahub.sh start

Starting seahub at port 8000 ...
Error:Seahub failed to start.
Please try to run "./seahub.sh start" again

基本没有有效信息。我换成别的端口(例如9000)也报一样的错。

需要和seafile-data 目录一样的用户权限