Integrating elasticsearch with java through TransportClient


(vaibhav savala) #1

I am trying to connect Eclipse(Java) with elasticsearch using transportclient.
i am unable to connect both of them because of the following error:

I have used logstash to connect mysqlWorkbench with elasticsearch.

TransportClientNodesService - failed to connect to node [{#transport#-1}{yIoU2HxxSH-6Lz41uLkvNQ}{localhost}{127.0.0.1:9200}], ignoring...
org.elasticsearch.transport.ConnectTransportException: [][127.0.0.1:9200] handshake_timeout[30s]
at org.elasticsearch.transport.TcpTransport.executeHandshake(TcpTransport.java:1614) ~[elasticsearch-5.5.2.jar:5.5.2]
at org.elasticsearch.transport.TcpTransport.openConnection(TcpTransport.java:555) ~[elasticsearch-5.5.2.jar:5.5.2]
at org.elasticsearch.transport.TcpTransport.openConnection(TcpTransport.java:116) ~[elasticsearch-5.5.2.jar:5.5.2]
at org.elasticsearch.transport.TransportService.openConnection(TransportService.java:351) ~[elasticsearch-5.5.2.jar:5.5.2]
at org.elasticsearch.client.transport.TransportClientNodesService$SimpleNodeSampler.doSample(TransportClientNodesService.java:407) [elasticsearch-5.5.2.jar:5.5.2]
at org.elasticsearch.client.transport.TransportClientNodesService$NodeSampler.sample(TransportClientNodesService.java:357) [elasticsearch-5.5.2.jar:5.5.2]
at org.elasticsearch.client.transport.TransportClientNodesService.addTransportAddresses(TransportClientNodesService.java:198) [elasticsearch-5.5.2.jar:5.5.2]
at org.elasticsearch.client.transport.TransportClient.addTransportAddress(TransportClient.java:319) [elasticsearch-5.5.2.jar:5.5.2]
at com.p2s.dao.PersonDAO.ElasticsearchTC(PersonDAO.java:243) [classes/:?]
at com.p2s.service.MainService.getAllDetails(MainService.java:51) [classes/:?]
at com.p2s.controllers.MainController.getAllDetailsC(MainController.java:71) [classes/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~
....


(vaibhav savala) #2

This issue has been solved here.


(system) #3

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