EpicGames/lore · error
Failed Quinn server start
Error message
Failed Quinn server start
What it means
This expect wraps QuinnServer::start(...), which builds and launches the QUIC server with the given address, cert/key files, and stream-handler factory. A failure means the server could not initialize — typically the UDP bind failed, the TLS files were rejected, or config construction was invalid.
Solutions
- Check the underlying QuinnServer::start error (bind refused vs TLS load failed)
- Use ephemeral ports (127.0.0.1:0 resolved via local_addr, as this harness does) and avoid fixed ports in parallel tests
- Kill stale test servers holding the port (lsof/SS on the port)
- Validate cert/key pair match and readability before starting the server
Example fix
// before
QuinnServer::start(config_builder.build().unwrap(), ...).expect("Failed Quinn server start");
// after
QuinnServer::start(config, ...).unwrap_or_else(|e| panic!("Failed Quinn server start: {e:?} (addr={server_addr})")); Defensive patterns
Strategy: validation
Validate before calling
// pre-checks before QuinnServer::start assert!(std::path::Path::new(&cert_path).exists()); assert!(std::path::Path::new(&key_path).exists()); assert!(std::net::UdpSocket::bind(server_addr).is_err(), "port unexpectedly free/held race");
Prevention
- Always use ephemeral ports resolved via local_addr in tests
- Kill stale servers from previous runs before retrying
- Validate cert/key pair match before server startup
- Read the QuinnServer::start error to separate bind vs TLS failures
When it happens
Trigger: Address already bound by another socket, cert_file/pkey_file point to unreadable or mismatched files, or QuinnConfigBuilder output is inconsistent (though build() is unwrapped earlier).
Common situations: Parallel tests racing to bind the same fixed port; leftover server from a previous test run holding the port; expired/mismatched test certificates; container without UDP permissions.
Related errors
- No handshake data
- No protocol found on request
- Missing QUIC certificate config
- Failed to open additional stream
- Failed to write header
AI-assisted analysis of EpicGames/lore@074eb0b0d1 (2026-09-13).
Data as JSON: /api/errors/458f61bdfa75f04d.
Report an issue: GitHub.
Appendix: source
Thrown at lore-server/src/quic/stream_handler.rs:884
async fn serve_and_connect(
factory: Box<dyn StreamHandlerFactory>,
protocol: &'static str,
) -> Harness {
let socket = UdpSocket::bind("127.0.0.1:0").unwrap();
let server_addr = socket.local_addr().expect("Failed socket setup");
drop(socket);
let (cert_path, key_path, _) = server_certs().expect("Bad cert paths");
let server = QuinnServer::start(
QuinnConfigBuilder::new()
.address(server_addr)
.cert_file(cert_path)
.pkey_file(key_path)
.stream_handler_factory(factory)
.build()
.unwrap(),
)
.expect("Failed Quinn server start");
let mut crypto_config = rustls::ClientConfig::builder()
.dangerous()
.with_custom_certificate_verifier(insecure_client_auth::SkipServerVerification::new())
.with_no_client_auth();
crypto_config.alpn_protocols = vec![protocol.as_bytes().into()];
let client_config = ClientConfig::new(Arc::new(
QuicClientConfig::try_from(crypto_config).expect("Failed client config"),
));
let client_addr: SocketAddr = "0.0.0.0:0".parse().unwrap();
let mut endpoint = Endpoint::client(client_addr).expect("Failed to create client endpoint");
endpoint.set_default_client_config(client_config);
let connection = endpoint
.connect(server_addr, "localhost")
.unwrap()View on GitHub (pinned to 074eb0b0d1)