Details
-
Bug
-
Status: Done
-
Major
-
Resolution: Done
-
Next + 1
-
$ git rev-parse HEAD
225a490cf4a475e728bf9129ea3e662b543f5cc4
Description
The deployments fails at task "metron_elasticsearch_templates : Wait for Elasticsearch Host to Start" even if elasticsearch is up and running.
TASK [metron_elasticsearch_templates : Wait for Elasticsearch Host to Start] *** fatal: [node1]: FAILED! => {"changed": false, "elapsed": 300, "failed": true, "msg": "Timeout when waiting for node1:9200"}
On metron node:
[root@node1 ~]# lsof -P -n -iTCP -sTCP:LISTEN | grep elasticsearch java 12684 elasticsearch 117u IPv6 181670 0t0 TCP 192.168.1.13:9300 (LISTEN) java 12684 elasticsearch 146u IPv6 181879 0t0 TCP 192.168.1.13:9200 (LISTEN)
Elasticsearch listens on the IP address of the interface while the name "node1" only resolves to 127.0.0.1.
Resolution: listen to IP address of the interface and to 127.0.0.1:
diff --git a/metron-deployment/roles/elasticsearch/tasks/elasticsearch.yml b/metron-deployment/roles/elasticsearch/tasks/elasticsearch.yml index b5df7b9..92ef9c5 100644 --- a/metron-deployment/roles/elasticsearch/tasks/elasticsearch.yml +++ b/metron-deployment/roles/elasticsearch/tasks/elasticsearch.yml @@ -66,8 +66,8 @@ state=present with_items: - { regexp: '^# *cluster\.name:', line: 'cluster.name: metron' } - - { regexp: '^# *network\.host:', line: 'network.host: _{{ - elasticsearch_network_interface }}:ipv4_' } + - { regexp: '^# *network\.host:', line: 'network.host: ["_{{ + elasticsearch_network_interface }}:ipv4_","_local:ipv4_"]' } - { regexp: '^# *discovery\.zen\.ping\.unicast\.hosts:', line: 'discovery.zen.ping.unicast.hosts: [ {{ es_hosts }} ]'} - { regexp: '^# *path\.data', line: 'path.data: {{ elasticsearch_data_dir }}' }
Result:
[root@node1 ~]# lsof -P -n -iTCP -sTCP:LISTEN | grep elasticsearch java 19741 elasticsearch 117u IPv6 202309 0t0 TCP 127.0.0.1:9300 (LISTEN) java 19741 elasticsearch 119u IPv6 202312 0t0 TCP 192.168.1.13:9300 (LISTEN) java 19741 elasticsearch 147u IPv6 202382 0t0 TCP 127.0.0.1:9200 (LISTEN) java 19741 elasticsearch 148u IPv6 202383 0t0 TCP 192.168.1.13:9200 (LISTEN)
Attachments
Issue Links
- links to