influxdata / influxdata/influxdb
Ambiguous error messages for invalid `--tls-cert` and `--tls-key` args when running in container
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
__Steps to reproduce:__
- Set wrong paths to TLS cert and key in service `environment` in Docker
- Build and start the container with `--tls-key="${KEY}"` and `--tls-cert="${KEY}"`
```sh
/home/influx/.influxdb/influxdb3 serve \
--node-id="$NODE_ID" \
--tls-key="${TLS_KEY}" \
--tls-cert="${TLS_CERT}"
...
```
- InfluxDB gives an ambiguous "No such file or directory" (that's it) error.
__Expected behaviour:__
InfluxDB reports **what** is missing.
__Actual behaviour:__
- InfluxDB does **not** report **what** is missing
- Even in trace mode, `panic_type="unknown"` and no info on what was missing. I know I could have probably check the Rust source file, but it shouldn't be that way. The reason should be known or - if a catch-all route is taken, the effective ENV info should probably be dumped as well if "it could be anything"
__Environment info:__
* Ubuntu 24.04 LTS
* InfluxDB 3 Core (v3.3.0 from .deb package)
* Docker Engine CE 27.4.1
__Config:__
```yaml
influxdb3-core:
container_name: influxdb3-core
image: influxdb:3-core
build:
context: influxdb
dockerfile: Dockerfile
ports:
- "8181:8181"
environment:
S3_ENDPOINT: https://s3:7070
TLS_KEY: /this/mofo/is/not/real/influxdb.key
TLS_CERT: /this/mofo/is/not/real/influxdb.crt
```
__Logs:__
```
influxdb3-core | 2025-08-24T22:42:23.267374Z INFO influxdb3_lib::commands::serve: setting up server with authz disabled for paths paths_without_authz=[]
influxdb3-core | 2025-08-24T22:42:23.267669Z ERROR panic_logging: Thread panic panic_type="unknown" panic_message="called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }" panic_file="influxdb3_server/src/lib.rs" panic_line=436 panic_column=47
influxdb3-core |
influxdb3-core | thread 'main' panicked at influxdb3_server/src/lib.rs:436:47:
influxdb3-core | called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
influxdb3-core | stack backtrace:
influxdb3-core | 2025-08-24T22:42:23.267678Z ERROR panic_logging: Thread panic panic_type="unknown" panic_message="called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }" panic_file="influxdb3_server/src/lib.rs" panic_line=436 panic_column=47
influxdb3-core | 0: 0x60f393aa2f3f - ::fmt::h46a716bba2450163
influxdb3-core | 1: 0x60f38f71cc63 - core::fmt::write::h275e5980d7008551
influxdb3-core | 2: 0x60f393aa248f - std::io::Write::write_fmt::h561a66a0340b6995
influxdb3-core | 3: 0x60f393aa2d93 - std::sys::backtrace::BacktraceLock::print::hafb9d5969adc39a0
influxdb3-core | 4: 0x60f393aa2a9d - std::panicking::default_hook::h3db1b505cfc4eb79
influxdb3-core | 5: 0x60f392dff8b5 - panic_logging::SendPanicsToTracing::new_inner::{{closure}}::h26373894c4685d74
influxdb3-core | 6: 0x60f392dff8b5 - panic_logging::SendPanicsToTracing::new_inner::{{closure}}::h26373894c4685d74
influxdb3-core | 7: 0x60f393aa234a - std::panicking::rust_panic_with_hook::h409da73ddef13937
influxdb3-core | 8: 0x60f393ae29f8 - std::panicking::begin_panic_handler::{{closure}}::h159b61b27f96a9c2
influxdb3-core | 9: 0x60f393ae2959 - std::sys::backtrace::__rust_end_short_backtrace::h5b56844d75e766fc
influxdb3-core | 10: 0x60f393ae430c - __rustc[4794b31dd7191200]::rust_begin_unwind
influxdb3-core | 11: 0x60f38ec7c51f - core::panicking::panic_fmt::hc8737e8cca20a7c8
influxdb3-core | 12: 0x60f38ec7ca25 - core::result::unwrap_failed::h727108008d9f4c9b
influxdb3-core | 13: 0x60f391f1dbb9 - influxdb3_server::setup_tls::hf26460e312819c1b
influxdb3-core | 14: 0x60f391c20448 - as core::future::future::Future>::poll::he49e67fa3c79fa45
influxdb3-core | 15: 0x60f3919fd487 - influxdb3_lib::commands::serve::command::{{closure}}::{{closure}}::{{closure}}::hcfa8260fb45b435b
influxdb3-core | 16: 0x60f3919fd15b - as core::future::future::Future>::poll::h30e0b1ce0991c471
influxdb3-core | 17: 0x60f391912128 - influxdb3_lib::commands::serve::command::{{closure}}::hf8efad53cf8190d9.138657
influxdb3-core | 18: 0x60f3918f0974 - influxdb3_lib::startup::{{closure}}::hf890e67e81aa6b54.138649
influxdb3-core | 19: 0x60f391a7fbaf - influxdb3_lib::startup::he03a01fd41b027d0
influxdb3-core | 20: 0x60f38ed4ae9d - influxdb3::main::hf84efb1ac1673b40
influxdb3-core | 21: 0x60f38ed4aa56 - std::sys::backtrace::__rust_begin_short_backtrace::hb89aeef1dbd9c189
influxdb3-core | 22: 0x60f38ed4a857 - std::rt::lang_start::{{closure}}::he83998ffa97a56e0
influxdb3-core | 23: 0x60f393acd6e1 - std::rt::lang_start_internal::ha8ef919ae4984948
influxdb3-core | 24: 0x60f38ed4aff2 - main
influxdb3-core | 25: 0x7865e6b6024a -
influxdb3-core | 26: 0x7865e6b60305 - __libc_start_main
influxdb3-core | 27: 0x60f38ed4a739 - _start
influxdb3-core | 28: 0x0 -
```
Contributor guide
Assessment
This issue has not been assessed yet.