View Issue Details

IDProjectCategoryView StatusLast Update
0007722Talermerchant backendpublic2024-01-12 13:04
Reportersebasjm Assigned Tojavier.sepulveda 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.9.3Fixed in Version0.9.3 
Summary0007722: installing merchant from debian package: fail db init
DescriptionFollowing the configuration script of taler-merchant.

 [1] failed with database not found (wit the name of the user)
 [2] after creating this database (which is wrong) ended up with another database error

This is a plain debian machine.

The configuration script starts like this, error at the end:

Configuring taler-merchant
--------------------------

The taler-merchant package must have a database installed and configured before it can be used. This can be optionally handled with dbconfig-common.

If you are an advanced database administrator and know that you want to perform this configuration manually, or if your database has already been installed
and configured, you should refuse this option. Details on what needs to be done should most likely be provided in /usr/share/doc/taler-merchant.

Otherwise, you should probably choose this option.

Configure database for taler-merchant with dbconfig-common? [yes/no] yes

------

Errors:

[1]
creating database merchant_db: failed.
error encountered creating database:
psql: error: FATAL: database "root" does not exist

[2]
creating database merchant_db: success.
verifying database merchant_db exists: success.
populating database via scriptfile... psql:<stdin>:1: ERROR: database "pgsql" does not exist
2023-02-23T22:39:10.056024+0000 pq-10470 ERROR Database connection to 'postgres:///merchant_db' failed: FATAL: role "taler-merchant-httpd" does not exist
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Christian Grothoff

2023-03-08 09:56

manager   ~0019928

I only get

populating database via scriptfile... psql:<stdin>:1: ERROR: database "pgsql" does not exist

with the current package, and it *seems* harmless. As I wrote, likely somewhere we confuse dbtype and dbname.

javier.sepulveda

2023-03-08 11:34

reporter   ~0019932

The bug is located at:

https://git.taler.net/merchant.git/tree/debian/db/install/pgsql

LINE: 20 (after the pipe)

Explanation: If you are not logged as the "postgres" user, you cannot grant permissions.

Explanation:

https://stackoverflow.com/questions/18664074/getting-error-peer-authentication-failed-for-user-postgres-when-trying-to-ge

Christian Grothoff

2023-03-08 11:39

manager   ~0019933

Well, we are logging in as 'postgres' via the sudo. But we give the wrong DB name to postgres, so this is indeed clearly the line with the bug!
Fixed in d01499cf..1cd6752f

Issue History

Date ModifiedUsernameFieldChange
2023-02-23 22:45sebasjmNew Issue
2023-02-23 22:45sebasjmStatusnew => assigned
2023-02-23 22:45sebasjmAssigned To => Christian Grothoff
2023-03-08 09:55Christian GrothoffAssigned ToChristian Grothoff => javier.sepulveda
2023-03-08 09:56Christian GrothoffNote Added: 0019928
2023-03-08 11:34javier.sepulvedaNote Added: 0019932
2023-03-08 11:39Christian GrothoffNote Added: 0019933
2023-03-08 11:39Christian GrothoffStatusassigned => informing
2023-03-08 11:39Christian GrothoffResolutionopen => fixed
2023-03-08 11:39Christian GrothoffFixed in Version => 0.9.3
2023-09-23 13:09Christian GrothoffStatusinforming => closed
2024-01-12 13:04Christian GrothoffCategorymerchant backend API (C) => mechant backend
2025-03-22 13:09Christian GrothoffCategorymechant backend => merchant backend