进seafile网页版不能搜索, 手动运行./pro/pro.py search --update也出错了

直接在命令行运行 ./pro/pro.py search --update 也报错了, 这个是什么问题啊?

seafile6.1.4, ubuntu 16.04

root@ae837aa479c8:/opt/seafile/seafile-server-latest# ./pro/pro.py search --update

Updating search index, this may take a while...

[09/13/2017 05:39:47] storage: using filesystem storage backend
[09/13/2017 05:39:47] index office pdf: True
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/opt/seafile/seafile-pro-server-6.1.4/pro/python/seafes/update_repos.py", line 173, in <module>
    main()
  File "/opt/seafile/seafile-pro-server-6.1.4/pro/python/seafes/update_repos.py", line 117, in main
    args.func()
  File "/opt/seafile/seafile-pro-server-6.1.4/pro/python/seafes/update_repos.py", line 63, in update_repos
    updater = FileIndexUpdater(es_get_conn())
  File "/opt/seafile/seafile-pro-server-6.1.4/pro/python/seafes/file_index_updater.py", line 29, in __init__
    self.status_index = RepoStatusIndex(es_conn)
  File "/opt/seafile/seafile-pro-server-6.1.4/pro/python/seafes/indexes/repo_status.py", line 60, in __init__
    self.create_index_if_missing()
  File "/opt/seafile/seafile-pro-server-6.1.4/pro/python/seafes/indexes/base.py", line 21, in create_index_if_missing
    if not self.es.indices.exists(index=self.INDEX_NAME):
  File "/opt/seafile/seafile-pro-server-6.1.4/pro/python/elasticsearch-2.4.1-py2.6.egg/elasticsearch/client/utils.py", line 69, in _wrapped
    return func(*args, params=params, **kwargs)
  File "/opt/seafile/seafile-pro-server-6.1.4/pro/python/elasticsearch-2.4.1-py2.6.egg/elasticsearch/client/indices.py", line 225, in exists
    params=params)
  File "/opt/seafile/seafile-pro-server-6.1.4/pro/python/elasticsearch-2.4.1-py2.6.egg/elasticsearch/transport.py", line 327, in perform_request
    status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
  File "/opt/seafile/seafile-pro-server-6.1.4/pro/python/elasticsearch-2.4.1-py2.6.egg/elasticsearch/connection/http_urllib3.py", line 106, in perform_request
    raise ConnectionError('N/A', str(e), e)
elasticsearch.exceptions.ConnectionError: ConnectionError(<urllib3.connection.HTTPConnection object at 0x7fa73925d7d0>: Failed to establish a new connection: [Errno 111] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7fa73925d7d0>: Failed to establish a new connection: [Errno 111] Connection refused)

找到原因了. 储存是把几个硬盘用mergerfs合起来的.

参数里面如果打开direct_io 后, 搜索就不能用了.

查了下, mergerfs 如果打开direct_io, 性能会更好, 不过mmap就不能用了. 估计seafile 搜索里面用到了这个.

我也出现了这个问题,请问怎么解决?谢了。

关闭mergerfs 的direct_io

如果你没用mergerfs, 是直接访问硬盘的…那估计出问题的原因不一样