The elasticsearch initiates successfully on the nodes but somehow ansible is stuck at TASK [elastic.elasticsearch : Wait for elasticsearch to startup]
My nodes are EC2 Amazon linux 2 and ansible is run from my desktop ansible-2.9.10-1.fc32.noarch.
Ansible config file:
TASK [elastic.elasticsearch : Wait for elasticsearch to startup] ***********************************************
fatal: [obj-ansible-node1]: FAILED! => {"changed": false, "elapsed": 300, "msg": "Timeout when waiting for localhost:9200"}
PLAY RECAP *****************************************************************************************************
ssh-node1 : ok=34 changed=12 unreachable=0 failed=1 skipped=84 rescued=0 ignored=0
After restarting the script it successfully goes trough node-1 tasks and hangs the same way on node-2.
At the end I do have fully working 2-node SSL/TLS secured cluster.
What is wrong with my configuration? Any help is greatly appreciated.
The role uses es_api_host and es_api_port to communicate with the node for actions only achievable via http e.g. to install templates and to check the NODE IS ACTIVE. These default to "localhost" and 9200 respectively. If the node is deployed to bind on either a different host or port, these must be changed.
On a separate note for future reference, the SSL/TLS certificates were generated in advance on an existing Elasticsearch node as described in the documentation.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.