What are the ownership and permissions on the directory? Regards, Mark Walkom
Infrastructure Engineer Campaign Monitor email: [email protected] web: www.campaignmonitor.com On 21 September 2014 19:42, vyeluri <[email protected]> wrote: > Hi, > > I have a similar problem. Ive defined complete write permission for my > folder that Ive defined in data.path: /var/lib/elasticsearch/elasticsearch > I still get the error Failed to obtain node lock, is the following > location writable?: [/var/lib/elasticsearch/elasticsearch] > > Could you tell me where I`m doing wrong?? > > > On Tuesday, July 2, 2013 10:06:12 AM UTC+10, Zoran Jeremic wrote: >> >> 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.ElasticSearc >> hIllegalStateException: Failed to obtain node lock, is the following >> location writable?: [/home/zoran/elasticsearch/elasticsearch] >> at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java: >> 123) >> at org.elasticsearch.node.internal.InternalNode.<init>(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.s >> aveResourceNode(NodeEntityESServiceImpl.java:50) >> at org.prosolo.services.indexing.impl.NodeEntityESServiceImpl.s >> aveNodeToES(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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/03e5c589-d8d9-4048-9465-1b99e24da8af%40googlegroups.com > <https://groups.google.com/d/msgid/elasticsearch/03e5c589-d8d9-4048-9465-1b99e24da8af%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAEM624b7T3q7ZetxUyRt3sw4VfCpVWx51rEmduPOU6RGQDVWmQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
