I have an elastic server deployed on a remote machine & using the Java API to connect to it.
The connection works fine when hit from my local sandbox machine. But when I deploy my code to the dev environment.
The connection exception occurs when the code tries to connect to the remote elastic server
2015-12-02 23:49:15.621 [main] DEBUG o.e.c.transport - [Shockwave] adding address [[#transport#-1][sb2-007][inet[xxxxxx.com/xxxx:9300]]]
2015-12-02 23:49:45.729 [elasticsearch[Shockwave][management][T#1]] DEBUG o.e.c.transport - [Shockwave] failed to connect to node [[#transport#-1][sb2-007][inet[xxxxxxx.com/xxxxxxxxx:9300]]], ignoring...
org.elasticsearch.transport.ConnectTransportException: [][inet[xxxxxx.com/xxxxxx:9300]] connect_timeout[30s]
at org.elasticsearch.transport.netty.NettyTransport.connectToChannelsLight(NettyTransport.java:790) ~[elasticsearch-1.6.0.jar!/:na]
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:754) ~[elasticsearch-1.6.0.jar!/:na]
at org.elasticsearch.transport.netty.NettyTransport.connectToNodeLight(NettyTransport.java:726) ~[elasticsearch-1.6.0.jar!/:na]
at org.elasticsearch.transport.TransportService.connectToNodeLight(TransportService.java:220) ~[elasticsearch-1.6.0.jar!/:na]
at org.elasticsearch.client.transport.TransportClientNodesService$SniffNodesSampler$1.run(TransportClientNodesService.java:439) ~[elasticsearch-1.6.0.jar!/:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_55]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_55]
Can anyone tell me the reason why this is happening?