Hi,
I have the following problem if I'm using local node. It works find with
elasticsearch server, but if I switch to the local node, then application
creates 50 nodes, and the following error is fired:
Exception in thread "Thread-500" org.elasticsearch.
ElasticSearchIllegalStateException: Failed to obtain node lock, is the
following location writable?: [/home/zoran/elasticsearch/elasticsearch]
at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:123
)
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java
:134)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)
at org.prosolo.services.indexing.ElasticSearchFactory.getLocalClient(
ElasticSearchFactory.java:62)
at org.prosolo.services.indexing.ElasticSearchFactory.getClient(
ElasticSearchFactory.java:22)
at org.prosolo.services.indexing.AbstractBaseEntityESServiceImpl.
indexNode(AbstractBaseEntityESServiceImpl.java:57)
at org.prosolo.services.indexing.impl.NodeEntityESServiceImpl.
saveResourceNode(NodeEntityESServiceImpl.java:50)
at org.prosolo.services.indexing.impl.NodeEntityESServiceImpl.
saveNodeToES(NodeEntityESServiceImpl.java:30)
at org.prosolo.services.indexing.impl.NodeChangeObserver$1.run(
NodeChangeObserver.java:53)
at java.lang.Thread.run(Thread.java:724)
I know there is the limit on the OS to maximum number of opened files, so I
changed /etc/security/limits.conf
zoran soft nofile 15000
zoran hard nofile 15000
However, it doesn't work, so I suppose that I should make elasticsearch
aware of this change in some way.
Source code creating local client is like this:
private static Client getLocalClient(){
ElasticSearchConfig elasticSearchConfig=Settings.getInstance().
config.elasticSearch;
String dataDirectory = elasticSearchConfig.homePath;
ImmutableSettings.Builder elasticsearchSettings = ImmutableSettings.
settingsBuilder()
// .put("http.enabled", "false")
.put("cluster.name", elasticSearchConfig.clusterName)
.put("path.data", dataDirectory);
Node node = nodeBuilder()
.local(true)
.settings(elasticsearchSettings.build())
.node();
Client client = node.client();
return client;
}
I'm sure that this location is writeable as it index first 50 documents
without a problem.
Could you please tell me what could be the problem?
Best,
Zoran
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.