In Icinga2 2.5.4 cluster with 2 nodes. The master node is working fine. Somehow on the secondary master, the icinga2 process won’t start. It reports error about “generic-host” definition unknown which it should read from “templates.conf”
On secondary someone deleted all content under /var/lib/icinga2/api directory. AFAIK, the directory gets sync’d with the master. So in current situation, do I need to manually copy the contents from master - /var/lib/icinga2/api on secondary so it will be able to start ?
That’s quite old and may have bugs, I’d recommend planning an upgrade.
Can you share where the templates.conf file is located? This must be synced e.g. via the global-templates zone in order being available on all endpoints.
Ok I copied over the “global templates” and removed the .authorize file and I could able to start Icinga2 on the secondary node. However it doesn’t have the downtimes and comments sync’d. So when it took over the active endpoint, lots of alerts which should be in the downtime appeared on the web ui. Is there a way to sync the downtimes and comments ? just copy from the master would work if there is no way to sync them?
The downtimes/comments for those hosts should on the satellites. Is that right? If that’s correct, then the downtimes/comments should be sync’d on the secondary master yes?
Ok looks like Per debug log, the secondary master is discarding updates from all satellites.
warning/ApiListener: Discarding 'config update object' message from
Any idea what could be the problem with that ?
Thanks
It is expected it seems as per
/* discard messages if the sender is in a child zone */
if (!Zone::GetLocalZone()->IsChildOf(endpoint->GetZone())) {
Log(LogWarning, "ApiListener")
<< "Discarding 'config update object' message from '"
<< origin->FromClient->GetIdentity() << "'.";
return Empty;
}
Ok I realized that the secondary node is trying to sync up with the master which should include downtimes/comments etc. I see it is doing that but Icinga2 on the master would crash with “segfault”. This is causing the secondary not getting sync’d up.
icinga2[7478]: segfault at 28 ip 00002b546bc85e42 sp 00002b5578600c20 error 4 in libbase.so[2b546bb38000+1df000]