I set up two elasticsearch nodes on two computers on my home network which is reachable from the outside via dynamic IP. They seem to see each other.
Ports are open in the router
Now I want to add a node on a fixed IP outside server
HOME = 2 nodes (behind 1 dynamic IP)
INTERNET = 1 node (static IP)
What do I need to add to elasticsearch.yml
#network.host: 192.168.1.142,127.0.0.1,localhost
network.bind_host: 192.168.1.142, 127.0.0.1, localhost
network.publish_host: www.somename.com,192.168.1.142
when I add www.somename.com to network.host it says it can't bind to the IP
org.elasticsearch.transport.BindTransportException: Failed to bind to 111.111.111.11:[9300-9399]
Playing around with network.bind_host and network.publish_host restarting elasticsearch does not seem to be helpful.
I run on 1 home node
/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s node
then
on the fixed server IP node
I install, reinstall elasticsearch with apt remove --purge etc
`
/usr/share/elasticsearch/bin/elasticsearch-reconfigure-node --enrollment-token <token from dynamic ip server>
`
The enrollment token seems to always point to 192.168.1.142
Unable to communicate with the node on https://192.168.1.142:9200/_security/enroll/node. Error was Connection timed out
ERROR: Aborting enrolling to cluster. Could not communicate with the node on any of the addresses from the enrollment token. All of [192.168.1.142:9200] were attempted.
I also tried 0.0.0.0 which seems also a nono.
I can telnet from the fixed IP Server to the home ip at 9200 and 9300
Ports are open from 9300-9399
How do I need to configure the server that the enrollment token doesn't always just point to the same internal address?