k8s-at-home / charts

⚠️ Deprecated : Helm charts for applications you run at home
https://docs.k8s-at-home.com
Apache License 2.0
1.45k stars 623 forks source link

[speedtest] speedtest-influxdb connection refused #1626

Open Rahulsharma0810 opened 2 years ago

Rahulsharma0810 commented 2 years ago

Helm chart name

speedtest

Helm chart version

3.0.4

Container name

atribe/speedtest-for-influxdb-and-grafana

Container tag

latest

Description

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/src/influxspeedtest/InfluxdbSpeedtest.py", line 41, in _get_influx_connection
    influx.get_list_users()  # TODO - Find better way to test connection and permissions
  File "/usr/local/lib/python3.7/site-packages/influxdb/client.py", line 769, in get_list_users
    return list(self.query("SHOW USERS").get_points())
  File "/usr/local/lib/python3.7/site-packages/influxdb/client.py", line 416, in query
    expected_response_code=expected_response_code
  File "/usr/local/lib/python3.7/site-packages/influxdb/client.py", line 267, in request
    timeout=self._timeout
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='speedtest-influxdb', port=8086): Max retries exceeded with url: /query?q=SHOW+USERS&db=speedtests (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f97311c22d0>: Failed to establish a new connection: [Errno 111] Connection refused'))

Expected result

Speedtest pod should be connected to influx service.

Helm values to reproduce

env:
  # -- Set the container timezone
  TZ: Asia/Kolkata

metrics:
  # -- Enable and configure a Prometheus serviceMonitor for the chart under this key.
  # @default -- See values.yaml
  enabled: true

  # -- Enable and configure Prometheus Rules for the chart under this key.
  # @default -- See values.yaml
  prometheusRule:
    enabled: true
    # -- Download speed you want alerts to be triggered in Mbps
    downloadLimit: 50
    # -- Upload speed you want alerts to be triggered in Mbps
    uploadLimit: 50
    # -- Ping latency you want alerts to be triggered in ms
    pingLimit: 10
    # -- Jitter latency you want alerts to be triggered in ms
    jitterLimit: 30

Additional Information

❯ k get all
NAME                                      READY   STATUS             RESTARTS      AGE
pod/speedtest-56844fd95f-txxsj            0/1     CrashLoopBackOff   6 (16s ago)   7m6s
pod/speedtest-influxdb-6745b8999b-gvhx4   1/1     Running            0             7m6s

NAME                         TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)             AGE
service/speedtest-influxdb   ClusterIP   10.98.252.33   <none>        8086/TCP,8088/TCP   7m7s

NAME                                 READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/speedtest            0/1     1            0           7m7s
deployment.apps/speedtest-influxdb   1/1     1            1           7m7s

NAME                                            DESIRED   CURRENT   READY   AGE
replicaset.apps/speedtest-56844fd95f            1         1         0       7m7s
replicaset.apps/speedtest-influxdb-6745b8999b   1         1         1       7m7s

Tested port influx service port via telnet

❯ k port-forward svc/speedtest-influxdb 8086:8086
Forwarding from 127.0.0.1:8086 -> 8086
Forwarding from [::1]:8086 -> 8086
Handling connection for 8086

❯ telnet 127.0.0.1 8086
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
ghost commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two weeks if no further activity occurs. Thank you for your contributions.