-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Agent install fails at "Timeout when waiting for 127.0.0.1:6556" #659
Labels
bug
Something isn't working
Comments
It seems that the following tasks use the - name: "{{ ansible_system }}: Register Agent for automatic Updates using User Password."
become: true
ansible.builtin.shell: |
cmk-update-agent register -H {{ checkmk_agent_host_name }} \
-s {{ checkmk_agent_registration_server }} -i {{ checkmk_agent_registration_site }} -p {{ checkmk_agent_registration_server_protocol }} \
-U {{ checkmk_agent_user }} -P {{ __checkmk_agent_auth }}
no_log: "{{ checkmk_agent_no_log | bool }}"
register: __checkmk_agent_update_state
when: |
checkmk_agent_edition | lower != "cre"
and __checkmk_agent_updater_binary.stat.exists | bool
and checkmk_agent_update | bool
and (checkmk_agent_pass is defined and checkmk_agent_pass | length)
and (checkmk_agent_secret is not defined)
and not ((checkmk_agent_registration_server + '/' + checkmk_agent_registration_site in __checkmk_agent_updater_state.stdout)
and ('"error": null' in __checkmk_agent_updater_state.stdout) )
changed_when: "'Successfully registered agent of host' in __checkmk_agent_update_state.stderr"
- name: "{{ ansible_system }}: Register Agent for automatic Updates using Automation Secret."
become: true
ansible.builtin.shell: |
cmk-update-agent register -H {{ checkmk_agent_host_name }} \
-s {{ checkmk_agent_registration_server }} -i {{ checkmk_agent_registration_site }} -p {{ checkmk_agent_registration_server_protocol }} \
-U {{ checkmk_agent_user }} -S {{ __checkmk_agent_auth }}
no_log: "{{ checkmk_agent_no_log | bool }}"
register: __checkmk_agent_update_state
when: |
checkmk_agent_edition | lower != "cre"
and __checkmk_agent_updater_binary.stat.exists | bool
and checkmk_agent_update | bool
and (checkmk_agent_secret is defined and checkmk_agent_secret | length)
and not ((checkmk_agent_registration_server + '/' + checkmk_agent_registration_site in __checkmk_agent_updater_state.stdout)
and ('"error": null' in __checkmk_agent_updater_state.stdout) )
changed_when: "'Successfully registered agent of host' in __checkmk_agent_update_state.stderr"
- name: "{{ ansible_system }}: Register Agent for TLS."
become: true
ansible.builtin.shell: |
cmk-agent-ctl register -H {{ checkmk_agent_host_name }} \
-s {{ checkmk_agent_registration_server }} -i {{ checkmk_agent_registration_site }} \
-U {{ checkmk_agent_user }} -P {{ __checkmk_agent_auth }} --trust-cert
no_log: "{{ checkmk_agent_no_log | bool }}"
register: __checkmk_agent_tls_state
when: |
__checkmk_agent_controller_binary.stat.exists | bool
and checkmk_agent_tls | bool
and (__checkmk_agent_auth is defined and __checkmk_agent_auth | length)
and not checkmk_agent_registration_server + '/' + checkmk_agent_registration_site in __checkmk_agent_registered_connections.stdout
changed_when: "'Registration complete' in __checkmk_agent_tls_state.stdout" So for the Raw Edition the following variable needs to be set to checkmk_agent_tls: 'true' This does also set the Everything is now working as expected (maybe do not run the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Verify first that your issue is not already reported here.
Where possible also test if the latest release and main branch are affected too.
Complete all sections as described!
Describe the bug
When trying to install the agent to a Ubuntu Server 24.04 LTS it fails at the task
checkmk.general.agent : Linux: Verify Checkmk Agent Port is open.
This is my playbook:
This is my variable file (with password removed of course). Everything is accessible locally.
Fails with following error
When using the following command on the host everything works fine. cmk-agent-ctl is successfully installed with Ansible, but does not connect to the remote server.
sudo cmk-agent-ctl register --hostname LAB-VPS-01 \ --server 10.0.10.110:8000 --site cmk \ --user agent_registration --password '<REDACTED>' --trust-cert
Component Name
Component Name: checkmk.general.agent
Ansible Version
Checkmk Version and Edition
2.3.0p15 (CRE)
Collection Version
To Reproduce
Steps to reproduce the behavior:
ansible-playbook setup_vps.yml -i inventory/default.yml -K -vvv
checkmk.general.agent : Linux: Verify Checkmk Agent Port is open.
Expected behavior
The cmk-agent service should start before the opening of the port is checked
Actual behavior
Task does fail because the agent doesn't start
Additional context
The hosts are already added to the CMK Dashboard (applied the changes).
When manually adding the cmk-agent to the hosts everything is working as expected.
checkmk.hoebergen.net
is available from within my network and goes to Traefik that forwards the request to the checkmk docker container on port 500010.0.10.110:8000
directly goes to the checkmk server (skips Traefik)The text was updated successfully, but these errors were encountered: