{"record":{"id":"4c23154f65bd1d1e","repo":"denoland/deno","slug":"invalid-control-sock","errorCode":null,"errorMessage":"invalid control sock","messagePattern":"invalid control sock","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/lib.rs","lineNumber":1268,"sourceCode":"      #[cfg(any(\n        target_os = \"android\",\n        target_os = \"linux\",\n        target_os = \"macos\"\n      ))]\n      Some((\"vsock\", addr)) => {\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        let listener = VsockListener::bind(addr)?;\n        let (stream, _) = listener.accept().await?;\n        let (rx, tx) = stream.into_split();\n        (Box::new(rx), Box::new(tx))\n      }\n      _ => {\n        deno_core::anyhow::bail!(\"invalid control sock\");\n      }\n    };\n\n    let mut buf = Vec::with_capacity(1024);\n    BufReader::new(rx).read_until(b'\\n', &mut buf).await?;\n\n    tokio::spawn(async move {\n      deno_runtime::deno_http::SERVE_NOTIFIER.notified().await;\n\n      #[derive(deno_core::serde::Serialize)]\n      enum Event {\n        Serving {\n          #[serde(skip_serializing_if = \"Option::is_none\")]\n          kind: Option<&'static str>,\n        },\n      }\n\n      let mut buf = deno_core::serde_json::to_vec(&Event::Serving {","sourceCodeStart":1250,"sourceCodeEnd":1286,"githubUrl":"https://github.com/denoland/deno/blob/89f33cbef296a2b287f323d42de54c871fa69c77/cli/lib.rs#L1250-L1286","documentation":"cli/lib.rs:1268 is the catch-all arm of the DENO_UNSTABLE_CONTROL_SOCK parser: the value's scheme matched none of the supported transports (unix, tcp, vsock), so the whole address is rejected as \"invalid control sock\". It fires before any runtime work happens, at process bootstrap, and aborts startup.","triggerScenarios":"DENO_UNSTABLE_CONTROL_SOCK set to a value whose scheme is not recognized, e.g. \"sock:/path\", \"vsock2:1:2\", \"unix2:/run/x\", or a bare path \"/run/deno.sock\" with no scheme prefix.","commonSituations":"Environment variables leaking from another tool's config format (systemd socket units, Kubernetes dowward-api); typos in supervisor templates; leftover DENO_UNSTABLE_CONTROL_SOCK from experiments on machines where the intended transport name was misremembered.","solutions":["Use one of the supported transports: DENO_UNSTABLE_CONTROL_SOCK=\"unix:/abs/path\" or \"tcp:127.0.0.1:PORT\" or \"vsock:CID:PORT\"","Unset the variable (or scope it to the one service that needs it) if you did not intend a control socket at all: env -u DENO_UNSTABLE_CONTROL_SOCK deno run app.ts","Grep your supervisor/unit files/CI env for the variable and align the scheme with the actual Deno version's supported list"],"exampleFix":"# before\nDENO_UNSTABLE_CONTROL_SOCK=sock:/run/deno.sock deno run main.ts\n\n# after\nDENO_UNSTABLE_CONTROL_SOCK=unix:/run/deno.sock deno run main.ts","handlingStrategy":"validation","validationCode":"#!/bin/sh\nVAL=\"$DENO_UNSTABLE_CONTROL_SOCK\"\ncase \"$VAL\" in\n  unix:*|tcp:*|vsock:*) ;;  # supported schemes\n  \"\") ;;                      # unset is fine\n  *) echo \"unsupported control sock: $VAL (expected unix:|tcp:|vsock:)\"; exit 2 ;;\nesac\nexec deno run main.ts","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Centralize how DENO_UNSTABLE_CONTROL_SOCK gets set (one supervisor template) instead of ad-hoc exports","Note this is an unstable internal knob — pin and re-test after every Deno upgrade","Unset it in dev shells: env -u DENO_UNSTABLE_CONTROL_SOCK"],"tags":["control-socket","environment","unstable"],"backgroundTag":null,"analyzedSha":"89f33cbef296a2b287f323d42de54c871fa69c77","analyzedAt":"2026-08-16T07:54:21.310Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}