Getting ConnectTransportException for 127.0.0.1:9300

Hi,

I am setting up elasticsearch in my environment and using 3 virtual boxes, each Virtual box has 2 instances of elasticsearch configured - one is master node and other is data node

So when I start my server1(Hostname:slabc113 , port no 10.xxx.yy.zzz) - master node (it starts successfully)
But when I start my server2(Hostname:slabc118, port no 10.aaa.bb.ccc) master node , it starts but throws below exception

[2016-08-12 05:58:44,406][WARN ][cluster.service ] [slabc118] failed to connect to node [{sl73commapd113}{ahiare8hQDKPdG1CAsQ3Lg}{127.0.0.1}{127.0.0.1:9300}{master=false}]
ConnectTransportException[[slabc113][127.0.0.1:9300] connect_timeout[30s]]; nested: ConnectException[Connection refused: /127.0.0.1:9300];
at org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:987)
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:920)
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:893)
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:260)
at org.elasticsearch.cluster.service.InternalClusterService.runTasksForExecutor(InternalClusterService.java:590)
at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:772)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:231)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:194)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: Connection refused: /127.0.0.1:9300
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:152)
at org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)
at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)

[2016-08-12 05:59:40,481][WARN ][cluster.service ] [slabc118] failed to reconnect to node {slabc113}{ahiare8hQDKPdG1CAsQ3Lg}{127.0.0.1}{127.0.0.1:9300}{master=false}
ConnectTransportException[[sl73commapd113][127.0.0.1:9300] connect_timeout[30s]]; nested: ConnectException[Connection refused: /127.0.0.1:9300];
at org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:987)
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:920)
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:893)
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:260)
at org.elasticsearch.cluster.service.InternalClusterService$ReconnectToNodes.run(InternalClusterService.java:828)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: Connection refused: /127.0.0.1:9300
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:152)
at org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)
at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)

can someone tell me the reason it is trying to connect to 127.0.0.1

What version are you on?

You have to define the unicast list of nodes. By default it tries local interface only