Troubleshooting
Entries titled by the error text you see, with the cause and the fix.
Verified against v1.0.0-rc.1 · sources
On this page
- Sending logs to the gate
- 401 {"error":"bad token"}
- 429 {"error":"wal full","reason":"quota"} or "reason":"disk"
- 429 {"error":"too many streams for token"}
- 400 bad X-Drillo-Stream (want [A-Za-z0-9._-]{1,64})
- 400 bad gzip or bad snappy
- Events land in 1970 or at the receive time
- CQL query errors
- unterminated string
- unbalanced ')'
- unknown stage '<x>' (expected where, stats, timechart, top, rare, sort, limit, fields)
- unknown aggregate '<x>' (expected one of count, count_if, dc, sum, avg, min, max, p50, p90, p95, p99)
- <f>() needs a field
- invalid field name '<x>'
- expected integer 1..10000
- bad duration (e.g. 30s, 5m, 1h, 1d; max 30d)
- source= must be the first term of the query
- only one of stats/timechart/top/rare per query
- free-text search only works on source=events (use field=value for source=<name>)
- '<f>' is a time field: use the time picker
- query nested too deeply
Search this page for the exact text of your error. Gate answers come from crates/gate/src/main.rs; CQL messages come from the compiler in crates/cql/src/lib.rs, which returns a 0-based byte offset pos with each message (the API answers 400 with position).
Sending logs to the gate#
401 {"error":"bad token"}#
The bearer token is missing or not in DRILLO_GATE_TOKENS. Send Authorization: Bearer <TOKEN>. The tenant comes from the token, never from the payload. See Ingest overview.
429 {"error":"wal full","reason":"quota"} or "reason":"disk"#
The gate's write-ahead log hit its quota or the disk is full. Nothing was acknowledged, so nothing from this batch is stored. The answer carries Retry-After: 1. Keep shipper retry and buffering on, and free disk or raise the WAL quota.
429 {"error":"too many streams for token"}#
This token already used DRILLO_MAX_STREAMS_PER_TOKEN (default 64) distinct X-Drillo-Stream names. Reuse existing stream names.
400 bad X-Drillo-Stream (want [A-Za-z0-9._-]{1,64})#
The stream header has characters outside [A-Za-z0-9._-] or is longer than 64. Rename the stream.
400 bad gzip or bad snappy#
The body does not decode with the declared Content-Encoding. gzip works on all routes, snappy only for Loki protobuf, zstd is not accepted.
Events land in 1970 or at the receive time#
Not an error message, but a common surprise. ts must be epoch milliseconds. Epoch seconds are read as milliseconds (1970). RFC3339 strings are not parsed and get the receive time. See Ingest overview.
CQL query errors#
unterminated string#
A " has no closing quote. Close it, or escape an inner quote with \".
unbalanced ')'#
Parentheses do not pair up. Count ( and ) in the search expression.
unknown stage '<x>' (expected where, stats, timechart, top, rare, sort, limit, fields)#
The word after | is not a CQL stage. The stage list is closed. See Not supported.
unknown aggregate '<x>' (expected one of count, count_if, dc, sum, avg, min, max, p50, p90, p95, p99)#
Use one of the listed functions inside stats or timechart.
<f>() needs a field#
Aggregates other than count() and count_if() need a field, for example avg(duration_ms).
invalid field name '<x>'#
The field name has characters CQL does not accept. Check the field list in the CQL reference.
expected integer 1..10000#
limit, top and rare take a whole number from 1 to 10000.
bad duration (e.g. 30s, 5m, 1h, 1d; max 30d)#
The span= value is not a duration, or is longer than 30 days.
source= must be the first term of the query#
Move source=<name> to the start, for example source=gaps | stats count().
only one of stats/timechart/top/rare per query#
Keep one aggregating stage. Use where, sort, limit or fields around it.
free-text search only works on source=events (use field=value for source=<name>)#
Other sources take field filters only. Write field=value instead of a bare word.
'<f>' is a time field: use the time picker#
The time range never goes in query text. Set it with the time picker or the API from and to fields.
query nested too deeply#
Too many nested parentheses. Flatten the expression.