Ask Your Question

Problem in connecting puppet client to server

asked 2014-03-04 05:00:01 -0600

puppetlearners gravatar image

updated 2014-03-04 05:03:10 -0600

Hi, We are new to puppet and we tried the LearningPuppet VM offered by puppetlabs. When we tried to connect, we got the error:

Failed to submit replace facts command for agent1.localdomain to PuppetDB at learn.localdomain:8081 Conection refused.

We tried updating the port number in puppetdb.config file to 8140, but since then getting the new error:

Error: Failed to apply catalog: Connection refused - connect(2) Error: Could not send report: Connection refused - connect(2)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-03-04 15:55:09 -0600

Stefan gravatar image

you are mixing the puppet master application with PuppetDB. The Puppet master listens on port 8140 and your agents will connect to this port when you do a puppet agent run. The PuppetDB is a seperate (and optional) application that your puppet master can use to store facts, resources and reports for later query. PuppetDB listens on port 8081 by default and the puppet master will connect to this port to submit facts, catalogs and reports. If you run a master<->agent setup (and not use puppet apply) this port does not have to be exposed to your agents. The ... (more)

edit flag offensive delete link more

answered 2014-03-04 22:57:18 -0600

puppetlearners gravatar image

updated 2014-03-05 13:44:06 -0600

Stefan gravatar image

Thank you very much for your reply...

We use puppet agent command When we run the command puppet resource service puppetdb ensure=running, we get the error:

Error: Could not start Service[puppetdb]: Execution of '/sbin/service puppetdb start' returned 1:
Error: /Service[puppetdb]/ensure: change from stopped to running failed: Could not start Service[puppetdb]: Execution of '/sbin/service puppetdb start' returned                     1:
service { 'puppetdb':
  ensure => 'stopped',

Also, firewall is stopped.

The config files are:


        terminus: puppetdb
        cache: yaml


port = 8081
server = learn.localdomain


    certname = learn.localdomain
    dns_alt_names ...
edit flag offensive delete link more


looks like puppetdb isn't running and is unable to start. What happens when you run `service puppetdb start` from the commandline? Do you see any messages in `/var/log/pe-puppetdb/pe-puppetdb.log` or `/var/log/puppetdb/puppetdb.log`

Stefan gravatar imageStefan ( 2014-03-05 13:47:59 -0600 )edit

Your Answer

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

Add Answer

Question Tools


Asked: 2014-03-04 05:00:01 -0600

Seen: 6,489 times

Last updated: Mar 05 '14