SmartCambridge / tfc_web

Web access to the TFC platform
MIT License
3 stars 2 forks source link

Internal Server Error: /smartpanel/station_board/2 #302

Closed jw35 closed 5 years ago

jw35 commented 5 years ago

This appears to be the result of a failure to contact the National Rail timetable service. It's not clear that this should throw an exception though it clearly needs to be logged.

Internal Server Error: /smartpanel/station_board/2

ConnectionError at /smartpanel/station_board/2
HTTPSConnectionPool(host='lite.realtime.nationalrail.co.uk', port=443): Max retries exceeded with url: /OpenLDBWS/ldb11.asmx (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f0ce1abf0f0>: Failed to establish a new connection: [Errno 113] No route to host',))

Traceback:  

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/urllib3/connection.py" in _new_conn
 141.                 (self.host, self.port), self.timeout, **extra_kw)

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/urllib3/util/connection.py" in create_connection
 83.         raise err

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/urllib3/util/connection.py" in create_connection
 73.             sock.connect(sa)

     During handling of the above exception ([Errno 113] No route to host), another exception occurred:

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/urllib3/connectionpool.py" in urlopen
 601.                                                   chunked=chunked)

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/urllib3/connectionpool.py" in _make_request
 346.             self._validate_conn(conn)

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/urllib3/connectionpool.py" in _validate_conn
 850.             conn.connect()

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/urllib3/connection.py" in connect
 284.         conn = self._new_conn()

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/urllib3/connection.py" in _new_conn
 150.                 self, "Failed to establish a new connection: %s" % e)

     During handling of the above exception (<urllib3.connection.VerifiedHTTPSConnection object at 0x7f0ce1abf0f0>: Failed to establish a new connection: [Errno 113] No route to host), another exception occurred:

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/requests/adapters.py" in send
 449.                     timeout=timeout

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/urllib3/connectionpool.py" in urlopen
 639.                                         _stacktrace=sys.exc_info()[2])

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/urllib3/util/retry.py" in increment
 388.             raise MaxRetryError(_pool, url, error or ResponseError(cause))

     During handling of the above exception (HTTPSConnectionPool(host='lite.realtime.nationalrail.co.uk', port=443): Max retries exceeded with url: /OpenLDBWS/ldb11.asmx (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f0ce1abf0f0>: Failed to establish a new connection: [Errno 113] No route to host',))), another exception occurred:

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/django/core/handlers/exception.py" in inner
 41.             response = get_response(request)

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/django/core/handlers/base.py" in _legacy_get_response
 249.             response = self._get_response(request)

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
 187.                 response = self.process_exception_by_middleware(e, request)

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
 185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/home/tfc_prod/tfc_web/tfc_web/smartpanel/views/widgets/station_board.py" in station_board
 46.                 timeOffset=offset

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/zeep/client.py" in __call__
 45.             self._op_name, args, kwargs)

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/zeep/wsdl/bindings/soap.py" in send
 113.             options['address'], envelope, http_headers)

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/zeep/transports.py" in post_xml
 95.         return self.post(address, message, headers)

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/zeep/transports.py" in post
 67.             timeout=self.operation_timeout)

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/requests/sessions.py" in post
 572.         return self.request('POST', url, data=data, json=json, **kwargs)

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/requests/sessions.py" in request
 524.         resp = self.send(prep, **send_kwargs)

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/requests/sessions.py" in send
 637.         r = adapter.send(request, **kwargs)

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/requests/adapters.py" in send
 516.             raise ConnectionError(e, request=request)

Exception Type: ConnectionError at /smartpanel/station_board/2
Exception Value: HTTPSConnectionPool(host='lite.realtime.nationalrail.co.uk', port=443): Max retries exceeded with url: /OpenLDBWS/ldb11.asmx (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f0ce1abf0f0>: Failed to establish a new connection: [Errno 113] No route to host',))
jw35 commented 5 years ago

An another cause of the same error:

Internal Server Error: /smartpanel/station_board/2

Fault at /smartpanel/station_board/2
Unexpected server error

Traceback:  

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/django/core/handlers/exception.py" in inner
 41.             response = get_response(request)

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/django/core/handlers/base.py" in _legacy_get_response
 249.             response = self._get_response(request)

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
 187.                 response = self.process_exception_by_middleware(e, request)

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
 185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/home/tfc_prod/tfc_web/tfc_web/smartpanel/views/widgets/station_board.py" in station_board
 46.                 timeOffset=offset

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/zeep/client.py" in __call__
 45.             self._op_name, args, kwargs)

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/zeep/wsdl/bindings/soap.py" in send
 121.         return self.process_reply(client, operation_obj, response)

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/zeep/wsdl/bindings/soap.py" in process_reply
 186.             return self.process_error(doc, operation)

File "/home/tfc_prod/tfc_web_venv/lib/python3.5/site-packages/zeep/wsdl/bindings/soap.py" in process_error
 291.             detail=fault_node.find('detail'))

Exception Type: Fault at /smartpanel/station_board/2
Exception Value: Unexpected server error