Elasticsearch problem [Seafile Pro 7.1.9]

Hello Seafile community,

we are running Seafile Pro Server 7.1.9 in our corporate network and having an issue with Elasticsearch.

The search in Seahub works without any problems but every few seconds the following error message gets written to the elasticsearch.log file.

[2020-12-18T12:05:22,254][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [[/home/seafile/seafile/pro-data/search/data/elasticsearch]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?
	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.IllegalStateException: failed to obtain node locks, tried [[/home/seafile/seafile/pro-data/search/data/elasticsearch]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?
	at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:265) ~[elasticsearch-5.6.13.jar:5.6.13]
	at org.elasticsearch.node.Node.<init>(Node.java:265) ~[elasticsearch-5.6.13.jar:5.6.13]
	at org.elasticsearch.node.Node.<init>(Node.java:245) ~[elasticsearch-5.6.13.jar:5.6.13]
	at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:233) ~[elasticsearch-5.6.13.jar:5.6.13]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:233) ~[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

We are using the bundled Elasticsearch which comes with the Seafile Pro installer. I did not do any modifications to the Elasticsearch (Elasticsearch default configuration).

I noticed that in the seafile/pro-data/search/data/elasticsearch/nodes directory there are 2 subdirectories:

seafile@seafile:~/seafile/pro-data/search/data/elasticsearch/nodes$ ls
0  1

Both directories contain a node.lock file which I think is really strange since we are running seafile in a single-node configuration (there is only 1 seafile server). Shouldn’t there only be 1 elasticsearch node and therefore only 1 node.lock file?

Any hints / help would be greatly appreciated!

Thanks in advance!

Best regards,
Philipp

Does the folder /home/seafile/seafile/pro-data/search/data/elasticsearch exist at all? We have experienced a similar problem, where elastic is complaining about being unable to ‘obtain node locks’ but obviously the path stated in the message is not existent. So far a simple restart of the seafile-background-tasks was enough to solve the issue.