Seafile Pro Server File Search Problem

Hey,
I’ve tried everything and I do not know what’s wrong.
After updating (I had some problems with that and I described them here Seafile Pro Server upgrade 6.3.13 -> 7.0.3. Libraries problem) Seafile Pro Server from version 6.3.13 to 7.0.3. the search service does not work for me. I was hoping it was because the new version but no - after updating to 7.0.4 nothing has changed.
Please, help me fix it.
Command:

./pro.py search --clear

Result:

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

07/05/2019 18:52:28 [INFO] root:208 main: storage: using filesystem storage backend
07/05/2019 18:52:28 [INFO] root:210 main: index office pdf: True
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/opt/seafile/seafile-pro-server-7.0.4/pro/python/seafes/index_local.py", line 268, in <module>
    main()
  File "/opt/seafile/seafile-pro-server-7.0.4/pro/python/seafes/index_local.py", line 212, in main
    args.func()
  File "/opt/seafile/seafile-pro-server-7.0.4/pro/python/seafes/index_local.py", line 173, in delete_indices
    if es.indices.exists(idx):
  File "/opt/seafile/seafile-pro-server-7.0.4/pro/python/elasticsearch/client/utils.py", line 73, in _wrapped
    return func(*args, params=params, **kwargs)
  File "/opt/seafile/seafile-pro-server-7.0.4/pro/python/elasticsearch/client/indices.py", line 224, in exists
    params=params)
  File "/opt/seafile/seafile-pro-server-7.0.4/pro/python/elasticsearch/transport.py", line 312, in perform_request
    status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
  File "/opt/seafile/seafile-pro-server-7.0.4/pro/python/elasticsearch/connection/http_urllib3.py", line 124, in perform_request
    raise ConnectionError('N/A', str(e), e)
elasticsearch.exceptions.ConnectionError: ConnectionError(<urllib3.connection.HTTPConnection object at 0x7f4772096850>: Failed to establish a new connection: [Errno 111] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7f4772096850>: Failed to establish a new connection: [Errno 111] Connection refused)

Command:

./pro.py search --update

Result:

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

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

The entire directory belongs to the seafile user:

drwx------.  3 seafile seafile   73 Jul  5 18:50 ccnet
drwx------.  2 seafile seafile  161 Jul  4 12:10 conf
drwx------.  2 seafile seafile    6 Feb 25 18:25 Desktop
drwxr-xr-x.  2 seafile seafile  100 Oct 30  2018 installed
drwxr-xr-x.  3 seafile seafile 4096 Jul  2 00:01 logs
drwxr-xr-x.  2 seafile seafile  105 Jul  5 18:50 pids
drwx------.  2 seafile seafile    6 Jun 18 12:38 pro-data
drwx------.  9 seafile seafile  119 Oct 30  2018 seafile-data
drwxr-xr-x. 10 seafile seafile 4096 Jul  5 07:36 seafile-pro-server-7.0.4
lrwxrwxrwx.  1 seafile seafile   24 Jul  5 18:50 seafile-server-latest -> seafile-pro-server-7.0.4
drwxr-xr-x.  5 seafile seafile   52 Jul  3 12:00 seahub-data

index.log:

07/05/2019 18:00:48 [INFO] root:208 main: storage: using filesystem storage backend
07/05/2019 18:00:48 [INFO] root:210 main: index office pdf: True
07/05/2019 18:00:48 [ERROR] seafes:158 start_index_local: Index process init error: ConnectionError(<urllib3.connection.HTTPConnection object at 0x7f381b68b410>: Failed to establish a new connection: [Errno 111] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7f381b6$
07/05/2019 18:10:48 [INFO] root:208 main: storage: using filesystem storage backend
07/05/2019 18:10:48 [INFO] root:210 main: index office pdf: True
07/05/2019 18:10:48 [ERROR] seafes:158 start_index_local: Index process init error: ConnectionError(<urllib3.connection.HTTPConnection object at 0x7feb446c3410>: Failed to establish a new connection: [Errno 111] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7feb446$
07/05/2019 18:20:48 [INFO] root:208 main: storage: using filesystem storage backend
07/05/2019 18:20:48 [INFO] root:210 main: index office pdf: True
07/05/2019 18:20:48 [ERROR] seafes:158 start_index_local: Index process init error: ConnectionError(<urllib3.connection.HTTPConnection object at 0x7f5676c45410>: Failed to establish a new connection: [Errno 111] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7f5676c$

Of course, since the problem appeared, I have reset the server many times.

You may check elasticsearch.log to check why it is not started. Maybe you forgot to upgrade the JDK? If the current JDK version is 1.7.0, then you need to upgrade to 1.8.0.

1 Like

You were absolutely right. It works! I do not know why I have not found any tips on the internet. Thank you.

Because the documentation is more or less non existent.

You’re right. The documentation does not contain everything. Fortunately, there is a forum where developers themselves answer questions quickly. I know from experience that the best source of such knowledge is not documentation, but the forum.

2 Likes

I have a similar error with elasticsearch, with my docker installation of Seafile PE 9.0.3. Which version of Java is required to avoid the connection error (errno 111) from elasticsearch?
I have these installed:

$ java --version
openjdk 11.0.1 2018-10-16 LTS
OpenJDK Runtime Environment Zulu11.2+3 (build 11.0.1+13-LTS)
OpenJDK 64-Bit Server VM Zulu11.2+3 (build 11.0.1+13-LTS, mixed mode)