Install puppetDB on already deployed environment

304 views
Skip to first unread message

Vikas Kumar

unread,
Aug 18, 2014, 1:05:02 AM8/18/14
to puppet...@googlegroups.com
Hello everyone,

I have a puppetmaster v3.6.2-1 installed on Ubuntu 14.04 x86_64 server. I am using passenger (apache2) instead of Webrick.

root@puppet:~# /etc/init.d/puppetmaster status
 
* master is not running
root@puppet
:~#
root@puppet
:~# /etc/init.d/apache2 status
 
* apache2 is running
root@puppet
:~#


I am trying to install puppetdb via a module, but after installing the module I ran 'puppet agent -t' command and encountered below errors. 

root@puppet:~# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
...
...
Info: Caching catalog for puppet.test.com
Info: Applying configuration version '1408337383'
Notice: Unable to connect to puppetdb server (puppet.test.com:8081): Connection refused - connect(2)
Notice: Failed to connect to puppetdb; sleeping 2 seconds before retry
Notice: Unable to connect to puppetdb server (puppet.test.com:8081): Connection refused - connect(2)
Notice: Failed to connect to puppetdb; sleeping 2 seconds before retry
Notice: Unable to connect to puppetdb server (puppet.test.com:8081): Connection refused - connect(2)
Notice: Failed to connect to puppetdb; sleeping 2 seconds before retry
^CNotice: Caught INT; calling stop
root@puppet
:~#

I checked that port 8081 is not being used by any daemon.

root@puppet:~# netstat -an | grep 8081
root@puppet
:~# telnet 192.168.1.99 8081
Trying 192.168.1.99...
telnet
: Unable to connect to remote host: Connection refused
root@puppet
:~#

Please help me out to troubleshoot this.

Regards,
Vikas

Atom Powers

unread,
Aug 18, 2014, 1:09:26 AM8/18/14
to puppet...@googlegroups.com
Don't cancel it. It will eventually timeout or start working.
You may want to start puppetdb manually if it times-out; 'service puppetdb start'


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/0fb35b85-6b24-47d5-a8a3-c632c0869956%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Perfection is just a word I use occasionally with mustard.
--Atom Powers--

Vikas Kumar

unread,
Aug 18, 2014, 5:10:30 AM8/18/14
to puppet...@googlegroups.com
Hi Atom,

I tried that but its not working out. 

Below is the output of the command.
root@puppet:~# puppet agent --test

Info: Retrieving pluginfacts
Info: Retrieving plugin
...
...
Notice: Failed to connect to puppetdb within timeout window of 120 seconds; giving up.
Error: Unable to connect to puppetdb server! (puppet.test.com:8081)
Error: /Stage[main]/Puppetdb::Master::Config/Puppetdb_conn_validator[puppetdb_conn]/ensure: change from absent to present failed: Unable to connect to puppetdb server! (puppet.test.com:8081)
Notice: /Stage[main]/Puppetdb::Master::Storeconfigs/Ini_setting[puppet.conf/master/storeconfigs]: Dependency Puppetdb_conn_validator[puppetdb_conn] has failures: true
Warning: /Stage[main]/Puppetdb::Master::Storeconfigs/Ini_setting[puppet.conf/master/storeconfigs]: Skipping because of failed dependencies
Notice: /Stage[main]/Puppetdb::Master::Storeconfigs/Ini_setting[puppet.conf/master/storeconfigs_backend]: Dependency Puppetdb_conn_validator[puppetdb_conn] has failures: true
Warning: /Stage[main]/Puppetdb::Master::Storeconfigs/Ini_setting[puppet.conf/master/storeconfigs_backend]: Skipping because of failed dependencies
Notice: /Stage[main]/Puppetdb::Master::Routes/File[/etc/puppet/routes.yaml]: Dependency Puppetdb_conn_validator[puppetdb_conn] has failures: true
Warning: /Stage[main]/Puppetdb::Master::Routes/File[/etc/puppet/routes.yaml]: Skipping because of failed dependencies
Notice: /Stage[main]/Puppetdb::Master::Puppetdb_conf/Ini_setting[puppetdbport]: Dependency Puppetdb_conn_validator[puppetdb_conn] has failures: true
Warning: /Stage[main]/Puppetdb::Master::Puppetdb_conf/Ini_setting[puppetdbport]: Skipping because of failed dependencies
Notice: /Stage[main]/Puppetdb::Master::Puppetdb_conf/Ini_setting[soft_write_failure]: Dependency Puppetdb_conn_validator[puppetdb_conn] has failures: true
Warning: /Stage[main]/Puppetdb::Master::Puppetdb_conf/Ini_setting[soft_write_failure]: Skipping because of failed dependencies
Notice: /Stage[main]/Puppetdb::Master::Puppetdb_conf/Ini_setting[puppetdbserver]: Dependency Puppetdb_conn_validator[puppetdb_conn] has failures: true
Warning: /Stage[main]/Puppetdb::Master::Puppetdb_conf/Ini_setting[puppetdbserver]: Skipping because of failed dependencies
Notice: /Stage[main]/Puppetdb::Master::Config/Service[puppetmaster]: Dependency Puppetdb_conn_validator[puppetdb_conn] has failures: true
Warning: /Stage[main]/Puppetdb::Master::Config/Service[puppetmaster]: Skipping because of failed dependencies
Notice: Finished catalog run in 120.27 seconds
root@puppet
:~#


Also, I do not have puppetdb binary since I have used puppetdb module.

root@puppet:~# ls -lrth /etc/init.d/puppet*
-rwxr-xr-x 1 root root 1.7K Jun 10 07:07 /etc/init.d/puppetqd
-rwxr-xr-x 1 root root 3.8K Jun 10 07:07 /etc/init.d/puppetmaster
root@puppet
:~#

Any other suggestions to tackle this ?

Regards,
Vikas

Juan Sierra Pons

unread,
Aug 18, 2014, 5:42:25 AM8/18/14
to puppet...@googlegroups.com
Hi

Try removing (make a backup first just in case)
/etc/puppet/routes.yaml and /etc/puppet/puppetdb.conf and try again.

I had a similar problem time ago and starting from scratch fixed it

Best Regards
--------------------------------------------------------------------------------------
Juan Sierra Pons ju...@elsotanillo.net
Linux User Registered: #257202
Web: http://www.elsotanillo.net Git: http://www.github.com/juasiepo
GPG key = 0xA110F4FE
Key Fingerprint = DF53 7415 0936 244E 9B00 6E66 E934 3406 A110 F4FE
--------------------------------------------------------------------------------------

Vikas Kumar

unread,
Aug 18, 2014, 5:52:43 AM8/18/14
to puppet...@googlegroups.com
Hi Juan,

Thanks for your help but I don't have these files. May be because I am using modules instead of binaries.

Regards,
Vikas

Juan Sierra Pons

unread,
Aug 18, 2014, 6:40:22 AM8/18/14
to puppet...@googlegroups.com
Hi,

I am using puppetlabs-puppetdb module too.
Can you install puppetdb manually using your os package tool (apt/yum)?

Vikas Kumar

unread,
Aug 18, 2014, 7:41:05 AM8/18/14
to puppet...@googlegroups.com
Hi Juan,

Thanks a ton, it did the magic. I was under an impression that puppetdb forge module will install puppetdb too.

Now, puppet agent --test command is working fine. But, I need to ensure that is working as desired. I am new to puppetdb, will google out something or write a small class to confirm it is working fine. 

Regards,
Vikas

Juan Sierra Pons

unread,
Aug 18, 2014, 8:27:00 AM8/18/14
to puppet...@googlegroups.com
Hi,

Check again your config as puppetlabs-puppetdb should install the
binary and then configure it.

Best Regards

Vikas Kumar

unread,
Aug 18, 2014, 8:45:57 AM8/18/14
to puppet...@googlegroups.com
I just installed the puppetdbquery module from forge, and ran the below commands. I think I am good :)

root@puppet:~# puppet query nodes '(architecture=amd64)'
root@puppet:~#

root@puppet:~# curl -s 'http://puppet.test.com:8080/v3/nodes' | jq -r '.[].name'
root@puppet:~#

Regards,
Vikas

Flamarion Jorge

unread,
Aug 18, 2014, 5:35:05 PM8/18/14
to puppet...@googlegroups.com

Did you setup route.yml ?

Flamarion Jorge
Sent from my mobile

Vikas Kumar

unread,
Aug 18, 2014, 7:12:03 PM8/18/14
to puppet...@googlegroups.com
Thanks Flamarion for the reply, my issue is resolved now.

Regards,
Vikas
Reply all
Reply to author
Forward
0 new messages