View Issue Details

IDProjectCategoryView StatusLast Update
0005785Talerauditorpublic2019-12-20 19:12
ReporterMarcello Stanisci Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.6Fixed in Version0.6 
Summary0005785: auditor crashes when "taler-auditor-dbinit -r" wasn't run
DescriptionJun 27 12:37:29-094298 pq-12066 ERROR Query `auditor_denominations_insert' failed with result: insert or update on table "auditor_denominations" violates foreign key constraint "master_pub_ref"/Key (master_pub)=(\xeab3b374dc392703e55c44a4d4a4d15868b8ab7bb9ba69c33bbfe9b8d8a59c99) is not present in table "auditor_exchanges"./ERROR: insert or update on table "auditor_denominations" violates foreign key constraint "master_pub_ref"
DETAIL: Key (master_pub)=(\xeab3b374dc392703e55c44a4d4a4d15868b8ab7bb9ba69c33bbfe9b8d8a59c99) is not present in table "auditor_exchanges".
/PGRES_FATAL_ERROR/ERROR: insert or update on table "auditor_denominations" violates foreign key constraint "master_pub_ref"
DETAIL: Key (master_pub)=(\xeab3b374dc392703e55c44a4d4a4d15868b8ab7bb9ba69c33bbfe9b8d8a59c99) is not present in table "auditor_exchanges".

Failed to store key in auditor DB (did you add the exchange first?)
Steps To ReproduceLog-in as 'taler-internal' @ Gv.

source activate
dropdb talerint
createdb talerint
rm -fr taler-data/*
rm -fr .config/taler.conf
taler-deployment-config-generate
taler-exchange-dbinit -r
taler-merchant-dbinit -r
taler-deployment-hier
taler-deployment-keyup
Additional InformationObserved as of be7ed5565e9de1a21ef794918c297e918f074da0 (exchange.git)

Run "taler-auditor-dbinit -r" before "taler-deployment-hier", and the error should disappear.
TagsNo tags attached.

Activities

Christian Grothoff

2019-06-30 17:23

manager   ~0014621

The diagnostic is wrong, I get the error *regardless* of running taler-auditor-dbinit before the script. Also, running taler-auditor-dbinit is strictly speaking unnecessary, as it is automatically done by taler-auditor-exchange as part of taler-deployment-keyup. My impression remains that the invocation to taler-auditor-exchange passes the wrong master public key, and thus the error message is likely spot-on.

Christian Grothoff

2019-06-30 17:25

manager   ~0014622

Hmm. Re-readig the taler-deployment-keyup script, I can't see how the master_pub _could_ be wrong. Very strange.

Christian Grothoff

2019-06-30 17:48

manager   ~0014623

The *real* issue was a missing line in taler-auditor-exchange (fixed in 0ade45d3..e9f43adb):

  if (NULL == cfgfile)
    cfgfile = GNUNET_strdup (GNUNET_OS_project_data_get ()->user_config_file);

This caused taler-auditor-exchange to NOT use ~/.config/taler.conf, resulting in it using a different *database*. So the record of taler-auditor-exchange was added to the WRONG database, resulting in the foreign key violation later. Regardless, the taler-auditor-sign tool did the correct thing, first logging the DB issue and then printing a proper error message indicative of the issue to stderr.

Christian Grothoff

2019-06-30 17:48

manager   ~0014624

Resolved as of 0ade45d3..e9f43adb

Issue History

Date Modified Username Field Change
2019-06-27 12:43 Marcello Stanisci New Issue
2019-06-27 12:43 Marcello Stanisci Status new => assigned
2019-06-27 12:43 Marcello Stanisci Assigned To => Christian Grothoff
2019-06-27 12:47 Marcello Stanisci Additional Information Updated
2019-06-27 12:50 Marcello Stanisci Additional Information Updated
2019-06-30 17:23 Christian Grothoff Note Added: 0014621
2019-06-30 17:25 Christian Grothoff Note Added: 0014622
2019-06-30 17:48 Christian Grothoff Note Added: 0014623
2019-06-30 17:48 Christian Grothoff Status assigned => resolved
2019-06-30 17:48 Christian Grothoff Resolution open => fixed
2019-06-30 17:48 Christian Grothoff Fixed in Version => 0.6
2019-06-30 17:48 Christian Grothoff Product Version => git (master)
2019-06-30 17:48 Christian Grothoff Target Version => 0.6
2019-06-30 17:48 Christian Grothoff Note Added: 0014624
2019-12-20 19:12 Christian Grothoff Status resolved => closed