Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heathcheck error #1

Closed
Bobakos85 opened this issue Dec 20, 2023 · 1 comment
Closed

Heathcheck error #1

Bobakos85 opened this issue Dec 20, 2023 · 1 comment

Comments

@Bobakos85
Copy link

To start with thank you so much for creating the helm chart!

We have noticed however that the probes do not always work causing the deployment to go on a spiral of restarts. After trying to execute the healthcheck.py on the pod itself we got the following error:

ibretranslate@test-libretranslate-6464f57c48-6l57h:/app/scripts$ /app/venv/bin/python healthcheck.py
Traceback (most recent call last):
  File "/app/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 467, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/app/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 462, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/local/lib/python3.10/http/client.py", line 1374, in getresponse
    response.begin()
  File "/usr/local/lib/python3.10/http/client.py", line 318, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.10/http/client.py", line 279, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/local/lib/python3.10/socket.py", line 705, in readinto
    return self._sock.recv_into(b)
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/venv/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/app/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 799, in urlopen
    retries = retries.increment(
  File "/app/venv/lib/python3.10/site-packages/urllib3/util/retry.py", line 550, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/app/venv/lib/python3.10/site-packages/urllib3/packages/six.py", line 770, in reraise
    raise value
  File "/app/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 715, in urlopen
    httplib_response = self._make_request(
  File "/app/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 469, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
  File "/app/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 358, in _raise_timeout
    raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='0.0.0.0', port=5000): Read timed out. (read timeout=60)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/scripts/healthcheck.py", line 3, in <module>
    response = requests.post(
  File "/app/venv/lib/python3.10/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/app/venv/lib/python3.10/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/app/venv/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/app/venv/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/app/venv/lib/python3.10/site-packages/requests/adapters.py", line 578, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='0.0.0.0', port=5000): Read timed out. (read timeout=60)

and this is what we got when the spiral happened:

Traceback (most recent call last):                                                                                                                                                                     
  File "/app/scripts/healthcheck.py", line 3, in <module>                                                                                                                                              
    response = requests.post(                                                                                                                                                                          
  File "/app/venv/lib/python3.10/site-packages/requests/api.py", line 115, in post                                                                                                                     
    return request("post", url, data=data, json=json, **kwargs)                                                                                                                                        
  File "/app/venv/lib/python3.10/site-packages/requests/api.py", line 59, in request                                                                                                                   
    return session.request(method=method, url=url, **kwargs)                                                                                                                                           
  File "/app/venv/lib/python3.10/site-packages/requests/sessions.py", line 587, in request                                                                                                             
    resp = self.send(prep, **send_kwargs)                                                                                                                                                              
  File "/app/venv/lib/python3.10/site-packages/requests/sessions.py", line 701, in send                                                                                                                
    r = adapter.send(request, **kwargs)                                                                                                                                                                
  File "/app/venv/lib/python3.10/site-packages/requests/adapters.py", line 547, in send                                                                                                                
    raise ConnectionError(err, request=request)                                                                                                                                                        
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))                                                                      
  Warning  Unhealthy  17m                   kubelet  Readiness probe errored: rpc error: code = NotFound desc = failed to exec in container: failed to load task: no running task found: task cf4d32c2 
db8a338d1370982b4eb0be7bc18eb2e545a7598fea2ccfa36d1eb82c not found: not found                                                                                                                          
  Warning  Unhealthy  14m (x36 over 118m)   kubelet  Readiness probe failed: command "/app/venv/bin/python /app/scripts/healthcheck.py" timed out                                                      
  Warning  Unhealthy  9m7s (x7 over 100m)   kubelet  Readiness probe failed:                                                                                                                           
  Warning  BackOff    4m19s (x34 over 12m)  kubelet  Back-off restarting failed container libretranslate in pod test-libretranslate-9fc944fc-5zktb_libretranslate(2056e38a-7e6e-4de7-b0a1-486ea3260eae
Copy link

Could we move this conversation over to the forum at https://community.libretranslate.com? 🙏 The forum is the right place to ask questions (we try to keep the GitHub issue tracker for feature requests and bugs only). Thank you! 👍

p.s. I'm just an automated script, not a human being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant