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


(Mitesh) #1

[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: nuxeoCluster1
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.


(Christian Dahlqvist) #2

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


(Mitesh) #3

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

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


(Mitesh) #4

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


(Christian Dahlqvist) #5

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.


(Mitesh) #6

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).


(Christian Dahlqvist) #7

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


(David Pilato) #8

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


(system) #9

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