Icinga client stuck in pending

For now i just have one client and one master on linux/debian 9 machines. I am trying to add the client to infrastructure . When i go to view my hosts on the icinga web it shows my client is “PENDING” under Service Problems. If i go to Host Problems tab it says my client is down ( it is not). My client has the correct trustedcert and it has a valid client cert and I have confirmed that it is not ‘self-signed’ using the openssl command.

Icinga2 feature list (master) – Enabled Features: api checker ido-mysql mainlog
Icigna2 feature list (client) – api checker mainlog notification

icinga2 daemon -C on both machines does not show any errors and on my master its shows that I have two ‘Hosts’ , ‘Zones’ and ‘Endpoints’.
In /var/log/icinga2/icinga2.log i see some messages that i believe may be helpful . They are : "Check command for object ‘icingaClientHostname’ (PID 32423, arguments: ‘/usr/lib/nagios/plugins/check_ping’ ‘-H’ ‘127.0.0.1’ ‘-c’ ‘5000,100%’ ‘-w’ ‘3000,80%’) terminated with code 128, output: <Terminated by signal 9 (Killed). >’

Any help would be appreciated and I can provide more details if needed .

Do you use the director?

No I didn’t use the director.

ok, whats the content of /etc/icinga2/zones.conf on the client and how is the Endpoint object on the master configured (again /etc/icinga2/zones.conf)?

Client zone.conf
object Endpoint “master.hostname.com” {
host = “master.hostname.com
port = “5665”
}
object Zone “master” {
endpoints = [ “master.hostname.com” ]
}

Master zones.conf

object Endpoint "master.hostname.com" {
}
object Zone "master" {
              endpoints = [ "master.hostname.com"]
}

On the client is also an Endpoint and a Zone object for the client itself? Should look like

object Endpoint "client.tld" {
}
object Zone "client.tld" {
  parent = "master"
}

Also, pls keep in mind, the names MUST match the name you gave while creating certificates.

The way I am configuring my setup I have the zones, hosts and endpoint configurations specified on the master machine for each client under the repository.d directory. So under /etc/icinga2/repository.d/“clienthostname”.conf i have defined the host as such:
object Zone “clienthostname” {
endpoints = [ “clienthostname” ]
parent = “master”
}

I have also confirmed that the client certs have the correct names/spellings

The thing is, the “infrastructure layer” has to be configured on the machines before you can use them together.
You can NOT define zones and endpoints on the master and deploy them to the clients.

Zone and endpoint objects can only be defined in zones.conf since V2.11.

I am using a much earlier version of icinga so this way of configuration is valid.

So do you mean that before i can define them in the master I need to edit my clients zone.conf to how you suggested in your earlier comment?

You need to define them on the master, so it knows that there is an agent and you need to define them on the agent so it know to whom it should listen

I will try your suggestion later today. So once I define the zones how you mentioned on the client and master will I be able to go back to the way I am currently set up? Meaning the hosts/zone/endpoint definitions on my master.

no, this part of the configuration is permanent