influxdata/influxdb · error · Error::NoInput
No input from stdin detected, no string was passed in, and…
Error message
No input from stdin detected, no string was passed in, and no file path was given
What it means
The influxdb3 `write` command's `NoInput` variant fires when no line protocol input was provided: no positional string, no data on stdin, and no `--file` path. The command cannot write anything to the server without input.
Solutions
- Pass the line protocol as the final quoted argument: `influxdb3 write --database my-db 'm,t=a v=1'`
- Pipe LP via stdin: `cat data.lp | influxdb3 write --database my-db`
- Use `--file <path>` with a non-empty line protocol file
Example fix
// before influxdb3 write --database my-db // after influxdb3 write --database my-db 'cpu,host=a usage=0.5'
Defensive patterns
Strategy: validation
Validate before calling
// shell guard
if [[ -z "$LP_STRING" && ! -s "${LP_FILE:-}" && ! -p /dev/stdin ]]; then
echo "no line protocol input: pass string, --file, or stdin" >&2; exit 1
fi Prevention
- Default to an explicit --file in automated scripts
- Verify piped files are non-empty
- Keep LP strings quoted
When it happens
Trigger: Running `influxdb3 write --database <db>` with no LP string argument, empty stdin, and no `--file` flag.
Common situations: Empty piped file (`cat empty.lp | influxdb3 write ...`); forgotten quoted LP string; misordered arguments so the LP string is consumed as a flag value.
Understand the failure class
Background: "no subcommand specified" and "... is required": CLI errors when a required argument is missing — this error's family across 13 libraries.
Related errors
- No input from stdin detected, no string was passed in, and…
- ensure that a single protocol line string is provided as…
- no line protocol string provided
- is not a valid data type, values are int64, uint64…
- All `DataPoints` must have at least one field. Builder…
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/6ad8265c43c98163.
Report an issue: GitHub.
Appendix: source
Thrown at influxdb3_commands/src/write.rs:38
use url::Url;
/// Default per-request body size cap. Matches the server's default
/// `--max-http-request-size` so a `write` command piped from a generator
/// that produces a stream larger than 10 MiB still succeeds out of the box.
const DEFAULT_MAX_REQUEST_SIZE: usize = 10 * 1024 * 1024;
/// Size of each blocking `read()` from the input source (file / stdin).
const READ_SIZE: usize = 4 * 1024 * 1024;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error(transparent)]
Client(#[from] influxdb3_client::Error),
#[error("error reading file: {0}")]
Io(#[from] io::Error),
#[error("No input from stdin detected, no string was passed in, and no file path was given")]
NoInput,
#[error("no line protocol string provided")]
NoLine,
#[error(
"ensure that a single protocol line string is provided as the final \
argument, enclosed in quotes"
)]
MoreThanOne,
}
pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, Parser)]
#[clap(visible_alias = "w", trailing_var_arg = true)]
pub struct Config {
/// Common InfluxDB 3 server configView on GitHub (pinned to 06200ef96b)