View Issue Details

IDProjectCategoryView StatusLast Update
0005127Talermerchant backendpublic2024-01-12 13:04
ReporterFlorian Dold Assigned ToChristian Grothoff Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.4Fixed in Version0.4 
Summary0005127: merchant stops working when postgres upgrades
DescriptionSee logs below. Looks like the merchant doesn't re-connect to the DB when there's an error.

Interestingly this only showed on test, not on demo. Maybe someone manually restarted demo? Or this only happens due to newer code?
Additional InformationAug 25 16:50:26-390251 taler-merchant-httpd-2898 DEBUG inserting contract_terms: order_id: 16:50:26-BE1AEF237C35E000, merchant_pub: RQ6KBZ4N, h_contract_terms: NGA8GDGT.
Aug 25 16:50:26-390296 pq-2898 ERROR Failed to execute `CREATE TABLE IF NOT EXISTS merchant_contract_terms (order_id VARCHAR NOT NULL,merchant_pub BYTEA NOT NULL,contract_terms BYTEA NOT NULL,h_contract_terms BYTEA NOT NULL,timestamp INT8 NOT NULL,row_id BIGSERIAL UNIQUE,paid BYTEA NOT NULL ,PRIMARY KEY (order_id, merchant_pub),UNIQUE (h_contract_terms, merchant_pub));': (null)/(null)//PGRES_FATAL_ERROR/no connection to the server
Aug 25 16:50:26-390308 taler-merchant-httpd-2898 ERROR Assertion failed at plugin_merchantdb_postgres.c:473.
Aug 25 16:50:26-390316 taler-merchant-httpd-2898 ERROR Assertion failed at plugin_merchantdb_postgres.c:500.
Aug 25 16:50:26-390344 pq-2898 DEBUG Executing prepared SQL statement `insert_contract_terms'
Aug 25 16:50:26-390355 taler-merchant-httpd-2898 ERROR Assertion failed at pq_eval.c:73.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Christian Grothoff

2017-08-31 12:01

manager   ~0012400

Well, if the above happens *during* Postgres restart, that is normal an expected, as while the DB is gone we do expect to get failures from trying to access it. But it should recover once the DB is back.

Git 4cfe3ac..f795e36 fixes a (related?) bug in the handling of such errors, where /pay would not execute the usually required number of retries.

Christian Grothoff

2017-08-31 12:05

manager   ~0012401

Ah, indeed found that a call to "GNUNET_PQ_connect_with_cfg (pg->cfg," was also missing in check_connection(). Fixed in 58bcfc40d82ceddf5db759ccd8de0ebf6b48e49c

Issue History

Date ModifiedUsernameFieldChange
2017-08-25 15:39Florian DoldNew Issue
2017-08-25 15:39Florian DoldStatusnew => assigned
2017-08-25 15:39Florian DoldAssigned To => Christian Grothoff
2017-08-27 07:11Christian GrothoffProduct Version => git (master)
2017-08-27 07:11Christian GrothoffTarget Version => 0.4
2017-08-31 12:01Christian GrothoffNote Added: 0012400
2017-08-31 12:05Christian GrothoffNote Added: 0012401
2017-08-31 12:08Christian GrothoffStatusassigned => informing
2017-08-31 12:08Christian GrothoffResolutionopen => fixed
2017-08-31 12:08Christian GrothoffFixed in Version => 0.4
2017-10-18 13:42Christian GrothoffStatusinforming => closed
2021-09-02 16:22Christian Grothoff
2024-01-12 13:04Christian GrothoffCategorymerchant backend API (C) => mechant backend
2025-03-22 13:09Christian GrothoffCategorymechant backend => merchant backend