View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0004339 | Taler | obsolete component | public | 2016-03-23 11:26 | 2016-04-04 18:03 |
| Reporter | Christian Grothoff | Assigned To | Marcello Stanisci | ||
| Priority | high | Severity | major | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Platform | i7 | OS | Debian GNU/Linux | OS Version | squeeze |
| Product Version | 0.0 | ||||
| Target Version | 0.0 | Fixed in Version | 0.0 | ||
| Summary | 0004339: sending SIGTERM to taler-bank-manage doesn't kill HTTP server | ||||
| Description | The shell script wrapper needs to catch the signal and kill the subprocess, or maybe better, simply 'exec' the HTTP server. Right now, sending SIGTERM to taler-bank-manage leaves the Python server running, which is not OK. | ||||
| Tags | No tags attached. | ||||
| Attached Files | dump.txt (3,081 bytes)
marcello@daemon:~$ netstat -l -t -n -p (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:39600 0.0.0.0:* LISTEN - tcp 0 0 127.0.0.1:8081 0.0.0.0:* LISTEN 21523/python tcp 0 0 127.0.0.1:8888 0.0.0.0:* LISTEN 1089/firefox tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN - tcp6 0 0 :::111 :::* LISTEN - tcp6 0 0 :::80 :::* LISTEN - tcp6 0 0 :::58320 :::* LISTEN - tcp6 0 0 ::1:8118 :::* LISTEN - tcp6 0 0 ::1:5432 :::* LISTEN - tcp6 0 0 :::25 :::* LISTEN - marcello@daemon:~$ kill 21523 marcello@daemon:~$ netstat -l -t -n -p (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:39600 0.0.0.0:* LISTEN - tcp 0 0 127.0.0.1:8888 0.0.0.0:* LISTEN 1089/firefox tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN - tcp6 0 0 :::111 :::* LISTEN - tcp6 0 0 :::80 :::* LISTEN - tcp6 0 0 :::58320 :::* LISTEN - tcp6 0 0 ::1:8118 :::* LISTEN - tcp6 0 0 ::1:5432 :::* LISTEN - tcp6 0 0 :::25 :::* LISTEN - marcello@daemon:~$ | ||||
|
|
Depending on the version of uwsgi, you simply need to run uwsgi with --die-on-term. The stuff in deployment.git already does this, and the taler-bank-manage should do it as well ... |
|
|
fixed in 66ca238 |
|
|
Does not work here. |
|
|
Please run 'make check' in bank-lib/ of taler-exchange and confirm that no process listening to port 8081 remains after the test. Otherwise, this is NOT fixed. |
|
|
Should be fixed in 5ba331, it appears the --master argument to uwsgi was missing ... |
|
|
No, still doesn't work for me. Did you test it as I suggested? |
|
|
Still does not work. |
|
|
That's completely normal: what happened is that Florian fixed the via-wsgi bank's launcher (used to make the bank available to nginx), but you need the "pure" bank launcher (called via the --bareserver option to taler-bank-manage), which launches the bank "natively" in django (see [1]). This native launcher doesn't seem having any option to explicitly kill itself.. [1] https://docs.djangoproject.com/en/1.9/ref/django-admin/#runserver |
|
|
Anyway, the attachment shows that the native server does die on SIGTERM (look for port 8081) .. |
|
|
It's not about an option. The issue is that the shell script needs to be modified to pass the signal to the child process. See http://www.linuxquestions.org/questions/programming-9/signal-handling-from-bash-257157/ |
|
|
found this also http://unix.stackexchange.com/questions/146756/forward-sigterm-to-child-in-bash |
|
|
fixed in 0be5301 Solved by executing the server via 'exec' and by adding a '--noreload' flag which prevents the server from forking and getting trickier to kill. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2016-03-23 11:26 | Christian Grothoff | New Issue | |
| 2016-03-23 11:26 | Christian Grothoff | Status | new => assigned |
| 2016-03-23 11:26 | Christian Grothoff | Assigned To | => Marcello Stanisci |
| 2016-03-23 14:18 | Florian Dold | Note Added: 0010322 | |
| 2016-03-23 14:39 | Marcello Stanisci | Note Added: 0010324 | |
| 2016-03-23 14:39 | Marcello Stanisci | Status | assigned => resolved |
| 2016-03-23 14:39 | Marcello Stanisci | Resolution | open => fixed |
| 2016-03-23 17:03 | Christian Grothoff | Status | resolved => closed |
| 2016-03-23 17:03 | Christian Grothoff | Fixed in Version | => 0.0 |
| 2016-03-23 18:16 | Christian Grothoff | Note Added: 0010327 | |
| 2016-03-23 18:16 | Christian Grothoff | Note Added: 0010328 | |
| 2016-03-23 18:16 | Christian Grothoff | Status | closed => feedback |
| 2016-03-23 18:16 | Christian Grothoff | Resolution | fixed => reopened |
| 2016-03-23 18:27 | Florian Dold | Assigned To | Marcello Stanisci => Florian Dold |
| 2016-03-23 18:27 | Florian Dold | Status | feedback => assigned |
| 2016-03-23 18:30 | Florian Dold | Note Added: 0010329 | |
| 2016-03-23 18:30 | Florian Dold | Status | assigned => feedback |
| 2016-03-23 19:00 | Christian Grothoff | Note Added: 0010331 | |
| 2016-03-23 19:00 | Christian Grothoff | Status | feedback => assigned |
| 2016-04-01 21:11 | Christian Grothoff | Assigned To | Florian Dold => Marcello Stanisci |
| 2016-04-01 21:11 | Christian Grothoff | Note Added: 0010353 | |
| 2016-04-02 17:49 | Marcello Stanisci | Note Added: 0010355 | |
| 2016-04-02 18:16 | Marcello Stanisci | File Added: dump.txt | |
| 2016-04-02 18:19 | Marcello Stanisci | Note Added: 0010357 | |
| 2016-04-02 18:19 | Marcello Stanisci | Note Edited: 0010357 | |
| 2016-04-02 18:48 | Christian Grothoff | Note Added: 0010358 | |
| 2016-04-04 14:17 | Marcello Stanisci | Note Added: 0010364 | |
| 2016-04-04 15:48 | Marcello Stanisci | Note Added: 0010365 | |
| 2016-04-04 15:48 | Marcello Stanisci | Status | assigned => resolved |
| 2016-04-04 15:48 | Marcello Stanisci | Resolution | reopened => fixed |
| 2016-04-04 18:03 | Christian Grothoff | Status | resolved => closed |
| 2022-08-23 20:26 | Christian Grothoff | Category | bank (demonstrator) => py bank (demonstrator, obsolete) |
| 2023-12-03 01:23 | Christian Grothoff | Category | py bank (demonstrator, obsolete) => obsolete componet |
| 2023-12-11 20:08 | Florian Dold | Category | obsolete componet => obsolete component |