IPV6 is preferred by default. You can change this behavior by setting the java.net.preferIPv4Stack system property to true .
You should also see that by default the ES is bound to anyLocalAddress (usually 0.0.0.0 or ::0 ). You can change this by setting network.bind_host with the correct IP address.
Link [1.3] "Modules" Network Settings
Update:
Firstly, I recommend disabling ipv6 in SO, you can do this by following these steps:
In /etc/sysctl.conf :
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1
To disable on a running system:
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6 echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6
or
sysctl -w net.ipv6.conf.all.disable_ipv6=1 sysctl -w net.ipv6.conf.default.disable_ipv6=1
After that, you should change the value of network.bind_host in elasticsearch.yml in both nodes with their respective IP addresses
# Elasticsearch, by default, binds itself to the 0.0.0.0 address, and listens # on port [9200-9300] for HTTP traffic and on port [9300-9400] for node-to-node # communication. (the range means that if the port is busy, it will automatically # try the next port). # Set the bind address specifically (IPv4 or IPv6): # network.bind_host: 10.0.0.1 # Set the address other nodes will use to communicate with this node. If not # set, it is automatically derived. It must point to an actual IP address. # network.publish_host: 10.0.0.1
Or install
# Set both 'bind_host' and 'publish_host':
Finally, you should check the configuration of the network adapters, both must be correctly configured using the IP address that you used earlier.
Hope this helps
source share