Re: [Puppet Users] PuppetDB - ERROR [p.p.config] No subname set in the "database" config`

2022-10-11 Thread Martin Alfke
Subname needs the PostgreSQL connection. Not the PuppetDB URL

Wrong:
subname = //localhost:8081/puppetdb

Right:
subname = //localhost:5432/puppetdb

In my config all the database config is not in config.ini but in database.ini

# /etc/puppetlabs/puppetdb/conf/database.ini
[database]

# The database address, i.e. //HOST:PORT/DATABASE_NAME
# subname = //localhost:5432/puppetdb
subname = //localhost:5432/puppetdb

# Connect as a specific user
# username = foobar
username = puppetdb

# Use a specific password
# password = foobar
password = puppetdb

# How often (in minutes) to compact the database
# gc-interval = 60
gc-interval = 60
classname = org.postgresql.Driver
subprotocol = postgresql
syntax_pgs = true
node-purge-gc-batch-limit = 25
node-ttl = 7d
node-purge-ttl = 14d
report-ttl = 14d
log-slow-statements = 10
conn-max-age = 60
conn-keep-alive = 45
conn-lifetime = 0
migrate = true


Hth,
Martin

> On 10. Oct 2022, at 15:42, Callum McCrorie  wrote:
> 
> Hello,
> I’m reaching out about an issue related to PuppetDB. I am hoping that
> someone will be able to assist myself and my coworker in solving this
> problem.
> 
> When I take a look inside the puppetdb log file the error that I am
> seeing is `ERROR [p.p.config] No subname set in the "database"
> config`. Root to the log file is - /var/log/puppetlabs/puppetdb/puppetdb.log.
> 
> If I try to start puppetdb service manually by running `systemctl
> start puppetdb` I then receive the following error message:
> `Job for puppetdb.service failed because the control process exited
> with error code.
> See "systemctl status puppetdb.service" and "journalctl -xe" for details.`
> 
> Following this when looking at `journalctl -xe` I can see the error message:
> `-- The unit puppetdb.service has entered the 'failed' state with
> result 'exit-code'
> Oct 04 13:37:36 puppet systemd[1]: Failed to start puppetdb Service.
> -- Subject: A start job for unit puppetdb.service has failed.'
> 
> I have also included in this the PuppetDB scripts and any related scripts.
> 
> The following script is for puppet.conf location is
> /etc/puppetlabs/puppet/puppet.conf.
> 
> # This file can be used to override the default puppet settings.
> # See the following links for more details on what settings are available:
> # - https://puppet.com/docs/puppet/latest/config_important_settings.html 
> 
> # - https://puppet.com/docs/puppet/latest/config_about_settings.html 
> 
> # - https://puppet.com/docs/puppet/latest/config_file_main.html 
> 
> # - https://puppet.com/docs/puppet/latest/configuration.html 
> 
> [server]
> 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
> 
> [master]
> storeconfigs = true
> storeconfigs_backend = puppetdb
> reports = store, puppetdb
> 
> [agent]
> noop = true
> 
> The next script is from puppetdb.conf location is
> /etc/puppetlabs/puppet/puppetdb.conf
> 
> [main]
>  server_urls = https://puppetdb.company.com:8081 
> 
> 
> 
> The puppetdb config.ini file
> (/etc/puppetlabs/puppetdb/conf.d/config.ini) is as follows:
> 
> #logging-config = /etc/puppetlabs/puppetdb/logback.xml
> 
> #[command-processing]
> # How many command-processing threads to use, defaults to (CPUs / 2)
> # threads = 4
> 
> # How many threads can write to disk at once, defaults to min(CPUs / 2, 4)
> # concurrent-writes = 4
> 
> [global]
> vardir = /var/lib/puppetdb
> logging-config = /var/lib/puppetdb/logback.xml
> 
> [database]
> classname = org.postgresql.Driver
> subprotocol = postgresql
> subname = //localhost:8081/puppetdb
> 
> [puppetdb]
> certificate-whitelist = /path/to/file/containing/certnames
> disable-update-checking = false
> 
> The puppetdb jetty.ini file
> (/etc/puppetlabs/puppetdb/conf.d/jetty.ini) is as follows:
> 
> [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 = 
> 
> # 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

[Puppet Users] Puppet Platform 7.20.0 is now available

2022-10-11 Thread Puppet Product Updates
The next release in the Puppet 7 series, Puppet 7.20.0, is now available!



The release contains minor enhancements, and bug fixes including:


Agent 7.20.0

   - Bumps resource-api gem to 1.8.16
   - Fixed a bug in the Augeas component of the puppet-agent platform on
   macOS. *Contributed by Puppet community member h0tw1r3*
   - puppet-agent 7.19.0 had a broken Augeas packaged with it. This is
   fixed in puppet-agent 7.20.0
   - This release removes support for Debian 9 (x86 and x86-64), Fedora 34
   and 32.



PuppetDB 7.11.0

   - The org.postgresql/postgresql driver has been updated to version
   42.4.1 to address CVE-2022-31197, which is an SQL injection risk that
   according to the CVE report, can only be exploited if an attacker controls
   the database to the extent that they can adjust relevant tables to have
   "malicious" column names.



For the full list of changes and detailed descriptions, check out the
release notes:
https://puppet.com/docs/puppet/7/release_notes_puppet.html#release_notes_puppet_x-7-20-0


Puppet

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CABRr%2BmJ3W2ewNjBj0ZoFcYYhTg9BncaumObyKXtkGuiTNFtTpg%40mail.gmail.com.