{"record":{"id":"b1edbfc4e0863135","repo":"denoland/deno","slug":"invalid-vsock-addr-b1edbf","errorCode":null,"errorMessage":"invalid vsock addr","messagePattern":"invalid vsock addr","errorType":"exception","errorClass":"AnyError","httpStatus":null,"severity":"error","filePath":"ext/telemetry/lib.rs","lineNumber":817,"sourceCode":"      } else if let Ok(addr) = std::env::var(\"OTEL_DENO_VSOCK\") {\n        #[cfg(not(any(\n          target_os = \"android\",\n          target_os = \"linux\",\n          target_os = \"macos\"\n        )))]\n        {\n          let _ = addr;\n          deno_core::anyhow::bail!(\"vsock is not supported on this platform\")\n        }\n\n        #[cfg(any(\n          target_os = \"android\",\n          target_os = \"linux\",\n          target_os = \"macos\"\n        ))]\n        {\n          let Some((cid, port)) = addr.split_once(':') else {\n            deno_core::anyhow::bail!(\"invalid vsock addr\");\n          };\n          let cid = if cid == \"-1\" { u32::MAX } else { cid.parse()? };\n          let port = port.parse()?;\n          let addr = VsockAddr::new(cid, port);\n          Connector::Vsock(addr)\n        }\n      } else {\n        let ca_certs = match std::env::var(\"OTEL_EXPORTER_OTLP_CERTIFICATE\") {\n          Ok(path) => vec![sys.fs_read(path)?.into_owned()],\n          _ => vec![],\n        };\n\n        let keys = match (\n          std::env::var(\"OTEL_EXPORTER_OTLP_CLIENT_KEY\"),\n          std::env::var(\"OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE\"),\n        ) {\n          (Ok(key_path), Ok(cert_path)) => {\n            let key = sys.fs_read(key_path)?;","sourceCodeStart":799,"sourceCodeEnd":835,"githubUrl":"https://github.com/denoland/deno/blob/9ad36f7a2cce60488e6ec52283efb32efddaf93a/ext/telemetry/lib.rs#L799-L835","documentation":"On supported platforms, Deno parses `OTEL_DENO_VSOCK` as `<cid>:<port>`: the string must split on a colon, cid must be a u32 or the literal `-1` (mapped to u32::MAX / VMADDR_CID_ANY), and port a u32. A value with no colon bails with this message; a present-but-unparsable number propagates the integer parse error instead.","triggerScenarios":"Setting `OTEL_DENO_VSOCK` to a colon-less value: `OTEL_DENO_VSOCK=4317` (port only), an empty value (`export OTEL_DENO_VSOCK=` from templated env), or a `vsock://3:4317` URI prefix (which fails cid parsing rather than this exact message).","commonSituations":"Copy-paste typos in .env files; assuming a default cid and setting only the port; confusing vsock cid:port with TCP host:port; empty-string env vars from CI templates.","solutions":["Set the full `cid:port` form: `export OTEL_DENO_VSOCK=3:4317`.","Use `-1` as cid to mean VMADDR_CID_ANY: `OTEL_DENO_VSOCK=-1:4317`.","Check for a missing colon, stray spaces, quotes, or a URI prefix in the value.","Remove the variable entirely if you meant HTTP OTLP export."],"exampleFix":"# before\nexport OTEL_DENO_VSOCK=4317     # port only, no cid -> invalid vsock addr\ndeno run --otel app.ts\n\n# after: <cid>:<port>; cid -1 means VMADDR_CID_ANY\nexport OTEL_DENO_VSOCK=3:4317\ndeno run --otel app.ts","handlingStrategy":"validation","validationCode":"# validate OTEL_DENO_VSOCK shape before launching\ncase \"${OTEL_DENO_VSOCK:-}\" in\n  \"\") : ;;\n  *:*) echo \"$OTEL_DENO_VSOCK\" | grep -qE '^(-1|[0-9]+):[0-9]+$' || echo \"bad OTEL_DENO_VSOCK (need cid:port)\" ;;\n  *) echo \"OTEL_DENO_VSOCK must be <cid>:<port>, e.g. 3:4317\" ;;\nesac","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always write vsock addresses as numeric cid:port — no URI prefix, no hostnames.","Use -1 as cid for VMADDR_CID_ANY.","Lint .env files for empty values (`VAR=` lines) before deployment."],"tags":["telemetry","opentelemetry","vsock","environment","config"],"backgroundTag":"invalid-env-var-format","analyzedSha":"9ad36f7a2cce60488e6ec52283efb32efddaf93a","analyzedAt":"2026-08-20T13:07:44.778Z","contentChangedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}