I forgot to mention that I get the following debug messages every 5
seconds. Is there a way to avoid these messages while verifying the
connection?
13:52:47,365 INFO [STDOUT] elasticsearch[cached]-pool-14-thread-1
[2011-11-14 13:52:47,365][client.transport]DEBUG: [Orbit] Failed to
connect to node [#transport#-1][inet[localhost/127.0.0.1:9300]],
removed from nodes list
org.elasticsearch.transport.ConnectTransportException:
[inet[localhost/127.0.0.1:9300]] connect_timeout[30s]
at
org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:
563)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:
506)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:
485)
at
org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:
121)
at org.elasticsearch.client.transport.TransportClientNodesService
$SimpleNodeSampler.sample(TransportClientNodesService.java:260)
at org.elasticsearch.client.transport.TransportClientNodesService
$ScheduledNodeSampler.run(TransportClientNodesService.java:243)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:
567)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink
$Boss.connect(NioClientSocketPipelineSink.java:384)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink
$Boss.processSelectedKeys(NioClientSocketPipelineSink.java:354)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink
$Boss.run(NioClientSocketPipelineSink.java:276)
at
org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:
108)
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker
$1.run(DeadLockProofWorker.java:44)
... 3 more
Yes, what you did looks good. It will continue to try and reconnect in the
background though, so if you throw an exception if it has not connected,
you might want to close the client as well.
Yes, what you did looks good. It will continue to try and reconnect in the
background though, so if you throw an exception if it has not connected,
you might want to close the client as well.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.