View Issue Details

IDProjectCategoryView StatusLast Update
0006023TalerMerchant frontends (Python3)public2024-01-12 14:08
ReporterChristian Grothoff Assigned ToMS  
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionfixed 
Platformi7OSDebian GNU/LinuxOS Versionsqueeze
Product Versiongit (master) 
Target Version0.8Fixed in Version0.8 
Summary0006023: frontend throws not-so-nice error at the user
DescriptionWhen the DNS resolution of the backend server fails, we throw an ugly stack trace at the user instead of a proper error page.

We should have a nice error page explaining that the DNS resolution failed and that thus we could not contact the backend to process the payment. Exposing the backend URL should probably depend on some configuration option (VERBOSE?) as it might be private.
Additional InformationError page observed from taler.techcultivation.org attached.
TagsNo tags attached.
Attached Files
dns-error.html (6,530 bytes)   
<!DOCTYPE html>
<!--
  This file is part of GNU TALER.
  Copyright (C) 2014, 2015, 2016, 2019 Taler Systems SA

  TALER is free software; you can redistribute it and/or modify it under the
  terms of the GNU Lesser General Public License as published by the Free Software
  Foundation; either version 2.1, or (at your option) any later version.

  TALER is distributed in the hope that it will be useful, but WITHOUT ANY
  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public License along with
  TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
-->
<html data-taler-nojs="true" lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Center for the Cultivation of Technology | Donate using GNU Taler</title>
  <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Center for the Cultivation of Technology">
  <link rel="stylesheet" type="text/css" href="dns-error_files/cct.css">
  <!-- Favicon -->
<link rel="shortcut icon" href="https://techcultivation.org/favicon.ico">
<!-- Bootstrap Core CSS -->
<link rel="stylesheet" href="dns-error_files/bootstrap3.css" type="text/css">
<!-- Custom Fonts -->
 <link rel="stylesheet" href="dns-error_files/opensans.css" type="text/css">
 <link rel="stylesheet" href="dns-error_files/merriweather.css" type="text/css">
 <link rel="stylesheet" href="dns-error_files/all.css" type="text/css">
<!-- Plugin CSS -->
<link rel="stylesheet" href="dns-error_files/animate.css" type="text/css">
<!-- Custom CSS -->
<link rel="stylesheet" href="dns-error_files/creative.css" type="text/css">
<link rel="stylesheet" href="dns-error_files/modals.css" type="text/css">

  
  
</head>

<body id="page-top">
    
  <h1>An Error Occurred</h1>

  <p>Internal error</p>

  

  

  
  <p>Stack trace:</p>
  <pre>    Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 159, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 57, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.7/socket.py", line 748, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 343, in _make_request
    self._validate_conn(conn)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 841, in _validate_conn
    conn.connect()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 301, in connect
    conn = self._new_conn()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 168, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: &lt;urllib3.connection.VerifiedHTTPSConnection object at 0x7f610796a110&gt;: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 398, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='backend.euro.taler.net', port=443): Max retries exceeded with url: /instances/tor/order (Caused by NewConnectionError('&lt;urllib3.connection.VerifiedHTTPSConnection object at 0x7f610796a110&gt;: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/taler/.local/lib/python3.7/site-packages/talerdonations/donations/donations.py", line 118, in backend_instanced_post
    urljoin(backend_url, endpoint), json=json, headers=headers
  File "/usr/lib/python3/dist-packages/requests/api.py", line 116, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='backend.euro.taler.net', port=443): Max retries exceeded with url: /instances/tor/order (Caused by NewConnectionError('&lt;urllib3.connection.VerifiedHTTPSConnection object at 0x7f610796a110&gt;: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/taler/.local/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/taler/.local/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/taler/.local/lib/python3.7/site-packages/talerdonations/donations/donations.py", line 209, in donate
    fulfillment_url=fulfillment_url,
  File "/home/taler/.local/lib/python3.7/site-packages/talerdonations/donations/donations.py", line 121, in backend_instanced_post
    err_abort(500, message=f"Could not establish connection to backend (url={url})")
NameError: name 'url' is not defined

  </pre>
  


</body></html>
dns-error.html (6,530 bytes)   

Activities

Christian Grothoff

2020-04-13 21:39

manager   ~0015643

Let's look at this once we have the backend API v1 implemented.

MS

2020-09-07 16:35

reporter   ~0016910

Last edited: 2020-09-07 16:36

This was fixed already; the screenshot shows what the (three) merchant frontend(s) shows to the user.

Issue History

Date Modified Username Field Change
2020-01-01 12:25 Christian Grothoff New Issue
2020-01-01 12:25 Christian Grothoff Status new => assigned
2020-01-01 12:25 Christian Grothoff Assigned To => Marcello Stanisci
2020-01-01 12:25 Christian Grothoff File Added: dns-error.html
2020-04-13 21:39 Christian Grothoff Target Version 0.7.1 => 0.9
2020-04-13 21:39 Christian Grothoff Note Added: 0015643
2020-09-04 14:38 MS Assigned To Marcello Stanisci => MS
2020-09-07 16:35 MS Note Added: 0016910
2020-09-07 16:35 MS File Added: Screenshot_2020-09-07 Taler Essay Shop Demo.png
2020-09-07 16:36 MS Note Edited: 0016910
2020-09-07 16:36 MS Status assigned => resolved
2020-09-07 16:36 MS Resolution open => fixed
2020-09-07 17:10 Christian Grothoff Fixed in Version => 0.8
2020-09-07 17:10 Christian Grothoff Target Version 0.9 => 0.8
2021-08-24 16:23 Christian Grothoff Status resolved => closed
2024-01-12 14:08 Christian Grothoff Category merchant frontend (donations) => Merchant frontends (Python3)