View Issue Details

IDProjectCategoryView StatusLast Update
0011529Talermerchant backendpublic2026-06-22 10:26
Reportervecirex Assigned Tovecirex  
PriorityurgentSeverityblockReproducibilityalways
Status assignedResolutionopen 
Target Version1.6 
Summary0011529: Upgrade to taler-merchant v1.6.5 (test) might break prior installations: SQL migration to DB scheme v36 fails
DescriptionTested by upgrading from v1.5.16, cf. 0011518.

TL;DR:

taler-merchant-httpd@1b0bd36dc346:/usr/local/bin$ taler-merchant-dbinit 
2026-06-17T12:59:08.256681+0000 taler-merchant-dbinit-786 WARNING Could not run PSQL on file /usr/share/taler-merchant/sql/merchant-0036.sql: psql exit code was 3
2026-06-17T12:59:08.256743+0000 taler-merchant-dbinit-786 ERROR Failed to load SQL statements from `merchant-*'
2026-06-17T12:59:08.256774+0000 taler-merchant-dbinit-786 ERROR Failed to initialize tables
taler-merchant-httpd@1b0bd36dc346:/usr/local/bin$ 
TagsNo tags attached.

Activities

Christian Grothoff

2026-06-19 09:06

manager   ~0028939

Could you please produce either the postgresql logs and/or the output of manually running
merchant-0036.sql via the "psql" command and the respective database? That should help diagnose this quickly.

vecirex

2026-06-19 14:43

manager   ~0028942

I will have to recheck how to properly reproduce, as after running taler-merchant-dbconfig (user: root) also taler-merchant-dbinit (user: taler-merchant-httpd) stays quiet; as expected, DB in place is now bigger and migration certainly went smooth as scripts using the new scheme run through (as on stage, also on the new DB scheme running taler-merchant v1.6.5):

taler-merchant-httpd@1b0bd36dc346:/usr/local/bin$ taler-merchant-httpd --version
taler-merchant-httpd v1.6.5
taler-merchant-httpd@1b0bd36dc346:/usr/local/bin$ taler-merchant-dbinit 
taler-merchant-httpd@1b0bd36dc346:/usr/local/bin$ ./check_merchant-health.sh 
=== Taler Merchant Health Check ===
[OK] Socket exists: /var/run/taler-merchant/httpd/merchant-http.sock
[OK] Merchant-HTTPD is listening on the socket
[OK] Process taler-merchant-httpd is running
[OK] Nginx master process is running
=== ALL CHECKS PASSED ===
taler-merchant-httpd@1b0bd36dc346:/usr/local/bin$ ls -lh /var/taler-backups/*
-rw-r--r-- 1 taler-merchant-httpd www-data 2.1M Nov 18  2025 /var/taler-backups/20251118--taler-merchant-db.sql
[...]
-rw-r--r-- 1 taler-merchant-httpd www-data 2.9M Jun 17 12:45 /var/taler-backups/taler-merchant-20260617_1245.sql
-rw-r--r-- 1 taler-merchant-httpd www-data 6.8M Jun 19 12:23 /var/taler-backups/taler-merchant-20260619_1223.sql

vecirex

2026-06-21 16:45

manager   ~0028948

Last edited: 2026-06-21 17:00

Other issue, upon reboot of the stage system (kernel upgrade), systemd showed to NOT be properly configured anymore; this was already observed on the prod system once; manual intervention was needed:

### root@betel:~# ps -axw | grep taler
   1045 pts/0    S+     0:00 grep taler
### root@betel:~# systemctl status taler-merchant.target
○ taler-merchant.target - GNU Taler merchant
     Loaded: loaded (/usr/lib/systemd/system/taler-merchant.target; disabled; p>
     Active: inactive (dead)
lines 1-3/3 (END)


Manual intervention was needed like:

### root@betel:~# ps -axw | grep taler
   1045 pts/0    S+     0:00 grep taler
### root@betel:~# systemctl status taler-merchant.target
○ taler-merchant.target - GNU Taler merchant
     Loaded: loaded (/usr/lib/systemd/system/taler-merchant.target; disabled; p>
     Active: inactive (dead)
### root@betel:~# systemctl enable taler-merchant.target
Created symlink '/etc/systemd/system/multi-user.target.wants/taler-merchant.target' → '/usr/lib/systemd/system/taler-merchant.target'.
### root@betel:~# systemctl start taler-merchant.target
### root@betel:~# systemctl status taler-merchant.target | grep active
     Active: active since Sun 2026-06-21 16:44:52 CEST; 7s ago
### root@betel:~# ps -axw | grep taler
   1116 ?        Ss     0:00 /usr/bin/taler-merchant-depositcheck -c /etc/taler-merchant/taler-merchant.conf -L INFO
   1117 ?        Ss     0:00 /usr/bin/taler-merchant-donaukeyupdate -c /etc/taler-merchant/taler-merchant.conf -L INFO
   1118 ?        Ss     0:02 /usr/bin/taler-merchant-exchangekeyupdate -c /etc/taler-merchant/taler-merchant.conf -L INFO
   1119 ?        Ss     0:03 /usr/bin/taler-merchant-kyccheck -c /etc/taler-merchant/taler-merchant.conf -L INFO
   1120 ?        Ss     0:01 /usr/bin/taler-merchant-reconciliation -c /etc/taler-merchant/taler-merchant.conf -L INFO
   1121 ?        Ss     0:00 /usr/bin/taler-merchant-report-generator -c /etc/taler-merchant/taler-merchant.conf -L INFO
   1122 ?        Ss     0:00 /usr/bin/taler-merchant-webhook -c /etc/taler-merchant/taler-merchant.conf -L INFO
   1123 ?        Ss     0:00 /usr/bin/taler-merchant-wirewatch -c /etc/taler-merchant/taler-merchant.conf -L INFO
   1124 ?        Ss     0:01 /usr/bin/taler-merchant-httpd -c /etc/taler-merchant/taler-merchant.conf -L INFO
   1125 ?        S      0:00 taler-merchant-depositcheck -c /etc/taler-merchant/taler-merchant.conf -e https://exchange.stage.taler-ops.ch/ -L INFO -T 0
   1126 ?        Ss     0:00 postgres: 17/main: taler-merchant-httpd taler-merchant [local] idle
   1127 ?        Ss     0:00 postgres: 17/main: taler-merchant-httpd taler-merchant [local] idle
   1128 ?        Ss     0:00 postgres: 17/main: taler-merchant-httpd taler-merchant [local] idle
   1129 ?        S      0:00 taler-merchant-depositcheck -c /etc/taler-merchant/taler-merchant.conf -e https://exchange.taler-ops.ch/ -L INFO -T 0
   1130 ?        Ss     0:00 postgres: 17/main: taler-merchant-httpd taler-merchant [local] idle
   1131 ?        Ss     0:00 postgres: 17/main: taler-merchant-httpd taler-merchant [local] idle
   1132 ?        Ss     0:00 postgres: 17/main: taler-merchant-httpd taler-merchant [local] idle
   1133 ?        Ss     0:00 postgres: 17/main: taler-merchant-httpd taler-merchant [local] idle
   1134 ?        Ss     0:00 postgres: 17/main: taler-merchant-httpd taler-merchant [local] idle
   1135 ?        Ss     0:00 postgres: 17/main: taler-merchant-httpd taler-merchant [local] idle
   1136 ?        Ss     0:00 postgres: 17/main: taler-merchant-httpd taler-merchant [local] idle
   1178 pts/0    S+     0:00 grep taler
### root@betel:~# 

vecirex

2026-06-22 10:26

manager   ~0028952

Same issue also for prod / lifeline, running taler-merchant v1.6.0.

This should be investigated in QC or anytime before (for me, as of tomorrow).

Issue History

Date Modified Username Field Change
2026-06-17 15:07 vecirex New Issue
2026-06-17 15:12 vecirex Summary Upgrade to taler-merchant v1.6.5 might break prior installations: SQL migration to DB scheme v36 fails => Upgrade to taler-merchant v1.6.5 (test) might break prior installations: SQL migration to DB scheme v36 fails
2026-06-19 09:06 Christian Grothoff Note Added: 0028939
2026-06-19 09:06 Christian Grothoff Assigned To => vecirex
2026-06-19 09:06 Christian Grothoff Status new => feedback
2026-06-19 09:06 Christian Grothoff Target Version => 1.6
2026-06-19 14:43 vecirex Note Added: 0028942
2026-06-19 14:46 vecirex Status feedback => assigned
2026-06-21 16:45 vecirex Note Added: 0028948
2026-06-21 16:46 vecirex Note Edited: 0028948
2026-06-21 17:00 vecirex Note Edited: 0028948
2026-06-22 10:26 vecirex Note Added: 0028952