autobase: Failing at task etcd: Enable and start etcd service
Hi, when running playbook I get the following error for each host:
FAILED! => {"changed": false, "msg": "Unable to start service etcd: Job for etcd.service failed because the control process exited with error code.\nSee \"systemctl status etcd.service\" and \"journalctl -xe\" for details.\n"}
Output of journalctl: `● etcd.service - Etcd Server Loaded: loaded (/etc/systemd/system/etcd.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Mon 2023-05-29 16:01:57 CEST; 17min ago Process: 340151 ExecStart=/bin/bash -c GOMAXPROCS=$(nproc) /usr/local/bin/etcd (code=exited, status=1/FAILURE) Main PID: 340151 (code=exited, status=1/FAILURE)
etcd.service: Service RestartSec=100ms expired, scheduling restart. systemd[1]: etcd.service: Scheduled restart job, restart counter is at 5. systemd[1]: Stopped Etcd Server. systemd[1]: etcd.service: Start request repeated too quickly. systemd[1]: etcd.service: Failed with result ‘exit-code’`
Tried manually restart service but same error. But If I manually run /bin/bash -c “GOMAXPROCS=$(nproc) /usr/local/bin/etcd”, I don’t get any errors and it ‘seems’ to work:
{"level":"info","ts":"2023-05-29T21:45:14.443+0200","caller":"etcdserver/server.go:2062","msg":"published local member to cluster through raft","local-member-id":"8e9e05c52164694d","local-member-attributes":"{Name:default ClientURLs:[http://localhost:2379]}","request-path":"/0/members/8e9e05c52164694d/attributes","cluster-id":"cdf818194e3a8c32","publish-timeout":"7s"} {"level":"info","ts":"2023-05-29T21:45:14.444+0200","caller":"embed/serve.go:100","msg":"ready to serve client requests"} {"level":"info","ts":"2023-05-29T21:45:14.444+0200","caller":"etcdmain/main.go:44","msg":"notifying init daemon"} {"level":"info","ts":"2023-05-29T21:45:14.444+0200","caller":"etcdmain/main.go:50","msg":"successfully notified init daemon"}
Any ideas?
Remote host:
- RockyLinux 8.6,
- selinux enforcing
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 18 (9 by maintainers)
Use of Internal and External IP Addresses in Ansible Inventory
It has been identified that there may be some confusion when it comes to using both internal and external IP addresses within the Ansible inventory. Here is some clarification:
In Ansible, the
inventory_hostnamerepresents the hostname within your configuration. This value can be referenced within your Ansible playbooks and roles. On the other hand,ansible_hostis used to specify the IP address or domain name where Ansible should establish a connection to the remote host.When setting these values in the format
private_ip_address ansible_host=public_ip_address, Ansible will:Use the private_ip_address internally within its playbooks and roles (the IP addresses specified as inventory_hostname will be used by the cluster components for listening), and connect to the host via the public_ip_address.
Example:
This configuration is useful when the cluster components need to communicate over internal IP addresses, but Ansible commands need to be run over the public IP address.
thx, I just tested this proposal, and it did work fine without any further configuration needed !