{"record":{"id":"4f96227b25abd65a","repo":"rathole-org/rathole","slug":"no-such-a-service","errorCode":null,"errorMessage":"No such a service {}","messagePattern":"No such a service (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/server.rs","lineNumber":306,"sourceCode":"    let mut nonce = vec![0u8; HASH_WIDTH_IN_BYTES];\n    rand::thread_rng().fill_bytes(&mut nonce);\n\n    // Send hello\n    let hello_send = Hello::ControlChannelHello(\n        protocol::CURRENT_PROTO_VERSION,\n        nonce.clone().try_into().unwrap(),\n    );\n    conn.write_all(&bincode::serialize(&hello_send).unwrap())\n        .await?;\n    conn.flush().await?;\n\n    // Lookup the service\n    let service_config = match services.read().await.get(&service_digest) {\n        Some(v) => v,\n        None => {\n            conn.write_all(&bincode::serialize(&Ack::ServiceNotExist).unwrap())\n                .await?;\n            bail!(\"No such a service {}\", hex::encode(service_digest));\n        }\n    }\n    .to_owned();\n\n    let service_name = &service_config.name;\n\n    // Calculate the checksum\n    let mut concat = Vec::from(service_config.token.as_ref().unwrap().as_bytes());\n    concat.append(&mut nonce);\n\n    // Read auth\n    let protocol::Auth(d) = read_auth(&mut conn).await?;\n\n    // Validate\n    let session_key = protocol::digest(&concat);\n    if session_key != d {\n        conn.write_all(&bincode::serialize(&Ack::AuthFailed).unwrap())\n            .await?;","sourceCodeStart":288,"sourceCodeEnd":324,"githubUrl":"https://github.com/rathole-org/rathole/blob/a292f7ed5402f840415fc6a53827da2f34337856/src/server.rs#L288-L324","documentation":"Fires in do_control_channel_handshake when a client requests a control channel for a service whose digest is not present in the server's services map (services.read().await.get(&service_digest) returned None). It means the client named a service the server has no configuration for; the server sends Ack::ServiceNotExist back on the control connection and this error aborts the handshake for that connection.","triggerScenarios":"Thrown at src/server.rs:306 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the service name on the client matches a [[server.services]] entry in the server's config","Reload the server config so the requested service is registered before clients connect","Check the client config was not pointed at the wrong server instance","Log the requested service name to help the operator spot typos"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a292f7ed5402f840415fc6a53827da2f34337856","analyzedAt":"2026-09-07T09:56:55.739Z","contentChangedAt":"2026-09-07T09:56:55.739Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}