View Issue Details

IDProjectCategoryView StatusLast Update
0005127Talermerchant backend API (C)public2017-10-18 15:42
ReporterFlorian DoldAssigned ToChristian Grothoff 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product VersionSVN HEAD 
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.

Activities

Christian Grothoff

2017-08-31 14: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 14: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 Modified Username Field Change
2017-08-25 17:39 Florian Dold New Issue
2017-08-25 17:39 Florian Dold Status new => assigned
2017-08-25 17:39 Florian Dold Assigned To => Christian Grothoff
2017-08-27 09:11 Christian Grothoff Product Version => SVN HEAD
2017-08-27 09:11 Christian Grothoff Target Version => 0.4
2017-08-31 14:01 Christian Grothoff Note Added: 0012400
2017-08-31 14:05 Christian Grothoff Note Added: 0012401
2017-08-31 14:08 Christian Grothoff Status assigned => resolved
2017-08-31 14:08 Christian Grothoff Resolution open => fixed
2017-08-31 14:08 Christian Grothoff Fixed in Version => 0.4
2017-10-18 15:42 Christian Grothoff Status resolved => closed