Troubleshooting
The failures the lab met for real, in roughly the order a new user meets them. Transcripts are named per entry.
The write that never comes back
You ran influx write --file … and
the prompt never returned — yet
querying from another shell shows the
points landed. The CLI is not hung; it
is listening: influx write also
reads standard input, and where stdin
is held open (a script harness, some
CI runners, an exec wrapper) it waits
for input that is not coming. The
data was written in the first second.
Fix: redirect stdin from /dev/null
for file writes, or be deliberate and
pipe the data as the input. The lab
confirmed this with both the 2.9.1 and
2.7.5 clients before believing it
(t02 tells the story in its command
lines).
401, 403, 404 — which "no" is it?
Three refusals that look alike in a
log and mean different things
(t04, t06):
- 401 Unauthorized — the token is
missing, wrong, or belongs to another
instance. Check the config
(
influx config ls) and that you are talking to the server the token was minted on. After a restore, remember the instance's identity may be the backup's now. - 403 Forbidden, "insufficient
permissions" — the token is genuine
and known, and lacks the power.
influx auth lsshows exactly which powers it holds; grant the missing one or re-mint, do not reach for the operator token as a shortcut. - 404 "could not find bucket" — the bucket may exist and still be invisible to this token. Scoped tokens make other buckets look nonexistent by design.
The 422 partial write
Your batch "failed" and yet most of it
is in the bucket. Retention refused
the too-old points and the server
dropped them individually, exiting 1
(t05). Read the message: it names
each dropped point and the exact
lower bound. The fixes are to shorten
your expectations (the data is older
than the bucket's memory) or lengthen
the bucket (raise its retention) —
and the process fix is to check exit
codes, because a partial write looks
exactly like success to anything that
does not.
The restore that stops at the SQL stage
influx restore --full into a fresh
instance restored the metadata and
then died with 401 at the SQL snapshot
(t08). You did not mistype anything:
the restore replaced the instance's
identity mid-flight, retiring the
throwaway token it was running under.
Run it again with the backup's
operator token (the original config)
and it completes. Verify by counting
points, not by listing buckets — the
halfway state lists perfectly and
contains nothing.
"Invalid boolean" on a line that has no boolean
Line protocol guessed your field's
type from its shape: an unquoted word
is read as a boolean, a word with a
space in the wrong place rearranges
the whole line (t04). Quote strings
("hot"), suffix integers (57i),
and read the server's message — it
quotes your exact line back. If the
field already holds numbers, a string
will be refused as a type conflict:
types are per field, per measurement,
and permanent once set.
Points in the wrong decade
Your data is at 1970, or at a date
years out: the precision did not
match the stamp. Seconds written as
the default nanoseconds shrink to
1970; nanoseconds declared as seconds
fly far into the future. Declare
--precision to match what your
producer emits (t02), and check with
a range query wide enough to confess —
range(start: 0) over one series
shows where the points actually live.
The count is half what you wrote
Before suspecting loss, check the
range: range(start: -1h) means
the last hour, and a fixture generated
an hour ago has quietly left the
window. The lab's own counts were run
minutes after their writes for this
reason. Widen the range, then doubt.