Jira (PDB-4555) PuppetDB connection failure causing shutdown

39 views
Skip to first unread message

Austin Blatt (JIRA)

unread,
Oct 22, 2019, 1:42:03 PM10/22/19
to puppe...@googlegroups.com
Austin Blatt created an issue
 
PuppetDB / Improvement PDB-4555
PuppetDB connection failure causing shutdown
Issue Type: Improvement Improvement
Assignee: Austin Blatt
Created: 2019/10/22 10:41 AM
Priority: Normal Normal
Reporter: Austin Blatt
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Austin Blatt (JIRA)

unread,
Oct 22, 2019, 1:49:03 PM10/22/19
to puppe...@googlegroups.com
Austin Blatt updated an issue
Change By: Austin Blatt
I believe this was introduced by [this query|https://github.com/puppetlabs/puppetdb/pull/3097/files#diff-66cce979c7939fbe2d11a146eae980ccR397] to Postgres that happens outside the "try again" loop for database migrations.

If it fails to get a database connection, it will bring the whole PuppetDB down unlike the migrations which allowed PuppetDB to try again.

Austin Blatt (JIRA)

unread,
Oct 22, 2019, 6:39:03 PM10/22/19
to puppe...@googlegroups.com
Austin Blatt updated an issue
Change By: Austin Blatt
Fix Version/s: PDB 5.2.11
Fix Version/s: PDB 6.7.2
Fix Version/s: PDB 6.3.6

Austin Blatt (JIRA)

unread,
Oct 22, 2019, 7:02:03 PM10/22/19
to puppe...@googlegroups.com
Austin Blatt updated an issue
I believe this PuppetDB _requires_ Postgres to be started before PuppetDB, otherwise its first connection to the database will fail, causing PuppetDB to throw and error and shutdown with the following message
{code}
ERROR [p.t.internal] Error during service start!!! java.sql.SQLTransientConnectionException: PDBMigrationsPool - Connection is not available, request timed out after 3011ms.
{code}

Previously, if postgresql
was not up, PuppetDB would retry the connection with the message
{code}
ERROR [p.p.c.services] Will retry database connection after temporary failure: java.sql.SQLTransientConnectionException: PDBMigrationsPool - Connection is not available, request timed out after 3008ms.
{code}

This was
introduced by [this query|https://github.com/puppetlabs/puppetdb/pull/3097/files#diff-66cce979c7939fbe2d11a146eae980ccR397] to Postgres that happens outside the "try again" loop for database migrations.

If it fails to get a database
connection , it will bring the whole PuppetDB down unlike the migrations which allowed PuppetDB to try again failures .

Austin Blatt (JIRA)

unread,
Oct 22, 2019, 7:02:03 PM10/22/19
to puppe...@googlegroups.com
Austin Blatt updated an issue
PuppetDB _requires_ Postgres to be started before PuppetDB, otherwise its first connection to the database will fail, causing PuppetDB to throw and error and shutdown with the following message
{code}
ERROR [p.t.internal] Error during service start!!! java.sql.SQLTransientConnectionException: PDBMigrationsPool - Connection is not available, request timed out after 3011ms.
{code}

Previously, if postgresql was not up running , PuppetDB would retry the connection with the message

{code}
ERROR [p.p.c.services] Will retry database connection after temporary failure: java.sql.SQLTransientConnectionException: PDBMigrationsPool - Connection is not available, request timed out after 3008ms.
{code}

This was introduced by [this query|https://github.com/puppetlabs/puppetdb/pull/3097/files#diff-66cce979c7939fbe2d11a146eae980ccR397] to Postgres that happens outside the "try again" loop for database connection failures.

Austin Blatt (JIRA)

unread,
Oct 22, 2019, 7:02:03 PM10/22/19
to puppe...@googlegroups.com
Austin Blatt updated an issue
Change By: Austin Blatt
Issue Type: Improvement Bug

Austin Blatt (JIRA)

unread,
Oct 22, 2019, 7:02:04 PM10/22/19
to puppe...@googlegroups.com
Austin Blatt updated an issue
Change By: Austin Blatt
Affects Version/s: PDB 5.2.10
Affects Version/s: PDB 6.3.5
Affects Version/s: PDB 6.7.1

Austin Blatt (JIRA)

unread,
Oct 22, 2019, 7:06:02 PM10/22/19
to puppe...@googlegroups.com
Austin Blatt updated an issue
Change By: Austin Blatt
Acceptance Criteria: PuppetDB does not crash on startup when Postgres is not available and will retry the connection until a successful connection is made

Austin Blatt (JIRA)

unread,
Oct 23, 2019, 12:06:03 PM10/23/19
to puppe...@googlegroups.com
Austin Blatt updated an issue
Change By: Austin Blatt
Release Notes Summary: PDB-4509 introduced a regression where PuppetDB would attempt to make an initial database connection, if this failed, it would shutdown. Now PuppetDB will retry the database connection as before.
Release Notes: Bug Fix
Reply all
Reply to author
Forward
0 new messages