Server hostname did not match server certificate
I installed Puppet Enterprise on two virtual machines (one master and one node). When I try to run my agent manually with puppet agent -t i get the error Server hostname '192.168....' did not match server certificate; expected one of host-192-168-.....localdomain. If i run this by adding --server host-192-168.....localdomain it works, but this way i can do this manually and after it's own runInterval it doesn't work so on my puppet console it says it is Unresponsive. I guess this is because on its own it gets the error i mentioned earlier so my master can't receive any reports from this node. Can someone please help me with this? How can i make so my node's agent is contacting the master with the proper server certificate name? Thank you in advance.