{"record":{"id":"daac9e0f462b721c","repo":"tracel-ai/burn","slug":"failed-to-open-remote-data-channel-to-address","errorCode":null,"errorMessage":"Failed to open remote 'data' channel to {address}: {err:?}. Is a `burn-remote` server running at that address?","messagePattern":"Failed to open remote 'data' channel to (.+?): (.+?)\\. Is a `burn-remote` server running at that address\\?","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"crates/burn-communication/src/external_comm.rs","lineNumber":189,"sourceCode":"            return Some(data);\n        }\n        log::warn!(\"Closed connection\");\n        None\n    }\n\n    /// Get the WebSocket stream for the given address, or create a new one if it doesn't exist.\n    async fn get_data_stream(\n        &self,\n        address: Address,\n    ) -> Arc<Mutex<<P::Client as ProtocolClient>::Channel>> {\n        let mut streams = self.channels.lock().await;\n        match streams.get(&address) {\n            Some(stream) => stream.clone(),\n            None => {\n                // Open a new WebSocket connection to the address\n                let stream = match P::Client::connect(address.clone(), \"data\").await {\n                    Ok(stream) => stream,\n                    Err(err) => panic!(\n                        \"Failed to open remote 'data' channel to {address}: {err:?}. \\\n                         Is a `burn-remote` server running at that address?\"\n                    ),\n                };\n\n                let stream = Arc::new(Mutex::new(stream));\n                streams.insert(address.clone(), stream.clone());\n\n                stream\n            }\n        }\n    }\n\n    /// Get the requested exposed tensor data, and update download counter\n    async fn get_exposed_tensor_bytes(\n        &self,\n        transfer_id: TensorTransferId,\n    ) -> Option<bytes::Bytes> {","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/tracel-ai/burn/blob/d16f7ba2ed0d41408189384044cc886fb4c8f957/crates/burn-communication/src/external_comm.rs#L171-L207","documentation":"Before downloading tensors, the client opens a WebSocket connection on the 'data' subprotocol to the remote address. If `P::Client::connect` fails (server unreachable, not a burn-remote server, wrong port, TLS/protocol rejection), the code panics with this message asking whether a `burn-remote` server is running at that address.","triggerScenarios":"Calling remote tensor download (`download_tensor` -> `get_data_stream`) when no server is listening at `address`; the server exists but doesn't accept the \"data\" subprotocol; wrong scheme/host/port in the address string; firewall or TLS failure.","commonSituations":"Forgetting to start the burn-remote server before running a remote client; typos in the remote address/port; server bound to a different interface than the client connects to; Docker/K8s port not exposed.","solutions":["Start the burn-remote server and verify it listens on the given address (curl/nc the host:port).","Correct the address string (scheme, host, port) used to create the remote client.","Check network reachability (firewall, port mapping, TLS certificates) between client and server.","Confirm server and client speak the same protocol version so the 'data' subprotocol handshake succeeds."],"exampleFix":"// before\nlet client = RemoteClient::connect(\"ws://localhost:3999\").await; // wrong port, nothing listening\n// after\n// $ burn-remote-server --port 3000\nlet client = RemoteClient::connect(\"ws://localhost:3000\").await;","handlingStrategy":"retry","validationCode":"// Probe the endpoint before connecting\nlet reachable = tokio::net::TcpStream::connect(addr).await.is_ok();\nif !reachable { return Err(format!(\"no burn-remote server at {addr}\")); }","typeGuard":null,"tryCatchPattern":"// Retry with backoff before giving up\nfor attempt in 0..3 {\n    match try_download(&addr).await {\n        Ok(d) => return Ok(d),\n        Err(e) if attempt < 2 => tokio::time::sleep(Duration::from_secs(1 << attempt)).await,\n        Err(e) => return Err(e),\n    }\n}","preventionTips":["Start the burn-remote server before running remote clients","Verify address scheme/host/port (e.g. ws://host:3000)","Check firewall/port mapping when server runs in a container","Keep client and server burn versions aligned"],"tags":["network","websocket","burn","remote"],"backgroundTag":"connection-refused","analyzedSha":"d16f7ba2ed0d41408189384044cc886fb4c8f957","analyzedAt":"2026-09-05T13:19:14.260Z","contentChangedAt":"2026-09-05T13:19:14.260Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}