thoth-station / result-api

API service that handles data storing in project Thoth
https://thoth-station.github.io/
GNU General Public License v3.0
0 stars 5 forks source link

ConnectionError: HTTPConnectionPool(host='result-api', port=80): Max retries exceeded with url: /api/v1/adviser-re... #363

Closed sentry-io[bot] closed 4 years ago

sentry-io[bot] commented 4 years ago

Sentry Issue: THOTH-1NFK

gaierror: [Errno -2] Name or service not known
  File "urllib3/connection.py", line 157, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "urllib3/util/connection.py", line 61, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "socket.py", line 745, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):

NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f13f3dc5eb8>: Failed to establish a new connection: [Errno -2] Name or service not known
(4 additional frame(s) were not displayed)
...
  File "http/client.py", line 1249, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "http/client.py", line 1036, in _send_output
    self.send(msg)
  File "http/client.py", line 974, in send
    self.connect()
  File "urllib3/connection.py", line 184, in connect
    conn = self._new_conn()
  File "urllib3/connection.py", line 169, in _new_conn
    self, "Failed to establish a new connection: %s" % e

MaxRetryError: HTTPConnectionPool(host='result-api', port=80): Max retries exceeded with url: /api/v1/adviser-result (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f13f3dc5eb8>: Failed to establish a new connection: [Errno -2] Name or service not known',))
  File "requests/adapters.py", line 449, in send
    timeout=timeout
  File "urllib3/connectionpool.py", line 720, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "urllib3/util/retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))

ConnectionError: HTTPConnectionPool(host='result-api', port=80): Max retries exceeded with url: /api/v1/adviser-result (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f13f3dc5eb8>: Failed to establish a new connection: [Errno -2] Name or service not known',))
(11 additional frame(s) were not displayed)
...
  File "requests/api.py", line 116, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
harshad16 commented 4 years ago

The ~workload operator~ thoth-common is scheduling adviser jobs in thoth-prod-tensorflow rather in thoth-backend-stage namespace :disappointed: It is failing as there is no result-api to pass the results too.

fridex commented 4 years ago

The ~workload operator~ thoth-common is scheduling adviser jobs in thoth-prod-tensorflow rather in thoth-backend-stage namespace It is failing as there is no result-api to pass the results too.

We should be using argo workflows so result API should not be used CC @pacospace

pacospace commented 4 years ago

User-API in stage has THOTH_USE_ARGO set to 1, so workload-operator should not be used.

harshad16 commented 4 years ago

Closing the issue, as it doesn't occur anymore.