I can confirm that the error still exists in 2.1p14.
We updated from 1.6p29 to 2.0pX to 2.1p14.
Tbh I don’t know if the Dynamic host management worked in 2.0 release, because we did not test it.
The only log entry I can find regarding this issue is the apache/access.log.
I dont have an idea how I can check all the *.mk files by hand if I dont know for what I need to look?
Next question I have is, is this 500 error related to the errors regarding the tag “type_of_network_switche”?
Thanks for the help.
EDIT:
In the dcd.log.1 I find the output from UI.
2022-11-03 12:56:58,126 [40] [cmk.dcd.aulc_dynamic_esxi] Error during sync: 500 Server Error: INTERNAL SERVER ERROR for url: http://localhost:5000/SITENAME/check_mk/api/1.0/domain-types/host_config/collections/all
2022-11-03 12:56:58,126 [40] [cmk.dcd.aulc_dynamic_esxi] Trace:
Traceback (most recent call last):
File "/omd/sites/SITENAME/lib/python3/cmk/cee/dcd/connectors/utils.py", line 173, in execute
self._execute_sync()
File "/omd/sites/SITENAME/lib/python3/cmk/cee/dcd/connectors/utils.py", line 227, in _execute_sync
self._execute_phase2(phase1_result)
File "/omd/sites/SITENAME/lib/python3/cmk/cee/dcd/connectors/piggyback.py", line 229, in _execute_phase2
cmk_hosts = self._web_api.get_all_hosts()
File "/omd/sites/SITENAME/lib/python3/cmk/cee/dcd/web_api.py", line 225, in get_all_hosts
resp.raise_for_status()
File "/omd/sites/SITENAME/lib/python3.9/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: INTERNAL SERVER ERROR for url: http://localhost:5000/SITENAME/check_mk/api/1.0/domain-types/host_config/collections/all
Not much to add here except that I’m having the exact same issue. Issue started right after updating from 2.0 to 2.1. Was working great on 2.0. Currently running 2.1.0p14 (enterprise edition).
edit:
We’re using DCD in combination with the AWS special agent to fetch our EC2 instance status.
15:15:14 ERROR An exception occured
Traceback (most recent call last):
File "/omd/sites/icinga/lib/python3/cmk/cee/dcd/connectors/piggyback.py", line 229, in _execute_phase2
cmk_hosts = self._web_api.get_all_hosts()
File "/omd/sites/icinga/lib/python3/cmk/cee/dcd/web_api.py", line 225, in get_all_hosts
resp.raise_for_status()
File "/omd/sites/icinga/lib/python3.9/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: INTERNAL SERVER ERROR for url: http://localhost:5000/icinga/check_mk/api/1.0/domain-types/host_config/collections/all
two things which could help us to narrow down the issue:
Can you go to ~/etc/check_mk/conf.d/wato/ and grep for the value “Switche”? I’m curious how many hosts are using this attribute. Btw. Is this a custom tag?
Pleae run on the master site cmk-update-config -vv
If dcd is still failing, we need to get the API endpoint working. Maybe you can share the hosts.mk where this attribute is used?
I grepped for “Switch” and “Switche” in the location you specified. There are a few hits, but not in the folder that holds the hosts where we use DCD for. So I don’t think our issue is related to a switch attribute.
We use the AWS special agent with piggyback data to get our EC2 instances in CheckMK. With DCD we prefix the hostsname so we know their function by looking at the name.
The hosts names contain information like IP-address and AWS region that I’d rather not share here publicly.
Is it possible to share the hosts.mk with you privately?
No, we have 5 Satellites and 1 Primary Server. All sites are online and Distributed Monitoring works fine.
Not sure if it is related to this issue. When we logged in to our primary site via UI, we didn’t need to login to the other satellites manually. Since the update from 1.6. over 2.0 to 2.1 we need to login on every site.
We use LDAP for login.
We got it.
It would be helpful to know where to search for the URL: We finally found the URLs with the hosts which has used a non existing tag. When we solved the “Switch” tag issue, we got a further one with a non existing tag.
Afaik, the werk talks about fixing the tag in the tag UI and not here. If you enable the DCD debugging (raise log_level to debug) from the global setting, the there is still a chance to see the exact error message or you can access the URL directlly to see what is the actual problem. Normally it appears in the Json response from the Url.
If all good at your end, then I will recommend to mark this as solved so that others can also benefit from this.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.