Hello everyone,
I have a client setup problem (Client could not connect to Master) after Icinga2 Node Wizard has been run on the client
The following configuration is available: Master - Master Setup
Master 1
Icinga2 Version 2.10.4
Icingaweb 2.6.3
Icinga Director Master
IP 10.0.0.1
RedHat Enterprise 7
Firewall disabled - SELinux disabled
Master 2
Icinga2 Version 2.10.4
Icingaweb 2.6.3
The Icinga Director is only running on Master 1
IP 10.0.0.2
RedHat Enterprise 7
Firewall disabled - SELinux disabled
Zones.cfg Master 1
/*
* Generated by Icinga 2 node setup commands
* on 2019-04-13 18:17:26 +0200
*/
object Endpoint "master1.test.net" {
}
object Endpoint "master2.test.net" {
host = "10.0.0.2"
}
object Zone "master" {
endpoints = [ "master1.test.net", "master2.test.net" ]
}
object Zone "global-templates" {
global = true
}
object Zone "director-global" {
global = true
}
Zones.cfg Master 2
/*
* Generated by Icinga 2 node setup commands
* on 2019-04-13 18:22:13 +0200
*/
object Endpoint "master2.test.net" {
}
object Endpoint "master1.test.net" {
host = "10.0.0.1"
}
object Zone "master" {
endpoints = [ "master1.test.net", "master2.test.net" ]
}
object Zone "global-templates" {
global = true
}
object Zone "director-global" {
global = true
}
When you run the Icinga2 Node Wizard, enter:
icinga2 feature list
Disabled features: checker command compatlog elasticsearch gelf graphite influxdb livestatus mainlog notification opentsdb perfdata statusdata syslog
Enabled features: api debuglog
icinga2 node wizard
Welcome to the Icinga 2 Setup Wizard!
We will guide you through all required configuration details.
Please specify if this is a satellite/client setup ('n' installs a master setup) [Y/n]:
Starting the Client/Satellite setup routine...
Please specify the common name (CN) [mndemuclxr099.mn-man.biz]: client1.test.net
Please specify the parent endpoint(s) (master or satellite) where this node should connect to:
Master/Satellite Common Name (CN from your master/satellite node): master1.test.net
Do you want to establish a connection to the parent node from this node? [Y/n]:
Please specify the master/satellite connection information:
Master/Satellite endpoint host (IP address or FQDN): 10.0.0.1
Master/Satellite endpoint port [5665]: 5665
Add more master/satellite endpoints? [y/N]:
Parent certificate information:
Subject: CN = master1.test.net
Issuer: CN = Icinga CA
Valid From: Apr 13 16:17:18 2019 GMT
Valid Until: Apr 9 16:17:18 2034 GMT
Fingerprint: AE DD 48 28 EA EE 7B 8E 23 FE 22 0C D5 D7 A5 FC 8D 0E F0 FB
Is this information correct? [y/N]: y
Please specify the request ticket generated on your Icinga 2 master (optional).
(Hint: # icinga2 pki ticket --cn 'mndemuclxr099.mn-man.biz'):
No ticket was specified. Please approve the certificate signing request manually
on the master (see 'icinga2 ca list' and 'icinga2 ca sign --help' for details).
Please specify the API bind host/port (optional):
Bind Host []:
Bind Port []:
Accept config from parent node? [y/N]: y
Accept commands from parent node? [y/N]: y
Reconfiguring Icinga...
Local zone name [client1.test.net]:
Parent zone name [master]:
Default global zones: global-templates director-global
Do you want to specify additional global zones? [y/N]:
Do you want to disable the inclusion of the conf.d directory [Y/n]:
Disabling the inclusion of the conf.d directory...
Done.
Now restart your Icinga 2 daemon to finish the installation!
systemctl restart icinga2
Zones.cfg Client 1
/*
* Generated by Icinga 2 node setup commands
* on 2019-05-01 22:08:24 +0200
*/
object Endpoint "master1.test.net" {
host = "10.0.0.1"
port = "5665"
}
object Endpoint "master2.test.net" {
host = "10.0.0.2"
port = "5665"
}
object Zone "master" {
endpoints = [ "master1.test.net", "master2.test.net" ]
}
object Endpoint "client1.test.net" {
}
object Zone "client1.test.net" {
endpoints = [ "client1.test.net" ]
parent = "master"
}
object Zone "global-templates" {
global = true
}
object Zone "director-global" {
global = true
}
When running icinga2 daemon -C
icinga2 daemon -C
[2019-05-01 22:20:09 +0200] information/cli: Icinga application loader (version: r2.10.4-1)
[2019-05-01 22:20:09 +0200] information/cli: Loading configuration file(s).
[2019-05-01 22:20:09 +0200] information/ConfigItem: Committing config item(s).
[2019-05-01 22:20:09 +0200] information/ApiListener: My API identity: client1.test.net
[2019-05-01 22:20:09 +0200] information/ConfigItem: Instantiated 1 IcingaApplication.
[2019-05-01 22:20:09 +0200] information/ConfigItem: Instantiated 1 FileLogger.
[2019-05-01 22:20:09 +0200] information/ConfigItem: Instantiated 1 ApiListener.
[2019-05-01 22:20:09 +0200] information/ConfigItem: Instantiated 4 Zones.
[2019-05-01 22:20:09 +0200] information/ConfigItem: Instantiated 3 Endpoints.
[2019-05-01 22:20:09 +0200] information/ConfigItem: Instantiated 218 CheckCommands.
[2019-05-01 22:20:09 +0200] information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars'
[2019-05-01 22:20:09 +0200] information/cli: Finished validating the configuration file(s).
The result of icinga-diagnostics.sh
./icinga-diagnostics.sh
### Icinga 2 Diagnostics ###
# Version: 0.1.0
# Run on client1.test.net at Wed May 1 22:37:19 CEST 2019
Running as root
## OS ##
OS Version: Red Hat Enterprise Linux Server release 7.6 (Maipo)
Hypervisor: Running virtually on a vmware hypervisor
CPU cores: 2
RAM: 7.6G
### Top output ###
top - 22:37:19 up 13 days, 7:00, 1 user, load average: 0.18, 0.09, 0.07
Tasks: 156 total, 1 running, 155 sleeping, 0 stopped, 0 zombie
%Cpu(s): 2.5 us, 10.0 sy, 0.0 ni, 87.5 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 8009564 total, 5029836 free, 796352 used, 2183376 buff/cache
KiB Swap: 4194300 total, 4194300 free, 0 used. 6851448 avail Mem
SELinux: Permissive
Firewall: active
# Icinga 2 #
## Packages: ##
Icinga 2 Version : 2.10.4
Done checking packages. See Anomaly section if something odd was found.
Features:
Disabled features: checker command compatlog elasticsearch gelf graphite influxdb livestatus mainlog notification opentsdb perfdata statusdata syslog
Enabled features: api debuglog
Check intervals:
Used commands (numbers are relative to each other, not showing configured objects):
[2019-05-01 22:37:21 +0200] information/cli: Icinga application loader (version: r2.10.4-1)
[2019-05-01 22:37:21 +0200] information/cli: Loading configuration file(s).
[2019-05-01 22:37:22 +0200] information/ConfigItem: Committing config item(s).
[2019-05-01 22:37:22 +0200] information/ApiListener: My API identity: mndemuclxr099.mn-man.biz
[2019-05-01 22:37:22 +0200] information/ConfigItem: Instantiated 1 IcingaApplication.
[2019-05-01 22:37:22 +0200] information/ConfigItem: Instantiated 1 FileLogger.
[2019-05-01 22:37:22 +0200] information/ConfigItem: Instantiated 1 ApiListener.
[2019-05-01 22:37:22 +0200] information/ConfigItem: Instantiated 4 Zones.
[2019-05-01 22:37:22 +0200] information/ConfigItem: Instantiated 3 Endpoints.
[2019-05-01 22:37:22 +0200] information/ConfigItem: Instantiated 218 CheckCommands.
[2019-05-01 22:37:22 +0200] information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars'
[2019-05-01 22:37:22 +0200] information/cli: Finished validating the configuration file(s).
# Icinga Web 2 #
Icinga Web 2 is not installed
# Anomalies found #
* At least one php.ini file has no valid timezone setting
* NTP is not synchronized
Total count of detected anomalies: 2
The firewall daemon is running but all TCP and UDP ports are open.
firewall-cmd --zone = public --permanent --add-port = 0-65535 / tcp
firewall-cmd - reload
firewall-cmd --zone = public --permanent --add-port = 0-65535 / udp
firewall-cmd - reload
Maybe someone has a tip what goes wrong here, sometimes it works after the third reinstallation of Icinga2 and the 10 times Icinga2 Node Wizard sometimes but not at all. The error only occurs with checks that are executed via port 5665, such as check_load or check_disk …
Port 5665 is open on all servers, check_ping and hostalive are working. The Icinga2 client also runs on some systems, all are installed exactly the same and all have the same software installed.
It also does not work during setup (Icinga Node Wizard) on the client with the input of 2 master servers.