{"record":{"id":"1cfa239613601acb","repo":"hatoo/oha","slug":"couldn-t-bind-to-address","errorCode":null,"errorMessage":"couldn't bind to address","messagePattern":"couldn't bind to address","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/client_h3.rs","lineNumber":94,"sourceCode":"                Ok(Ok(stream)) => stream,\n                Ok(Err(err)) => return Err(err),\n                Err(_) => return Err(ClientError::Timeout),\n            };\n        let send_request = stream.handshake_http3().await?;\n        let dialup = std::time::Instant::now();\n        Ok((\n            ConnectionTime {\n                dns_lookup: dns_lookup - start,\n                dialup: dialup - start,\n            },\n            send_request,\n        ))\n    }\n\n    fn quic_endpoint(&self, is_ipv6: bool) -> Result<quinn::Endpoint, ClientError> {\n        let endpoint_config = h3_quinn::quinn::EndpointConfig::default();\n        let local_socket = if is_ipv6 {\n            UdpSocket::bind(\"[::]:0\").expect(\"couldn't bind to address\")\n        } else {\n            UdpSocket::bind(\"0.0.0.0:0\").expect(\"couldn't bind to address\")\n        };\n        // Enlarge UDP buffers as far as the OS allows to avoid packet loss at high rates.\n        {\n            let socket_ref = socket2::SockRef::from(&local_socket);\n            let _ = socket_ref.set_recv_buffer_size(8 * 1024 * 1024);\n            let _ = socket_ref.set_send_buffer_size(8 * 1024 * 1024);\n        }\n        // If we can set the right build flags, we can use `h3_quinn::quinn::Endpoint::client` instead\n        let mut client_endpoint = h3_quinn::quinn::Endpoint::new(\n            endpoint_config,\n            None,\n            local_socket,\n            default_runtime().unwrap(),\n        )\n        .unwrap();\n","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/hatoo/oha/blob/4efba2d113d165aaaf7533f5d2893e7cc57ebfc1/src/client_h3.rs#L76-L112","documentation":"quic_endpoint fails when quinn::Endpoint::bind cannot bind a local UDP socket for the QUIC/HTTP-3 connection (IPv4 or IPv6 per the is_ipv6 flag). Typical causes: the OS denied the bind (firewall/SELinux), no interface supports the requested address family, or the port/address is otherwise unavailable. It propagates out of quic_client.","triggerScenarios":"Thrown at src/client_h3.rs:94 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that a firewall or SELinux policy is not blocking UDP on the chosen port.","Confirm the system has a usable IPv6 stack (or IPv4, matching the requested family); try forcing the other family.","Run with sufficient privileges if binding a restricted port, or use an ephemeral/client port (bind to port 0).","Verify no other process holds the socket if a specific local address/port is configured."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4efba2d113d165aaaf7533f5d2893e7cc57ebfc1","analyzedAt":"2026-09-09T16:24:23.306Z","contentChangedAt":"2026-09-09T16:24:23.306Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}