Unexpected certificate common name : New issue deploying linux agent while deploying satellite

This sounds like as if the Zone/Endpoint configuration is not done inside the local /etc/icinga2/zones.conf on the master but inside the Director’s infrastructure tab. This likely is the root cause for the problems experienced, and I strongly advise against using anything else than the zones.conf on the master for direct Zone relationships.

The troubleshooting docs hold some details for the cluster & Zones since 2.11.

Cheers,
Michael

1 Like

Why is Zone/Endpoint in Director if it is not usable?

Should I copy my zones.conf from director as shown below to /etc/icinga2/zones.conf
Am I at risk of breaking anything else?

zoneconfig

My icinga2 agent on the satellite now won’t run after changing the zone config.

/var/log/icinga2# service icinga2 status
● icinga2.service - Icinga host/service/network monitoring system
   Loaded: loaded (/lib/systemd/system/icinga2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2020-02-20 14:02:22 UTC; 1s ago
  Process: 13249 ExecStart=/usr/sbin/icinga2 daemon -e ${ICINGA2_ERROR_LOG} (code=exited, status=1/FAILURE)
  Process: 13159 ExecStartPre=/usr/lib/icinga2/prepare-dirs /usr/lib/icinga2/icinga2 (code=exited, status=0/SUCCESS)
 Main PID: 13249 (code=exited, status=1/FAILURE)

Feb 20 14:02:22 cyllene2 icinga2[13249]: [2020-02-20 14:02:22 +0000] information/cli: Icinga application loader (version: r2.8.1-1)
Feb 20 14:02:22 cyllene2 icinga2[13249]: [2020-02-20 14:02:22 +0000] information/cli: Loading configuration file(s).
Feb 20 14:02:22 cyllene2 icinga2[13249]: [2020-02-20 14:02:22 +0000] critical/config: Error: Object 'cyllene2.fqdn.com' of type 'Host' re-defined: in /var/lib/icinga2/api/zones/cyllene2.fqdn Feb 20 14:02:22 cyllene2 icinga2[13249]: Location: in /var/lib/icinga2/api/zones/cyllene2.fqdn.com/director/hosts.conf: 1:0-1:39
Feb 20 14:02:22 cyllene2 icinga2[13249]: /var/lib/icinga2/api/zones/cyllene2.fqdn.com/director/hosts.conf(1): object Host "cyllene2.fqdn.com" {
Feb 20 14:02:22 cyllene2 icinga2[13249]:                                                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 20 14:02:22 cyllene2 icinga2[13249]: /var/lib/icinga2/api/zones/cyllene2.fqdn.com/director/hosts.conf(2):     import "dummy"
Feb 20 14:02:22 cyllene2 icinga2[13249]: /var/lib/icinga2/api/zones/cyllene2.fqdn.com/director/hosts.conf(3):
Feb 20 14:02:22 cyllene2 systemd[1]: icinga2.service: Main process exited, code=exited, status=1/FAILURE
Feb 20 14:02:22 cyllene2 systemd[1]: icinga2.service: Failed with result 'exit-code'.

I removed the agent and from the server and also director, it still won’t work…
I can’t install an agent now. :cry:

now those satellites that did work, don’t work, this is just getting worse and worse.

What exactly have you done now?

The zones.conf needs both the Endpoint and Zone objects.

Please don’t take this as an offense, but I think you should read the docs about Distributed Monitoring (Satellites, Zones, Endpoints) again.

They describe how the concept of zones and endpoints work.

I would also suggest “hard-coding” the endpoints and zones in config files (using the node wizard for example) instead of the Director.
But I can’t pinpoint it to a specific reason for you. It’s just how I learned to do it.

1 Like

I believe I’ve managed to get it working. Trouble is, I’m not sure what I’ve done differently.
I certainly suspect we were on the right track above, however there was also an issue with the test targets used is Host Templates which contained the Master server rather than Satellite server too.