Hi, I'm trying to deploy a 3 node elasticsearch cluster to aws EC2 using the role here:
Ansible runs the playbook with no error, until it hangs for minutes on this step:
"TASK [elasticsearch : Wait for elasticsearch to startup delay=5, host={{es_api_host}}, port={{es_api_port}}, connect_timeout=1] ***"
I can ssh in, but find that elasticsearch is not running.
Here is the tail end of that failure:
TASK [elasticsearch : command _raw_params=/bin/true] ***************************
skipping: [10.16.8.111]
TASK [elasticsearch : Copy role_mapping.yml File for Instance src=security/role_mapping.yml.j2, force=yes, mode=0644, dest={{conf_dir}}/x-pack/role_mapping.yml, group={{ es_group }}, owner={{ es_user }}] ***
skipping: [10.16.8.111]
TASK [elasticsearch : Copy message auth key to elasticsearch src={{ es_message_auth_file }}, force=yes, mode=0600, dest={{conf_dir}}/x-pack/system_key, group={{ es_group }}, owner={{ es_user }}] ***
skipping: [10.16.8.111]
TASK [elasticsearch : Ensure security conf directory exists owner={{ es_user }}, path={{ conf_dir }}/security, state=directory, group={{ es_group }}] ***
skipping: [10.16.8.111]
TASK [elasticsearch : Set Plugin Directory Permissions owner={{ es_user }}, path={{ es_home }}/plugins, state=directory, group={{ es_group }}, recurse=yes] ***
ok: [10.16.8.111]
TASK [elasticsearch : file owner={{ es_user }}, path=/etc/elasticsearch/templates, state=directory, group={{ es_group }}] ***
skipping: [10.16.8.111]
TASK [elasticsearch : Copy default templates to elasticsearch dest=/etc/elasticsearch/, src=templates, group={{ es_group }}, owner={{ es_user }}] ***
skipping: [10.16.8.111]
TASK [elasticsearch : Copy templates to elasticsearch dest=/etc/elasticsearch/templates, src={{ item }}, group={{ es_group }}, owner={{ es_user }}] ***
TASK [elasticsearch : Wait for elasticsearch to startup delay=5, host={{es_api_host}}, port={{es_api_port}}, connect_timeout=1] ***
NOTES:
- My playbook is pretty much identical to the example provided there as well, and I've made 0 modifications to the role.
- I can ssh into the instances after the failure, so connectivity is not an issue. Elasticsearch is not running.
The playbook is as follows:
-
hosts: es_master_nodes
roles:- { role: elasticsearch, es_instance_name: "es-node1", es_data_dirs: "/opt/elasticsearch/data", es_log_dir: "/opt/elasticsearch/logs",
es_config: {
node.name: "es-node1",
cluster.name: "es-clstr",
discovery.zen.ping.unicast.hosts: "localhost:9301",
http.port: 9201,
transport.tcp.port: 9301,
node.data: false,
node.master: true,
bootstrap.memory_lock: true,
} }
vars:
es_scripts: false
es_templates: false
es_version_lock: false
es_heap_size: 1g
es_api_port: 9201
- { role: elasticsearch, es_instance_name: "es-node1", es_data_dirs: "/opt/elasticsearch/data", es_log_dir: "/opt/elasticsearch/logs",
-
hosts: es_data_nodes
roles:- { role: elasticsearch, es_instance_name: "es-node2", es_data_dirs: "/opt/elasticsearch/data", es_log_dir: "/opt/elasticsearch/logs",
es_config: {
node.name: "es-node2",
cluster.name: "es-clstr",
discovery.zen.ping.unicast.hosts: "localhost:9301",
http.port: 9201,
transport.tcp.port: 9301,
node.data: true,
node.master: false,
bootstrap.memory_lock: false,
} }
vars:
es_scripts: false
es_templates: false
es_version_lock: false
ansible_user: centos
es_api_port: 9201
- { role: elasticsearch, es_instance_name: "es-node2", es_data_dirs: "/opt/elasticsearch/data", es_log_dir: "/opt/elasticsearch/logs",
-
hosts: es_data_nodes
roles:- { role: elasticsearch, es_instance_name: "es-node3", es_data_dirs: "/opt/elasticsearch/data", es_log_dir: "/opt/elasticsearch/logs",
es_config: {
node.name: "es-node3",
cluster.name: "es-clstr",
discovery.zen.ping.unicast.hosts: "localhost:9301",
http.port: 9201,
transport.tcp.port: 9301,
node.data: true,
node.master: false,
bootstrap.memory_lock: false,
} }
vars:
es_scripts: false
es_templates: false
es_version_lock: false
ansible_user: centos
es_api_port: 9201
- { role: elasticsearch, es_instance_name: "es-node3", es_data_dirs: "/opt/elasticsearch/data", es_log_dir: "/opt/elasticsearch/logs",