question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Postgres error message after startup

See original GitHub issue

Hello, I don’t know if this really is an issue. I am running apicurio registry 2.1.4.Final with SQL storage on a Kube container. It connects to a postgres database. The initialization steps look to begin correctly, but then I have an exception :

2021-12-17 12:24:49 INFO <> [io.apicurio.registry.storage.impl.sql.AbstractSqlRegistryStorage] (executor-thread-1) SqlRegistryStorage constructed successfully.  JDBC URL: jdbc:postgresql://postgresql:5432/apicuriodb
2021-12-17 12:24:49 INFO <> [io.quarkus.bootstrap.runner.Timing] (main) apicurio-registry-storage-sql 2.1.4.Final on JVM (powered by Quarkus 2.2.3.Final) started in 18.799s. Listening on: http://0.0.0.0:8080
2021-12-17 12:24:49 INFO <> [io.quarkus.bootstrap.runner.Timing] (main) Profile prod activated. 
2021-12-17 12:24:49 INFO <> [io.quarkus.bootstrap.runner.Timing] (main) Installed features: [agroal, apicurio-registry-avro, cdi, jdbc-postgresql, kafka-client, micrometer, narayana-jta, oidc, resteasy, resteasy-jackson, scheduler, security, servlet, smallrye-context-propagation, smallrye-health, vertx]
2021-12-17 12:24:52 INFO <> [io.apicurio.registry.storage.impl.sql.AbstractSqlRegistryStorage] (executor-thread-1) Checking to see if the DB is initialized.
2021-12-17 12:24:53 INFO <> [io.apicurio.registry.storage.impl.sql.AbstractSqlRegistryStorage] (executor-thread-1) Database not initialized.
2021-12-17 12:24:53 INFO <> [io.apicurio.registry.storage.impl.sql.AbstractSqlRegistryStorage] (executor-thread-1) Initializing the Apicurio Registry database.
2021-12-17 12:24:53 INFO <> [io.apicurio.registry.storage.impl.sql.AbstractSqlRegistryStorage] (executor-thread-1) 	Database type: postgresql
2021-12-17 12:24:53 INFO <> [io.apicurio.registry.storage.impl.sql.AbstractSqlRegistryStorage] (executor-thread-1) Checking to see if the DB is up-to-date.
2021-12-17 12:24:53 INFO <> [io.apicurio.registry.storage.impl.sql.AbstractSqlRegistryStorage] (executor-thread-1) Build's DB version is 6
2021-12-17 12:24:53 INFO <> [io.apicurio.registry.storage.impl.sql.SqlRegistryStorage] (executor-thread-1) Using SQL artifactStore.
2021-12-17 12:25:48 WARN <> [com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord] (executor-thread-2) ARJUNA016039: onePhaseCommit on < formatId=131077, gtrid_length=35, bqual_length=36, tx_uid=0:ffff0a9798a6:9d3d:61bc8191:14, node_name=quarkus, branch_uid=0:ffff0a9798a6:9d3d:61bc8191:16, subordinatenodename=null, eis_name=0 > (io.agroal.narayana.LocalXAResource@4bcb5f18) failed with exception XAException.XA_RBROLLBACK: javax.transaction.xa.XAException: Error trying to transactionCommit local transaction: ERREUR: l'instruction pr?par?e ? S_1 ? existe d?j?
	at io.agroal.narayana.LocalXAResource.xaException(LocalXAResource.java:140)
	at io.agroal.narayana.LocalXAResource.xaException(LocalXAResource.java:134)
	at io.agroal.narayana.LocalXAResource.commit(LocalXAResource.java:72)

The healthcheck responds correctly too :

$ curl http://localhost:8080/health
{
    "status": "UP",
    "checks": [
        {
            "name": "StorageLivenessCheck",
            "status": "UP"
        },
        {
            "name": "ResponseErrorLivenessCheck",
            "status": "UP",
            "data": {
                "errorCount": 0
            }
        },
        {
            "name": "PersistenceTimeoutReadinessCheck",
            "status": "UP",
            "data": {
                "errorCount": 0
            }
        },
        {
            "name": "PersistenceExceptionLivenessCheck",
            "status": "UP",
            "data": {
                "errorCount": 0
            }
        },
        {
            "name": "Database connections health check",
            "status": "UP"
        },
        {
            "name": "PersistenceSimpleReadinessCheck",
            "status": "UP"
        },
        {
            "name": "ResponseTimeoutReadinessCheck",
            "status": "UP",
            "data": {
                "errorCount": 0
            }
        }
    ]
}

Maybe I should add that the database version is 11.12 :

apicuriodb=> select version();
                                                     version
------------------------------------------------------------------------------------------------------------------
 PostgreSQL 11.12 (Debian 11.12-0+deb10u1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit

Is Postgres version 11.12 supported ? If it is the case, what could be causing the error ?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Bewi42commented, Dec 20, 2021

Problem looks to be resolved by adding “prepareThreshold=0” to the connection URL. I don’t know about any side effects though.

0reactions
Bewi42commented, Jan 11, 2022

OK I agree.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation: 15: 43.9. Errors and Messages - PostgreSQL
Supplies the name of a related object. This example will abort the transaction with the given error message and hint: RAISE EXCEPTION 'Nonexistent...
Read more >
Logging Postgres startup errors on Windows
Is there a way to cause Postgres to log startup errors to pg_log on Windows 7 and Postgres 9.3? postgresql · logs ·...
Read more >
Postgre SQL errors – common codes and messages - Paessler
The error message indicates that PostgreSQL is currently not running on the system that the user is logged in to. When dealing with...
Read more >
The Control-M Postgres Service fails to startup with error: "The ...
Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or...
Read more >
Error message appears no PostgreSQL user name specified ...
Error message "no PostgreSQL user name specified in startup packet" appears after attempting to enable sql pi repository to a db agent.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found