Elasticsearch doesn't work, pro-data folder empty, urllib3 error

If I try to search anything from the web front-end, I get “Internal server error”. If I disable indexing, I get a spinning circle that never stops spinning.
After updating to 9.0.15 and restarting, Search doesn’t throw an error anymore – it simply returns empty results.

Notable issues:

  • The elasticsearch.pid file in the /pids folder is never created. If created manually, gets deleted.
  • The /pro-data folder is completely empty. It looks like it has stayed empty since I converted the standard Seafile to Pro. Permissions to the seafile user are given correctly.
  • This may or may not be connected to a “well documented” urllib3-elasticsearch problem in Python. Check index.log and pro.py output below.

seafevents.conf

[INDEX FILES]
enabled = true
interval = 10m
highlight = fvh

controller.log

2023-03-02 15:46:33 seafile-controller.c(97): spawn_process: /opt/seafile/seafile-pro-server-9.0.15/pro/elasticsearch/bin/elasticsearch -Epath.logs=/opt/seafile/logs -Epath.data=/opt/seafile/pro-data/search/data -Enetwork.host=127.0.0.1 -p /opt/seafile/pids/elasticsearch.pid
2023-03-02 15:46:33 seafile-controller.c(131): spawned /opt/seafile/seafile-pro-server-9.0.15/pro/elasticsearch/bin/elasticsearch, pid 2478649
2023-03-02 15:46:33 seafile-controller.c(119): failed to execvp /opt/seafile/seafile-pro-server-9.0.15/pro/elasticsearch/bin/elasticsearch

^ I tried solving the above by creating a soft link to the correct path of elasticsearch (since there is no /bin/elasticsearch folder), as suggested here. The error may have disappeared from the log, I think. But all the other problems remain.

index.log

03/02/2023 11:49:47 [INFO] seafes:208 main: storage: using filesystem storage backend
03/02/2023 11:49:47 [INFO] seafes:210 main: index office pdf: False
03/02/2023 11:49:47 [ERROR] seafes:158 start_index_local: Index process init error: ConnectionError(<urllib3.connection.HTTPConnection object at 0x7f81bf91ea00>: Failed to establish a new connection: [Errno 111] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7f81bf91ea00>: Failed to establish a new connection: [Errno 111] Connection refused).

seafevents.log

[2023-03-02 11:39:47,302] [INFO] search indexer is started, interval = 600 sec
[2023-03-02 11:39:47,302] [INFO] seahub email sender is disabled
[2023-03-02 11:39:47,302] [INFO] ldap sync is disabled
[2023-03-02 11:39:47,302] [INFO] virus scan is disabled
[2023-03-02 11:39:47,302] [INFO] data statistics is disabled
[2023-03-02 11:39:47,302] [INFO] content scan is disabled
[2023-03-02 11:39:47,303] [INFO] repo old file auto del scanner disabled
[2023-03-02 11:39:47,303] [INFO] User login statistics is disabled.
[2023-03-02 11:39:47,303] [INFO] Traffic statistics is disabled.
[2023-03-02 11:49:47,303] [INFO] starts to index files

<pro.py search --clear> output

File "/opt/seafile/seafile-pro-server-9.0.15/pro/python/elasticsearch/connection/http_urllib3.py", line 280, in perform_request raise ConnectionError("N/A", str(e), e) elasticsearch.exceptions.ConnectionError: ConnectionError(<urllib3.connection.HTTPConnection object at 0x7f1787f72670>: Failed to establish a new connection: [Errno 111] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7f1787f72670>: Failed to establish a new connection: [Errno 111] Connection refused)

The urllib3 - elasticsearch - error 111 - python problem is well recorded on Google, but I cannot seem to find a solution that can help in this case.

Any idea on how to fix all of this will be very very welcomed.

Forget it. I just realized ElasticSearch is supposed to be installed separately, and to top it off, as a docker container.

Of course, no mention of this in the documentation about migrating from Community edition, where, instead, the user is basically told that ElasticSearch is simply included with Seafile and, what’s worse, the user is recommended to install Java and other dependencies, for no reason whatsoever, since Docker would take care of those.

Please, people at Seafile. keep your documentation updated.This was a gigantic waste of time.

1 Like