I have installed elastic 2.2 on an Ubuntu 14.04. I left the default initial settings of elastic and the elastic instance was reachable form this system at localhost:9200.
Now when I tried via a different system using the IP/DNS name of the server as:
curl -XGET "http://<IP_ADDRESS_UBUNTU_SERVER>:9200"
I get an error as :
Failed to connect to <IP_ADDRESS_UBUNTU_SERVER> port 9200: Connection refused
I tried changing few parameters in elasticsearch.yml file and set it as:
network.host: 0.0.0.0
http.port: 9200
But this did not solve the issue. I set get the same error as connection refused. In-fact setting the above parameters and trying to access from the server using localhost:9200 also gave a connection timed-out error.
Now what is the configuration, I need to set so that this elastic instance is accessible from outside?
I tried to set the IP Address of the Ubuntu server as network.host, but I see the following errors in the log files:
BindTransportException[Failed to bind to [9300-9400]]; nested: ChannelException[Failed to bind to: /10.173.1.176:9400]; nested: BindException[Cannot assign requested address];
at org.elasticsearch.transport.netty.NettyTransport.bindToPort(NettyTransport.java:477)
at org.elasticsearch.transport.netty.NettyTransport.bindServerBootstrap(NettyTransport.java:439)
at org.elasticsearch.transport.netty.NettyTransport.doStart(NettyTransport.java:320)
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:68)
at org.elasticsearch.transport.TransportService.doStart(TransportService.java:170)
at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:68)
at org.elasticsearch.node.Node.start(Node.java:252)
at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:221)
Caused by: java.net.BindException: Cannot assign requested address
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.jboss.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193)
To rule out if there is any issue with my server , I hosted a simple page using python server on some random port. I was able to access this page from outside my server with the specified port. So I think this might be an issue with the elastic configurations
Any clue what is happening here?