tracel-ai/burn · error
Can bind the Burn Remote server endpoint
Error message
Can bind the Burn Remote server endpoint
What it means
start_iroh_async binds the iroh Endpoint (with the Burn Remote ALPN) and expects the bind to succeed. Panic means the iroh transport could not establish its endpoint — typically network, relay, or key issues.
Source
Thrown at crates/burn-remote/src/transport/iroh/server.rs:30
use std::sync::Arc;
/// Serve Burn Remote over Iroh until the process receives its shutdown signal.
///
/// Binds a server endpoint with the stable identity carried by `secret` and hosts `devices` as the
/// sole protocol on it. Reached through [`RemoteServerBuilder`](super::RemoteServerBuilder) (the
/// single turnkey entry point); use [`RemoteNode::protocol`] for composition with other protocols.
#[cfg(not(target_family = "wasm"))]
pub(crate) async fn start_iroh_async<B: BackendIr>(
secret: crate::RemoteSecret,
devices: Vec<Device<B>>,
custom_ops: CustomOpRegistry<B>,
) {
let endpoint = Endpoint::builder(presets::N0)
.secret_key(secret.secret_key())
.alpns(vec![BURN_REMOTE_ALPN.to_vec()])
.bind()
.await
.expect("Can bind the Burn Remote server endpoint");
let probe = if crate::metrics::TelemetryLogger::enabled() {
TelemetryProbe::new(crate::telemetry::CHANNEL_CAPACITY)
} else {
TelemetryProbe::disabled()
};
let protocol = IrohRemoteProtocol::new(
endpoint.clone(),
devices,
Arc::new(AllowAll),
probe,
custom_ops,
);
let router = Router::builder(endpoint)
.accept(BURN_REMOTE_ALPN, protocol)
.spawn();View on GitHub (pinned to d16f7ba2ed)
Solutions
- Verify the machine has working network access and UDP connectivity for iroh
- Check that the provided secret key is a valid key (from the secret source) and not corrupted/misloaded
- Test reachability of the n0 discovery/relay services from your environment
- Retry the bind; transient DNS or network failures at startup resolve on retry
Example fix
// before
let endpoint = Endpoint::builder(presets::N0)
.secret_key(secret.secret_key())
.alpns(vec![BURN_REMOTE_ALPN.to_vec()])
.bind()
.await
.expect("Can bind the Burn Remote server endpoint");
// after
let endpoint = Endpoint::builder(presets::N0)
.secret_key(secret.secret_key())
.alpns(vec![BURN_REMOTE_ALPN.to_vec()])
.bind()
.await
.unwrap_or_else(|e| panic!("iroh bind failed: {e}; check network/UDP and secret key")); Defensive patterns
Strategy: retry
Validate before calling
// Check UDP/network availability before binding the iroh endpoint
if std::net::UdpSocket::bind(("0.0.0.0", 0)).is_err() {
return Err(anyhow!("no UDP network available for iroh endpoint"));
} Try / catch
for attempt in 0..3 {
match Endpoint::builder(presets::N0).secret_key(secret.secret_key()).alpns(vec![BURN_REMOTE_ALPN.to_vec()]).bind().await {
Ok(ep) => break ep,
Err(e) if attempt < 2 => tokio::time::sleep(Duration::from_secs(2)).await,
Err(e) => return Err(anyhow!("iroh bind failed: {e}")),
}
} Prevention
- Verify UDP connectivity and n0 discovery/relay reachability before startup
- Validate the secret key material loads correctly
- Retry transient startup network failures with backoff
When it happens
Trigger: Server startup with the iroh feature when Endpoint::bind() fails: no network interface, DNS/resolver issues reaching n0 discovery, invalid secret key, port/socket unavailable.
Common situations: Firewalled or offline environments; corporate proxies blocking the n0 discovery/relay; misconfigured secret key material; iroh crate version mismatch.
Related errors
- Failed to open remote 'data' channel to {address}: {err:?}.
- Failed to receive message from websocket: {err:?}
- Failed to close WebSocket stream
- Failed to send download id
- Server disconnected during initialization
AI-assisted analysis of tracel-ai/burn@d16f7ba2ed (2026-09-05).
Data as JSON: /api/errors/c680d5d5ffa880ce.
Report an issue: GitHub.