{"record":{"id":"6a09442a116db520","repo":"getredash/redash","slug":"influxdb-is-not-healthy-check-logs-for-more-infor","errorCode":null,"errorMessage":"InfluxDB is not healthy. Check logs for more information.","messagePattern":"InfluxDB is not healthy\\. Check logs for more information\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"redash/query_runner/influx_db_v2.py","lineNumber":138,"sourceCode":"    def test_connection(self) -> None:\n        \"\"\"\n        Tests the healthiness of the influxdb instance. If it is not healthy,\n        it logs an error message and raises an exception with an appropriate\n        message.\n        :raises Exception: If the remote influxdb instance is not healthy.\n        \"\"\"\n        try:\n            influx_kwargs = self._get_influx_kwargs()\n            with InfluxDBClient(\n                url=self.configuration[\"url\"],\n                token=self.configuration[\"token\"],\n                org=self.configuration[\"org\"],\n                **influx_kwargs,\n            ) as client:\n                healthy = client.health()\n                if healthy.status == \"fail\":\n                    logger.error(\"Connection test failed, due to: \" f\"{healthy.message!r}.\")\n                    raise Exception(\"InfluxDB is not healthy. Check logs for more \" \"information.\")\n        except Exception:\n            raise\n        finally:\n            self._cleanup_cert_files(influx_kwargs)\n\n    def _get_type(self, type_: str) -> str:\n        \"\"\"\n        Determines the internal type of a passed data type which the database\n        uses.\n        :param type_: The type from the database to map to internal datatype.\n        :return: The name of the internal datatype.\n        \"\"\"\n        return TYPES_MAP.get(type_, \"string\")\n\n    def _get_data_from_tables(self, tables: Any) -> Dict:\n        \"\"\"\n        Determines the data of the given tables in an appropriate schema for\n        redash ui to render it. It retrieves all available columns and records","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/getredash/redash/blob/ca79fe988d81cdac9675b412f3dfcab107bc1fbc/redash/query_runner/influx_db_v2.py#L120-L156","documentation":"test_connection for InfluxDB v2 creates a client and calls client.health(); when the health check's status is 'fail' it logs the health message and raises this exception directing you to the logs. The real reason (auth failure, wrong URL/port, bad token) appears only in the logged health message.","triggerScenarios":"Testing the data source when the InfluxDB v2 URL, port, token, or org is wrong, the bucket/server is unreachable, or the health endpoint returns fail (e.g. InfluxDB 1.x without v2 compat at that URL).","commonSituations":"Using an InfluxDB 1.8 URL with the v2 runner, expired/invalid API token, TLS mismatch (self-signed cert without enabling the cert option), wrong port (8086 vs 8088).","solutions":["Check the Redash worker logs for the 'Connection test failed, due to:' line — it contains the actual health message","Verify url (e.g. http://host:8086), token, and org against influx CLI: influx ping / influx health","If server uses self-signed TLS, enable the data source's SSL/certificate option or provide the CA cert","For InfluxDB 1.x use the InfluxDB (v1) query runner instead of influx_db_v2"],"exampleFix":"// before\nurl = \"http://influx.example.com:8088\"\n// after\nurl = \"http://influx.example.com:8086\"","handlingStrategy":"try-catch","validationCode":"import requests\n\ndef influx_health_ok(url) -> bool:\n    try:\n        r = requests.get(f\"{url}/health\", timeout=5)\n        return r.ok and r.json().get(\"status\") in (\"pass\", \"ok\")\n    except Exception:\n        return False","typeGuard":null,"tryCatchPattern":"try:\n    runner.test_connection()\nexcept Exception as e:\n    if \"InfluxDB is not healthy\" in str(e):\n        read_worker_log_health_message()  # contains the real reason","preventionTips":["Confirm url/token/org with `influx health` from the Redash host","Use the v2 runner only for InfluxDB 2.x / 1.8+ compat API","Configure TLS/cert options for self-signed environments"],"tags":["influxdb","health-check","connection","configuration"],"backgroundTag":"health-check-failed","analyzedSha":"ca79fe988d81cdac9675b412f3dfcab107bc1fbc","analyzedAt":"2026-08-28T18:32:34.637Z","schemaVersion":2},"datasetVersion":"2026-08-28T21:17:43.275Z"}