View Issue Details

IDProjectCategoryView StatusLast Update
0007722Talermechant backendpublic2024-01-12 14:04
Reportersebasjm Assigned Tojavier.sepulveda  
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.

Activities

Christian Grothoff

2023-03-08 10: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 12:34

administrator   ~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 12: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 Modified Username Field Change
2023-02-23 23:45 sebasjm New Issue
2023-02-23 23:45 sebasjm Status new => assigned
2023-02-23 23:45 sebasjm Assigned To => Christian Grothoff
2023-03-08 10:55 Christian Grothoff Assigned To Christian Grothoff => javier.sepulveda
2023-03-08 10:56 Christian Grothoff Note Added: 0019928
2023-03-08 12:34 javier.sepulveda Note Added: 0019932
2023-03-08 12:39 Christian Grothoff Note Added: 0019933
2023-03-08 12:39 Christian Grothoff Status assigned => resolved
2023-03-08 12:39 Christian Grothoff Resolution open => fixed
2023-03-08 12:39 Christian Grothoff Fixed in Version => 0.9.3
2023-09-23 15:09 Christian Grothoff Status resolved => closed
2024-01-12 14:04 Christian Grothoff Category merchant backend API (C) => mechant backend