# Getting Error while Nuxeo Client trying to access Elasticsearch on same host or localhost

**URL:** <https://discuss.elastic.co/t/getting-error-while-nuxeo-client-trying-to-access-elasticsearch-on-same-host-or-localhost/101790>\
**Category:** Elasticsearch\
**Created:** [September 26, 2017, 6:55am UTC](https://discuss.elastic.co/t/getting-error-while-nuxeo-client-trying-to-access-elasticsearch-on-same-host-or-localhost/101790 "2017-09-26T06:55:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mvk786](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@mvk786](https://discuss.elastic.co/u/mvk786)\
**Post date:** [September 26, 2017, 6:55am UTC](https://discuss.elastic.co/t/getting-error-while-nuxeo-client-trying-to-access-elasticsearch-on-same-host-or-localhost/101790/1 "2017-09-26T06:55:00Z")

</div>

[2017-09-26 11:43:02,429][INFO][cluster.routing.allocation] [nuxeo] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[.marvel-es-1-2017.09.25][0], [.marvel-es-data-1][0], [.marvel-es-1-2017.09.26][0]] ...]).  
[2017-09-26 12:04:03,146][WARN][http.netty] [nuxeo] Caught exception while handling client http traffic, closing connection [id: 0x6079d8cc, /127.0.0.1:31949 =\> /127.0.0.1:9200]  
java.lang.IllegalArgumentException: empty text  
at org.jboss.netty.handler.codec.http.HttpVersion.(HttpVersion.java:89)  
at org.jboss.netty.handler.codec.http.HttpVersion.valueOf(HttpVersion.java:62)  
at org.jboss.netty.handler.codec.http.HttpRequestDecoder.createMessage(HttpRequestDecoder.java:75)  
at org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:191)  
at org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:102)  
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:500)  
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435)  
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)  
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)  
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)  
at org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:75)  
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)  
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)  
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)  
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)  
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)  
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)  
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)  
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)  
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)  
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)  
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)  
at java.lang.Thread.run(Thread.java:748)  
[2017-09-26 12:05:26,159][INFO][bootstrap] running graceful exit on windows  
[2017-09-26 12:05:26,162][INFO][node] [nuxeo] stopping ...  
[2017-09-26 12:05:26,390][INFO][node] [nuxeo] stopped  
[2017-09-26 12:05:26,391][INFO][node] [nuxeo] closing ...  
[2017-09-26 12:05:26,405][INFO][node] [nuxeo] closed

Following is the setting or configuration of yml file.

[cluster.name](http://cluster.name): nuxeoCluster1  
[node.name](http://node.name): nuxeo  
path.data: E:\installed\_apps\Elastic\Elasticsearch\_2\_4\_6\data  
path.logs: E:\installed\_apps\Elastic\Elasticsearch\_2\_4\_6\logs  
http.port: 9200

From Nuxeo client logs getting following error  
2017-09-26 12:02:31,200 ERROR [localhost-startStop-1] [org.nuxeo.runtime.model.impl.RegistrationInfoImpl] Component service:org.nuxeo.elasticsearch.ElasticSearchComponent notification of application started failed: Failed to connect to elasticsearch, check addressList and clusterName: None of the configured nodes are available: [{#transport#-1}{127.0.0.1}{localhost/127.0.0.1:9200}]  
java.lang.RuntimeException: Failed to connect to elasticsearch, check addressList and clusterName: None of the configured nodes are available: [{#transport#-1}{127.0.0.1}{localhost/127.0.0.1:9200}]  
at org.nuxeo.elasticsearch.core.ElasticSearchAdminImpl.checkClusterHealth(ElasticSearchAdminImpl.java:254)  
at org.nuxeo.elasticsearch.core.ElasticSearchAdminImpl.connect(ElasticSearchAdminImpl.java:137)  
at org.nuxeo.elasticsearch.core.ElasticSearchAdminImpl.(ElasticSearchAdminImpl.java:121)  
at org.nuxeo.elasticsearch.ElasticSearchComponent.start(ElasticSearchComponent.java:197)  
at org.nuxeo.runtime.model.impl.RegistrationInfoImpl.start(RegistrationInfoImpl.java:341)

I am able to perform telnet localhost 9200 , not sure why still this error ? am i missing any configuration on Elasticsearch.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 26, 2017, 7:01am UTC](https://discuss.elastic.co/t/getting-error-while-nuxeo-client-trying-to-access-elasticsearch-on-same-host-or-localhost/101790/2 "2017-09-26T07:01:42Z")

</div>

It looks like you are using the transport protocol, which should use port 9300, not 9200.

---

<div class="post-metadata">

**Author:** ![mvk786](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@mvk786](https://discuss.elastic.co/u/mvk786)\
**Post date:** [September 26, 2017, 7:03am UTC](https://discuss.elastic.co/t/getting-error-while-nuxeo-client-trying-to-access-elasticsearch-on-same-host-or-localhost/101790/3 "2017-09-26T07:03:17Z")

</div>

you mean change in http.port: 9200 --\> http.port: 9300 in elasticsearch.yml file ?

any change in nux.conf file ? client configuration file ?

---

<div class="post-metadata">

**Author:** ![mvk786](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@mvk786](https://discuss.elastic.co/u/mvk786)\
**Post date:** [September 26, 2017, 7:06am UTC](https://discuss.elastic.co/t/getting-error-while-nuxeo-client-trying-to-access-elasticsearch-on-same-host-or-localhost/101790/4 "2017-09-26T07:06:27Z")

</div>

can you clarify, what change need to be done in configuration file ?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 26, 2017, 7:07am UTC](https://discuss.elastic.co/t/getting-error-while-nuxeo-client-trying-to-access-elasticsearch-on-same-host-or-localhost/101790/5 "2017-09-26T07:07:39Z")

</div>

The transport client does not use HTTP, so that should stay as 9200. Try changing the client to instead connect to port 9300 and see if this helps. This is based on what I see in the error message - I have no experience with Nuxeo.

---

<div class="post-metadata">

**Author:** ![mvk786](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@mvk786](https://discuss.elastic.co/u/mvk786)\
**Post date:** [September 26, 2017, 7:32am UTC](https://discuss.elastic.co/t/getting-error-while-nuxeo-client-trying-to-access-elasticsearch-on-same-host-or-localhost/101790/6 "2017-09-26T07:32:04Z")

</div>

> [@Christian\_Dahlqvist](#):
>
> rt client does not use HTTP

Thank you Christian , much appreciated. now not getting elasticsearch error, getting following error seems Nuxeo client not getting DB services running.

017-09-26 12:43:40,589 ERROR [localhost-startStop-1] [org.nuxeo.runtime.model.impl.RegistrationInfoImpl] Component service:org.nuxeo.ecm.core.repository.RepositoryServiceComponent notification of application started failed: Failed to save session, java.sql.BatchUpdateException: Violation of PRIMARY KEY constraint 'hierarchy\_pk'. Cannot insert duplicate key in object 'dbo.hierarchy'. The duplicate key value is (5bf346ef-a29f-4475-828d-fa597917878a).  
org.nuxeo.ecm.core.api.ConcurrentUpdateException: Failed to save session, java.sql.BatchUpdateException: Violation of PRIMARY KEY constraint 'hierarchy\_pk'. Cannot insert duplicate key in object 'dbo.hierarchy'. The duplicate key value is (5bf346ef-a29f-4475-828d-fa597917878a).

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 26, 2017, 7:33am UTC](https://discuss.elastic.co/t/getting-error-while-nuxeo-client-trying-to-access-elasticsearch-on-same-host-or-localhost/101790/7 "2017-09-26T07:33:40Z")

</div>

That would seem to be Nuxeo specific, so you may need to ask them.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 26, 2017, 9:09am UTC](https://discuss.elastic.co/t/getting-error-while-nuxeo-client-trying-to-access-elasticsearch-on-same-host-or-localhost/101790/8 "2017-09-26T09:09:44Z")

</div>

Yeah. The stacktrace here is all about the connection between Nuxeo and your database. Not elasticsearch.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 24, 2017, 9:09am UTC](https://discuss.elastic.co/t/getting-error-while-nuxeo-client-trying-to-access-elasticsearch-on-same-host-or-localhost/101790/9 "2017-10-24T09:09:53Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
