Ask Your Question
0

unable to establish connection between agent and master.

asked 2014-10-23 23:59:02 -0600

jimsonpai gravatar image

I know this question has been asked before in many different variant. I read all the post related to the problem but I cannot get agent and master talking to each other. I boot up 2 vm via vmwork station both running on linuxmint 17.

I'll start this thread by telling what's my /etc/hosts and /etc/hostname in client and puppetmaster looks like.

In my client's vm my host name in /etc/hostname looks like the following:

puppetclient

my client's vm hosts in /etc/hosts looks like the following:

127.0.0.1 localhost
127.0.1.1 puppetclient
192.168.75.143 puppetmaster

In my master's vm /etc/hostname looks like the following:

puppetmaster

My master's vm /etc/hosts looks like the following:

127.0.0.1 localhost
127.0.1.1 puppetmaster
192.168.75.144 puppetclient

My /etc/puppet/puppet.conf in my master looks like the following:

[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
templatedir=$confdir/templates
prerun_command=/etc/puppet/etckeeper-commit-pre
postrun_command=/etc/puppet/etckeeper-commit-post

[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY

my /etc/puppet/puppet.conf in my client looks like the following:

[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
templatedir=$confdir/templates
prerun_command=/etc/puppet/etckeeper-commit-pre
postrun_command=/etc/puppet/etckeeper-commit-post

[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY

[agent]
server=puppetmaster

I have many variant of puppet.conf during my search and I don't feel like posting here. One of the variant is to have server=puppetmasterin [main] in both my client and master's vm. Anyways, for all the puppet.conf variants i tried, my first error when I run sudo puppet agent --test is always warning: unable to fetch my node definitoin, but agent run will continue:the error after that is different for each variant of puppet.conf I implement. Can anyone tell me the right configuration for my setup?

Thanks

edit retag flag offensive close merge delete

Comments

Which version of Puppet is on the master, and which version on the client?

domcleal gravatar imagedomcleal ( 2014-10-24 02:59:32 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-10-24 14:31:45 -0600

bytwocoffee gravatar image

Are you able to ping puppetmaster from the agent? It seems you just need to add an entry for puppetmaster to /etc/hosts in the agent host.

edit flag offensive delete link more
0

answered 2014-10-24 08:07:14 -0600

vmule gravatar image

Hello, what's the content of the file:

/etc/puppet/manifests/site.pp ?

This is not a name resolution problem, but the puppet master does not know what do to with the node because you didn't declare in the site.pp which class(es) will be applied to the node(s).

Take a look on this document:

https://docs.puppetlabs.com/puppet/la...nodedefinitions.html

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-10-23 23:59:02 -0600

Seen: 272 times

Last updated: Oct 24 '14