taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

taler-mdb-network-check.sh.1.rst (2477B)


      1 taler-mdb-network-check.sh(1)
      2 #############################
      3 
      4 .. only:: html
      5 
      6    Name
      7    ====
      8 
      9    **taler-mdb-network-check.sh** - Taler multi-drop bus vending machine network check tool
     10 
     11 
     12 Synopsis
     13 ========
     14 
     15 **taler-mdb-network-check.sh**
     16 [**-c** *FILENAME*]
     17 [**-f** *FAIL_HELPER*]
     18 [**-h**]
     19 **--**
     20 *PROGRAM*
     21 
     22 Description
     23 ===========
     24 
     25 **taler-mdb-network-check.sh** is a command-line tool to call a program when the network goes down.
     26 It depends on **dig**.
     27 
     28 Its options are as follows:
     29 
     30 **-c** *FILENAME*
     31    Use the configuration and other resources for the command to operate from *FILENAME*.
     32 
     33 **-f** *FAIL_HELPER*
     34    Overwrites the Taler config's *FAIL_HELPER* value. See taler-mdb.conf(5)
     35 
     36 **-h**
     37    Print short help on options.
     38 
     39 
     40 When the network goes down, it will kill *PROGRAM*, then call *FAIL_HELPER* with one of the following error codes (followed by killing *FAIL_HELPER* and relaunching *PROGRAM* once the network is up again) - note that we check in the order these are listed:
     41 
     42 **no-ip**
     43    Network Down: Could not reach the DNS Server. (DNS Server is first **nameserver** entry in **/etc/resolv.conf**.)
     44 
     45 **backend-dns-resolution-failure**
     46    Name Resolution Failed: Could not resolve the Taler backend hostname. Check DNS. (**dig** picks its own nameservers; we do not force it to use the one we pinged.)
     47 
     48 **backend-unreachable**
     49    Backend Unreachable: Could not reach payment backend.
     50 
     51 **backend-no-webserver**
     52    Backend No Webserver: We cannot find a webserver on a backend. Ensure requests are properly routing to it. (X509 certificate is not verified here.)
     53 
     54 **backend-x509-cert-bad**
     55    Bad Certificate: The Taler backend gave us a bad TLS certificate. Check the X509 setup.
     56 
     57 **backend-auth-failure**
     58    Backend Authentication Failure: The credentials are invalid. Check your configuration.
     59 
     60 
     61 The aforementioned *FAIL_HELPER* also gets called if the network is not up in the first place.
     62 
     63 In short, *FAIL_HELPER* will be running whenever the network is down, and *PROGRAM* will be running whenever its up.
     64 
     65 The network is checked every **30 seconds**.
     66 
     67 Example
     68 =======
     69 
     70 A canonical use of the script to launch taler-mdb would be:
     71 
     72 .. code-block:: console
     73 
     74   # /usr/bin/taler-mdb-network-check.sh -c /etc/taler-mdb.conf -- \
     75     /usr/bin/taler-mdb -c /etc/taler-mdb.conf
     76 
     77 
     78 See Also
     79 ========
     80 
     81 taler-mdb(1), taler-mdb-show.sh(1), taler-mdb.conf(5).
     82 
     83 
     84 Bugs
     85 ====
     86 
     87 Report bugs by using https://bugs.taler.net or by sending electronic
     88 mail to <taler@gnu.org>.