docs/sources/datasources/influxdb/troubleshooting/index.md
This document provides solutions to common issues you may encounter when configuring or using the InfluxDB data source. Issues are organized to follow the typical setup and usage workflow. For configuration instructions, refer to Configure the InfluxDB data source.
The following errors occur when Grafana can't establish or maintain a connection to InfluxDB.
Symptoms:
Possible causes and solutions:
| Cause | Solution |
|---|---|
| Platform outage | If all InfluxDB panels fail at the same time, check the Grafana Cloud status page for active incidents before investigating your own configuration. The issue may be a transient platform problem that resolves without customer-side action. |
| Authentication failure | Check the Grafana server logs for auth-related errors. Verify your credentials haven't expired or been rotated. |
| Transient network issue | The error may self-resolve. Wait a few minutes and retry Save & test. If the issue persists, check network connectivity between Grafana and InfluxDB. |
Error message: error performing influxQL query or error performing flux query or error performing sql query
Cause: Grafana can't establish a network connection to the InfluxDB server.
Solution:
http:// or https://).8086).Error message: socks connect tcp ... -> influxdb.host:8086: dial tcp: lookup ... no such host
Cause: When using Private data source connect (PDC), the InfluxDB URL can't be resolved through the SOCKS proxy tunnel.
Solution:
127.0.0.1 or localhost as the InfluxDB URL. PDC tunnels traffic over a SOCKS proxy, which can't resolve loopback addresses.Error message: context deadline exceeded or request timeout or dial tcp <IP>:<port>: i/o timeout
Cause: The connection to InfluxDB timed out before receiving a response. This is common after Grafana upgrades when infrastructure changes (such as database host migrations) happen at the same time.
Solution:
The following errors occur when there are issues with authentication credentials or permissions.
Error message: "401 Unauthorized" or "authorization failed"
Cause: The authentication credentials are invalid or missing.
Solution:
Authorization header with the value Token <your-token>.Error message: "403 Forbidden" or "access denied"
Cause: The authenticated user or token doesn't have permission to access the requested resource.
Solution:
The following errors occur when the data source is not configured correctly.
Error message: missing URL from datasource configuration
Cause: The data source URL field is empty.
Solution:
http://localhost:8086).Error message: "unknown influx version"
Cause: The query language is not properly configured in the data source settings.
Solution:
| InfluxDB version | Recommended query language | Notes |
|---|---|---|
| 1.x | InfluxQL | Flux is available from 1.8+ but InfluxQL is the primary language. |
| 2.x (OSS/Cloud) | Flux | InfluxQL is also available via the v1 compatibility API, but requires DBRP mapping. |
| 3.x / Cloud Dedicated / Cloud Serverless | SQL or InfluxQL | Flux is not supported on InfluxDB 3.x. |
Each query language uses a different API endpoint. If you select the wrong language for your InfluxDB version, health checks and queries fail.
Error message: invalid data source info received
Cause: The data source configuration is incomplete or corrupted.
Solution:
Error message: "database not found" or queries return no data with InfluxQL on InfluxDB 2.x
Cause: InfluxQL queries on InfluxDB 2.x require a Database and Retention Policy (DBRP) mapping.
Solution:
Error message: Direct browser access in the InfluxDB datasource is no longer available. Switch to server access mode.
Cause: The data source is configured for direct browser access, which is no longer supported.
Solution:
Symptoms:
net::ERR_ABORTED on proxy requestsCause: You're running an outdated version of Grafana. Browser access mode was removed in Grafana 9.2.0, and older versions may attempt direct browser connections that violate CSP policies.
Solution:
The following errors occur when clicking Save & test to validate the data source connection. Each query language uses a different health check query.
"error performing flux query"
Cause: The health check query buckets() failed to execute.
Solution:
"error reading buckets"
Cause: The buckets() query executed but returned an error.
Solution:
"error getting flux query buckets"
Cause: The buckets() query executed without error but returned no data.
Solution:
"error performing influxQL query"
Cause: The health check query SHOW MEASUREMENTS failed to execute.
Solution:
"error reading influxDB"
Cause: The SHOW MEASUREMENTS query executed but returned an error.
Solution:
SHOW MEASUREMENTS."error connecting InfluxDB influxQL"
Cause: The health check completed but the response couldn't be processed.
Solution:
SHOW MEASUREMENTS."error performing sql query"
Cause: The health check query select 1 failed to execute against the FlightSQL endpoint.
Solution:
Error message: datasource is working. 0 measurements found
Cause: The connection is successful, but the database contains no measurements.
Solution:
The following errors occur when there are issues with query syntax or execution.
Error message: "error parsing query: found THING" or "failed to parse query: found WERE, expected ; at line 1, char 38"
Cause: The query contains invalid syntax.
Solution:
Check your query syntax for typos or invalid keywords.
For InfluxQL, verify the query follows the correct syntax:
SELECT <field> FROM <measurement> WHERE <condition>
For SQL, verify your query uses standard SQL syntax supported by InfluxDB 3.x. Common issues include using InfluxQL-specific syntax (such as GROUP BY time()) in SQL mode. Refer to the InfluxDB SQL reference for supported functions.
For Flux, ensure proper pipe-forward syntax and function calls.
Use the InfluxDB UI or CLI to test your query directly.
Error message: "query-timeout limit exceeded"
Cause: The query took longer than the configured timeout limit in InfluxDB.
Solution:
Error message: "max-series-per-database limit exceeded" or "A query returned too many data points and the results have been truncated"
Cause: The query is returning more data than the configured limits allow.
Solution:
$__dateBin(time) to aggregate data into time buckets and reduce cardinality.aggregateWindow() to downsample data.Error message: Messages prefixed with "flightsql: " followed by a gRPC error description.
Cause: The SQL (FlightSQL) backend encountered an error communicating with InfluxDB 3.x.
Possible causes and solutions:
| Error code | Cause | Solution |
|---|---|---|
InvalidArgument | The SQL query syntax is invalid. | Check your SQL query for syntax errors. |
PermissionDenied | The token doesn't have access to the requested resource. | Verify the token has read access to the database. |
NotFound | The requested table or database doesn't exist. | Check the database name and table name in your query. |
Unavailable | The InfluxDB server is unreachable. | Verify InfluxDB is running and the URL is correct. |
Unauthenticated | The token is missing, invalid, or expired. | Update the token in the data source configuration. |
Error message: "no time column found"
Cause: The query result doesn't include a time column, which is required for time-series visualization.
Solution:
_time in the output.The following errors occur when using InfluxDB annotations on dashboards.
Cause: The annotation query field is empty.
Solution:
Navigate to Dashboard settings > Annotations.
Select the InfluxDB annotation.
Enter a valid query in the InfluxQL Query field. The query must include WHERE $timeFilter. For example:
SELECT title, description FROM events WHERE $timeFilter ORDER BY time ASC
Cause: A Flux data source is using the legacy InfluxQL annotation editor instead of the standard Flux query editor.
Solution:
Delete the existing annotation query.
Create a new annotation query and select your Flux-configured InfluxDB data source.
Write a Flux query that returns data frames with time and text fields. For example:
from(bucket: "events")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "deployments")
Cause: Annotations are configured but aren't visible on the dashboard.
Solution:
WHERE $timeFilter.The following errors occur when using InfluxDB queries with Grafana Alerting.
Cause: The alert query contains template variables such as $hostname or $region.
Solution:
Alert queries can't use template variables because Grafana evaluates alert rules on the backend without dashboard context. Replace template variables with hard-coded values:
$variable references with literal values.If you need the same query in both a dashboard panel and an alert rule, maintain two separate queries: one with variables for the dashboard and one with hard-coded values for alerting.
Cause: The alert query doesn't return time-series data that Grafana can evaluate.
Solution:
mean, sum, count) with GROUP BY time($__interval).aggregateWindow() to produce time-bucketed results.$__dateBin(time) or $__timeGroup(time) to aggregate by time.The following issues don't produce specific error messages but are commonly encountered during day-to-day use.
Symptoms:
Cause: Dashboard panels reference an old or deleted data source UID. This happens when a data source is deleted and recreated, since the new data source gets a different UID.
Solution:
Error message: "404 Not Found" when Telegraf writes to the Grafana Cloud InfluxDB-compatible endpoint.
Cause: The Telegraf influxdb_v2 output plugin isn't compatible with the Grafana Cloud metrics endpoint. This commonly occurs when using PrivateLink or the standard InfluxDB-compatible write endpoint.
Solution:
influxdb_v2 to influxdb (v1) in your Telegraf configuration.Cause: The query returns no data.
Solution:
$__timeFilter(time) macro is included so the query uses the dashboard time range.Cause: Queries take a long time to execute.
Solution:
$__dateBin(time) with aggregation functions to downsample data. Add WHERE clauses to narrow the query scope.aggregateWindow() to downsample data before visualization.Cause: The visualization doesn't show the most recent data.
Solution:
To capture detailed error information for troubleshooting:
Set the Grafana log level to debug in the configuration file:
[log]
level = debug
Review logs in /var/log/grafana/grafana.log (or your configured log location).
Look for InfluxDB-specific entries that include request and response details.
Reset the log level to info after troubleshooting to avoid excessive log volume.
If you've tried the solutions in this guide and still encounter issues: