Ask Your Question
0

Unable to start puppet agent

asked 2018-04-02 11:20:03 -0500

tourist gravatar image

I'm trying to setup puppet on a server running debian 9.

I've installed puppet master and puppetserver

when I try to invoke puppet agent --test, I'm getting the following error.

 admin@puppet:~$ puppet agent -t
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Failed to open TCP connection to puppet:8140 (Connection refused - connect(2) for "puppet" port 8140)
Info: Retrieving pluginfacts
Error: /File[/home/admin/.puppetlabs/opt/puppet/cache/facts.d]: Failed to generate additional resources using 'eval_generate': Failed to open TCP connection to puppet:8140 (Connection refused - connect(2) for "puppet" port 8140)
Error: /File[/home/admin/.puppetlabs/opt/puppet/cache/facts.d]: Could not evaluate: Could not retrieve file metadata for puppet:///pluginfacts: Failed to open TCP connection to puppet:8140 (Connection refused - connect(2) for "puppet" port 8140)
Info: Retrieving plugin
Error: /File[/home/admin/.puppetlabs/opt/puppet/cache/lib]: Failed to generate additional resources using 'eval_generate': Failed to open TCP connection to puppet:8140 (Connection refused - connect(2) for "puppet" port 8140)
Error: /File[/home/admin/.puppetlabs/opt/puppet/cache/lib]: Could not evaluate: Could not retrieve file metadata for puppet:///plugins: Failed to open TCP connection to puppet:8140 (Connection refused - connect(2) for "puppet" port 8140)
Error: Could not retrieve catalog from remote server: Failed to open TCP connection to puppet:8140 (Connection refused - connect(2) for "puppet" port 8140)
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Error: Could not send report: Failed to open TCP connection to puppet:8140 (Connection refused - connect(2) for "puppet" port 8140)

Also, I've got SSL certificate for my fqdn for my pupper server. when I do puppet cert -all I can see the certificate but when I do puppet cert list I can't see that certificate. Am I missing something here?

edit retag flag offensive close merge delete

Comments

Looks like puppetserver isn't actually running (connection refused on port 8140). How did you install everything? Also, you should be running that as root: `sudo puppet agent -t`

natemccurdy gravatar imagenatemccurdy ( 2018-04-03 12:23:49 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-04-03 17:28:11 -0500

ffalor gravatar image

updated 2018-04-03 17:33:23 -0500

Has it worked in the past? If this is a new install then it looks like your puppetserver is refusing the traffic on that port. Open the port on your server. If this is a lab that won't be interacting with your real environment you can just disable the firewall service.

I think this opens up the port on CentOS..

iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 8140 -j ACCEPT

As far as your second question. puppet cert list -all shows all certs even ones already signed. Puppet cert list only shows certs that are not signed. I am confused by your comment. Are you saying your agent already has a cert signed? If that is the case then you may be having the same problem I have. Whenever i startup my puppet master in my lab environment I will get the connect refused error for a few minutes then it goes away once the server has been up and running for a bit. Maybe it takes awhile for everything to start? I know my lab vm has like 1gb of ram so it is to be expected.

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

2 followers

Stats

Asked: 2018-04-02 11:20:03 -0500

Seen: 187 times

Last updated: Apr 03