influxdata/influxdb · error · Error::MoreThanOne
ensure that a single protocol line string is provided as…
Error message
ensure that a single protocol line string is provided as the final argument, enclosed in quotes
What it means
The influxdb3 `write` command's `MoreThanOne` variant fires when more than one positional argument is given. The command accepts exactly one line protocol string as the final argument, so extra arguments are ambiguous.
Solutions
- Enclose the whole LP string in single quotes so it is one argument
- Move multiple lines into a file and use `--file <path>`
- Pipe multiple lines via stdin
Example fix
// before influxdb3 write --database my-db cpu,host=a usage=0.5 // after influxdb3 write --database my-db 'cpu,host=a usage=0.5'
Defensive patterns
Strategy: validation
Validate before calling
// shell guard if (( $# > 1 )); then echo "pass exactly one quoted line protocol string; use --file for multiple lines" >&2; exit 1 fi
Prevention
- Always single-quote LP strings containing spaces
- Batch multiple LP lines via --file or stdin
- Quote variables: "$LP" not $LP
When it happens
Trigger: Running `influxdb3 write --database db 'm1 v=1' 'm2 v=2'` or an unquoted LP string whose spaces split it into multiple shell words.
Common situations: Forgetting quotes around line protocol containing spaces; passing multiple LP lines expecting batching (must use a file or stdin instead).
Understand the failure class
Background: "Unknown argument", "Invalid value", and "must be one of": invalid CLI argument errors explained — this error's family across 35 libraries.
Related errors
- No input from stdin detected, no string was passed in, and…
- no line protocol string provided
- is not a valid data type, values are int64, uint64…
- All `DataPoints` must have at least one field. Builder…
- At least one field is required
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/e8d0b1df22f6b8a9.
Report an issue: GitHub.
Appendix: source
Thrown at influxdb3_commands/src/write.rs:44
/// 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 config
#[clap(flatten)]
influxdb3_config: InfluxDb3Config,
/// Override host URL for write operations
#[clap(long = "write-host", env = "INFLUXDB3_WRITE_HOST_URL")]
write_host_url: Option<Url>,View on GitHub (pinned to 06200ef96b)