Ask Your Question
0

Problem in connecting puppet client to server

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

puppetlearners gravatar image

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

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
0

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

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
0

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

puppetlearners gravatar image

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

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:

routes.yaml:

master:
      facts:
        terminus: puppetdb
        cache: yaml

puppetdb.conf:

port = 8081
server = learn.localdomain
soft_write_failure=false

puppet.conf:

[main]
    certname = learn.localdomain
    dns_alt_names ...
(more)
edit flag offensive delete link more

Comments

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 -0500 )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

Stats

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

Seen: 5,993 times

Last updated: Mar 05 '14