CMK version: 2.1.0p15
OS version: Oracle Linux Server release 7.9 / Oracle Linux Server release 6.10
Error message:
%pre(check-mk-agent-2.1.0p15-1.51bc5c5152ef00d0.noarch) scriptlet failed, exit status 127
I updated our CMK instances from 2.1.0p13 → p15. I ran the bakery with signing nd let AU do its job (as usual).
But all Oracle Linux servers got the same problem: The first call of the time based updater fails. If I execute it again, the update is applied. It seems, the first time try to update the agent fails this time.
Affects only Oracle Linux hosts. The ubuntu/windows hosts updated without any issue.
Want to leave it here for further checks…?
2022-11-02 09:36:30,264 DEBUG: Starting Checkmk Agent Updater v2.1.0p13
2022-11-02 09:36:30,265 DEBUG: Successfully read /etc/cmk-update-agent.state.
2022-11-02 09:36:30,265 DEBUG: Successfully read /etc/check_mk/cmk-update-agent.cfg.
2022-11-02 09:36:30,267 INFO: Starting Update mode as plugin.
2022-11-02 09:36:30,267 INFO: Getting target agent configuration for host 'myhost' from deployment server
2022-11-02 09:36:30,383 DEBUG: Fetching content (using requests): http://1.2.3.4/km/check_mk/deploy_agent.py
2022-11-02 09:36:30,564 DEBUG: Response from agent bakery:
{'result_code': 0, 'result': {'update_url': 'http://1.2.3.4/km/check_mk/', 'AgentAvailable': True, 'TargetHash': '51bc5c5152ef00d0', 'Signatures': [xxx]}, 'severity': 'success'}
2022-11-02 09:36:30,565 DEBUG: Successfully read /etc/cmk-update-agent.state.
2022-11-02 09:36:30,569 DEBUG: Saved deployment status to /etc/cmk-update-agent.state.
2022-11-02 09:36:30,570 DEBUG: Successfully read /etc/cmk-update-agent.state.
2022-11-02 09:36:30,572 DEBUG: Saved deployment status to /etc/cmk-update-agent.state.
2022-11-02 09:36:30,572 INFO: Target state (from deployment server):
2022-11-02 09:36:30,573 INFO: Agent Available: True
2022-11-02 09:36:30,573 INFO: Signatures: 1
2022-11-02 09:36:30,573 INFO: Target Hash: 51bc5c5152ef00d0
2022-11-02 09:36:30,719 DEBUG: Fetching content (using requests): http://1.2.3.4/km/check_mk/deploy_agent.py
2022-11-02 09:36:34,881 DEBUG: Response from agent bakery:
{'result_code': 0, 'result': {'agent': '7avu2wMAAA...lktIcOAQ=='}, 'severity': 'success'}
2022-11-02 09:36:35,536 INFO: Downloaded agent has size 17745451 bytes.
2022-11-02 09:36:35,565 INFO: Signature check OK.
2022-11-02 09:36:35,576 INFO: Invoking package manager: rpm -vU --oldpackage --replacepkgs /tmp/check-mk-agent-tnbelpuc
2022-11-02 09:36:36,218 INFO: Output from rpm:
Preparing packages...
error: %pre(check-mk-agent-2.1.0p15-1.51bc5c5152ef00d0.noarch) scriptlet failed, exit status 127
error: check-mk-agent-2.1.0p15-1.51bc5c5152ef00d0.noarch: install failed
error: check-mk-agent-2.1.0p13-1.4999daaa77137405.noarch: erase skipped
2022-11-02 09:36:36,219 DEBUG: Caught Exception:
Traceback (most recent call last):
File "cmk_update_agent.py", line 1742, in _perform_installation
File "cmk_update_agent.py", line 1767, in _invoke_installer
File "cmk_update_agent.py", line 1783, in _install_agent_linux_rpm
File "cmk_update_agent.py", line 1876, in _invoke_unix_pkg_manager
Exception: Error during installation of package
2022-11-02 09:36:36,220 ERROR: Failed installing Checkmk agent: Error during installation of package.
2022-11-02 09:36:36,221 INFO: Hint: You can try to install or analyze the agent package manually by downloading it from the checkmk server. You can find it by looking for your OS's package for host myhost with agent hash 51bc5c5152ef00d0 at the agent bakery.
2022-11-02 09:36:36,228 DEBUG: Successfully read /etc/cmk-update-agent.state.
2022-11-02 09:36:36,231 DEBUG: Saved deployment status to /etc/cmk-update-agent.state.
2022-11-02 09:36:36,231 DEBUG: Caught Exception:
Traceback (most recent call last):
File "cmk_update_agent.py", line 1347, in _do_update_as_plugin
File "cmk_update_agent.py", line 1419, in _do_update_agent
File "cmk_update_agent.py", line 1659, in _trigger_installation
File "cmk_update_agent.py", line 1726, in install_agent
File "cmk_update_agent.py", line 1742, in _perform_installation
File "cmk_update_agent.py", line 1767, in _invoke_installer
File "cmk_update_agent.py", line 1783, in _install_agent_linux_rpm
File "cmk_update_agent.py", line 1876, in _invoke_unix_pkg_manager
Exception: Error during installation of package
2022-11-02 09:36:36,241 DEBUG: Writing agent section to stdout:
<<<check_mk>>>
AgentUpdate: last_check 1667378190.5698864 last_update 1666709768.5841646 aghash 4999daaa77137405 pending_hash None update_url http://1.2.3.4/km/check_mk error Error during installation of package
2022-11-02 09:36:36,241 DEBUG: Sending new state data to agent bakery
2022-11-02 09:36:36,397 DEBUG: Fetching content (using requests): http://1.2.3.4/km/check_mk/deploy_agent.py
2022-11-02 09:36:36,629 DEBUG: Response from agent bakery:
{'result_code': 0, 'result': {'update_url': 'http://1.2.3.4/km/check_mk/', 'AgentAvailable': True, 'TargetHash': '51bc5c5152ef00d0', 'Signatures': [xxx]}, 'severity': 'success'}
2022-11-02 09:36:36,630 DEBUG: Done.