Configure ES on aws linux to allow connection from public ip

I am trying to run elasticsearch instance version 2.4.5 and here is my config file XX.XX.XX.XX
Trying for single node on aws server

I have provided my aws public ip here...
When I start elasticsearch using ./bin/elasticsearch, it gives me error as -

[2017-04-28 17:37:13,988][INFO ][node                     ] [Mechamage] version[2.4.5], pid[13030], build[c849dd1/2017-04-24T16:18:17Z]
[2017-04-28 17:37:13,989][INFO ][node                     ] [Mechamage] initializing ...
[2017-04-28 17:37:14,476][INFO ][plugins                  ] [Mechamage] modules [reindex, lang-expression, lang-groovy], plugins [], sites []
[2017-04-28 17:37:14,528][INFO ][env                      ] [Mechamage] using [1] data paths, mounts [[/ (/dev/xvda1)]], net usable_space [8.3gb], net total_space [31.3gb], spins? [no], types [ext4]
[2017-04-28 17:37:14,528][INFO ][env                      ] [Mechamage] heap size [990.7mb], compressed ordinary object pointers [true]
[2017-04-28 17:37:16,007][INFO ][node                     ] [Mechamage] initialized
[2017-04-28 17:37:16,007][INFO ][node                     ] [Mechamage] starting ...
Exception in thread "main" BindTransportException[Failed to bind to [9300-9400]]; nested: ChannelException[Failed to bind to: /XX.XX.XX.XX:9400]; nested: BindException[Cannot assign requested address];
Likely root cause: Cannot assign requested address
        at Method)
        at org.jboss.netty.util.internal.DeadLockProofWorker$
        at java.util.concurrent.ThreadPoolExecutor.runWorker(
        at java.util.concurrent.ThreadPoolExecutor$
Refer to the log for complete error details.
[2017-04-28 17:37:16,096][INFO ][node                     ] [Mechamage] stopping ...
[2017-04-28 17:37:16,098][INFO ][node                     ] [Mechamage] stopped
[2017-04-28 17:37:16,098][INFO ][node                     ] [Mechamage] closing ...
[2017-04-28 17:37:16,103][INFO ][node                     ] [Mechamage] closed

I have tried as but it publishes to private ip and not accessible outsude of aws.

Thanks in advance.

You can only bind to a network card which actually exists.
I mean that ifconfig will give you which IPs can be used on your system.

Did you configure AWS to expose your machine outside AWS network?

Note that's super dangerous though as anyone could then have access to your instance and I'd not doing that.

Hello Dadoonet,
Thanks for response.
I have few applications running on aws configured to have connection only from my own personal laptop.(with all ports open only for my personal laptop ip)
ifconfig on aws machine gives me private ip starting with 172....and not public ip .


So I believe you can just bind to this address.

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