BROKEN PUPPETDB

830 views
Skip to first unread message

Virat

unread,
Jun 30, 2016, 9:52:45 PM6/30/16
to Puppet Users
Hello All,

I have configured opensource puppet master 4.5.2 & puppetdb 4.1.2. Then started connecting master and db servers as below.

puppet master
/etc/puppetlabs/puppet/puppet.conf
[master]
vardir = /opt/puppetlabs/server/data/puppetserver
logdir = /var/log/puppetlabs/puppetserver
rundir = /var/run/puppetlabs/puppetserver
pidfile = /var/run/puppetlabs/puppetserver/puppetserver.pid
codedir = /etc/puppetlabs/code
server = puppetmaster.com 
dns_alt_names = puppetmaster.com, puppetmaster
reports = store,puppetdb
storeconfigs_backend = puppetdb
storeconfigs = true
environment_timeout = unlimited

[main]
certname = puppetmaster.com
environment = production
runinterval = 1h
strict_variables = true
#pluginsync = true
#trusted

/etc/puppetlabs/puppet/puppetdb.conf
[main]

/etc/puppetlabs/puppet/routes.yaml
---
master:
  facts:
    terminus: puppetdb
    cache: yaml
/etc/puppetlabs/puppetdb/conf.d/jetty.ini
[jetty]
# IP address or hostname to listen for clear-text HTTP. To avoid resolution
# issues, IP addresses are recommended over hostnames.
# Default is `localhost`.
# host = <host>
host = puppetmaster ip

# Port to listen on for clear-text HTTP.
port = 8080

# The following are SSL specific settings. They can be configured
# automatically with the tool `puppetdb ssl-setup`, which is normally
# ran during package installation.

# IP address to listen on for HTTPS connections. Hostnames can also be used
# but are not recommended to avoid DNS resolution issues. To listen on all
# interfaces, use `0.0.0.0`.
ssl-host = 0.0.0.0

# The port to listen on for HTTPS connections
ssl-port = 8081

# Private key path
ssl-key = /etc/puppetlabs/puppetdb/ssl/private.pem

# Public certificate path
ssl-cert = /etc/puppetlabs/puppetdb/ssl/public.pem

# Certificate authority path
ssl-ca-cert = /etc/puppetlabs/puppetdb/ssl/ca.pem

# Access logging configuration path. To turn off access logging
# comment out the line with `access-log-config=...`
access-log-config = /etc/puppetlabs/puppetdb/request-logging.xml


ERROR on AGENT

 /opt/puppetlabs/bin/puppet agent --test
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Error 400 on SERVER: Could not retrieve facts for puppetagent.com: Failed to find facts from PuppetDB at puppetmaster.com:8140: Failed to execute '/pdb/query/v4/nodes/puppetagent.com/facts' on at least 1 of the following 'server_urls': https://:puppetdb.com:8081
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to execute '/pdb/cmd/v1?checksum=33498fqe6c08ba9b5of47o406cfba9ace2fd9e9&version=4&certname=puppetagent.com&command=replace_facts' on at least 1 of the following 'server_urls': https://puppetdb.com:8081
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run




Is there any wrong in configuration ? 


Thanks !

Wyatt Alt

unread,
Jun 30, 2016, 9:56:54 PM6/30/16
to puppet...@googlegroups.com, Virat
Virat,

Please describe what is going wrong with puppetdb. If there is an error
in the puppetdb log, share it in a gist.

Wyatt
> Is there any wrong in configuration ?
>
>
> Thanks !
>
> --
> 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
> <mailto:puppet-users...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/3ef56b7f-4195-4df5-bf75-d072d675b148%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/3ef56b7f-4195-4df5-bf75-d072d675b148%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Virat

unread,
Jun 30, 2016, 10:04:19 PM6/30/16
to Puppet Users
var/log/puppetlabs/puppetdb/puppetdb.log


2016-06-30 17:13:54,355 INFO  [o.e.j.s.Server] jetty-9.2.z-SNAPSHOT
2016-06-30 17:13:54,448 INFO  [o.e.j.s.h.ContextHandler] Started o.e.j.s.h.ContextHandler@1818e640{/metrics,null,AVAILABLE}
2016-06-30 17:13:54,448 INFO  [o.e.j.s.h.ContextHandler] Started o.e.j.s.h.ContextHandler@764fa2b{/pdb,null,AVAILABLE}
2016-06-30 17:13:54,476 INFO  [o.e.j.s.ServerConnector] Started ServerConnector@3190dd7d{HTTP/1.1}{localhost:8080}
2016-06-30 17:13:54,559 INFO  [o.e.j.s.ServerConnector] Started ServerConnector@ec72d9d{SSL-HTTP/1.1}{0.0.0.0:8081}
2016-06-30 17:13:54,559 INFO  [o.e.j.s.Server] Started @35894ms
2016-06-30 17:13:54,563 INFO  [p.t.s.s.status-service] Registering status callback function for status-service service
2016-06-30 17:13:54,563 INFO  [p.t.s.s.status-service] Registering status service HTTP API at /status
2016-06-30 17:13:54,579 INFO  [o.e.j.s.h.ContextHandler] Started o.e.j.s.h.ContextHandler@3117fc4a{/status,null,AVAILABLE}
2016-06-30 17:13:54,580 INFO  [p.p.dashboard] Redirecting / to the PuppetDB dashboard
2016-06-30 17:13:54,583 INFO  [o.e.j.s.h.ContextHandler] Started o.e.j.s.h.ContextHandler@22f9954d{/,null,AVAILABLE}
2016-06-30 17:13:54,599 INFO  [c.z.h.HikariDataSource] PDBWritePool - is starting.
2016-06-30 17:13:54,627 INFO  [c.z.h.HikariDataSource] PDBReadPool - is starting.
2016-06-30 17:13:54,630 INFO  [p.p.c.services] PuppetDB version 4.1.2
2016-06-30 17:13:54,631 INFO  [c.z.h.HikariDataSource] PDBMigrationsPool - is starting.
2016-06-30 17:13:54,781 ERROR [p.p.s.storage] ********************
*
* PostgreSQL DB versions older than 9.4 are no longer supported.  Please upgrade Postgres and restart PuppetDB.
*
********************
2016-06-30 17:13:54,856 INFO  [p.t.internal] Shutting down due to JVM shutdown hook.
2016-06-30 17:13:54,873 INFO  [p.t.internal] Beginning shutdown sequence
2016-06-30 17:14:25,081 INFO  [p.p.pdb-routing] HTTP request received while in maintenance mode
2016-06-30 17:14:35,223 INFO  [p.p.pdb-routing] HTTP request received while in maintenance mode
2016-06-30 17:14:35,239 WARN  [o.e.j.h.HttpParser] badMessage: java.lang.IllegalStateException: too much data after closed for HttpChannelOverHttp@2858fdef{r=1,c=false,a=IDLE,uri=-}
2016-06-30 17:14:35,525 INFO  [p.p.pdb-routing] HTTP request received while in maintenance mode
2016-06-30 17:26:03,970 INFO  [p.p.pdb-routing] HTTP request received while in maintenance mode
2016-06-30 17:26:14,264 INFO  [p.p.pdb-routing] HTTP request received while in maintenance mode
2016-06-30 17:26:14,269 WARN  [o.e.j.h.HttpParser] badMessage: java.lang.IllegalStateException: too much data after closed for HttpChannelOverHttp@2ccb809{r=1,c=false,a=IDLE,uri=-}
2016-06-30 17:26:14,620 INFO  [p.p.pdb-routing] HTTP request received while in maintenance mode
2016-06-30 17:33:08,545 INFO  [p.p.pdb-routing] HTTP request received while in maintenance mode
2016-06-30 17:33:14,898 INFO  [p.p.pdb-routing] HTTP request received while in maintenance mode
2016-06-30 17:33:17,978 INFO  [p.p.pdb-routing] HTTP request received while in maintenance mode
2016-06-30 17:33:18,361 INFO  [p.p.pdb-routing] HTTP request received while in maintenance mode
2016-06-30 17:52:04,005 INFO  [p.p.pdb-routing] HTTP request received while in maintenance mode
2016-06-30 17:52:13,959 INFO  [p.p.pdb-routing] HTTP request received while in maintenance mode
2016-06-30 17:58:57,482 INFO  [p.p.pdb-routing] HTTP request received while in maintenance mode
2016-06-30 17:59:07,073 INFO  [p.p.pdb-routing] HTTP request received while in maintenance mode
2016-06-30 17:59:07,076 WARN  [o.e.j.h.HttpParser] badMessage: java.lang.IllegalStateException: too much data after closed for HttpChannelOverHttp@53a9e726{r=1,c=false,a=IDLE,uri=-}
2016-06-30 17:59:07,333 INFO  [p.p.pdb-routing] HTTP request received while in maintenance mode

Stefan Heijmans

unread,
Jul 1, 2016, 10:39:52 AM7/1/16
to Puppet Users


On Friday, July 1, 2016 at 12:04:19 AM UTC+2, Virat wrote:
var/log/puppetlabs/puppetdb/puppetdb.log



2016-06-30 17:13:54,781 ERROR [p.p.s.storage] ********************
*
* PostgreSQL DB versions older than 9.4 are no longer supported.  Please upgrade Postgres and restart PuppetDB.
*
********************


Upgrade Postgres if it is really <9.4.

Stefan

Virat

unread,
Jul 6, 2016, 5:18:06 PM7/6/16
to Puppet Users
Hello 

I have updated the version and am using 9.5 version. still getting error as below.

 puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find node statement with name 'default' or 'puppetagent.compuppetagent.compuppetagent' on node puppetagent.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Stefan Heijmans

unread,
Jul 6, 2016, 6:00:06 PM7/6/16
to Puppet Users
Does puppetdb start normal now, no more errors in puppetdb.log?

Virat

unread,
Jul 6, 2016, 6:10:12 PM7/6/16
to Puppet Users
view /var/log/puppetlabs/puppetdb/puppetdb.log

2016-07-06 14:06:11,444 INFO  [p.p.command] [3a13ea71-ecd1-4c5b-b0fa-ffe9e7c8afb6] [replace facts] puppetagent.com
2016-07-06 14:06:11,754 INFO  [p.p.command] [50247290-61ba-49cf-bdcc-0e5825ec7907] [store report] puppet v4.5.2 - puppetagent.com

I dont find any errors here puppetdb logs


puppetserver --version
puppetserver version: 2.4.0

puppetdb --version
puppetdb version: 4.1.2

 puppet --version
4.5.2

Stefan Heijmans

unread,
Jul 8, 2016, 7:29:59 AM7/8/16
to Puppet Users
And does this node have a proper node definiton?

Virat

unread,
Jul 8, 2016, 1:08:21 PM7/8/16
to Puppet Users
I didnt declared node definition properly. changed that and it started working. 

Thank you very much !!
Reply all
Reply to author
Forward
0 new messages