{"record":{"id":"738e07be67a409f5","repo":"linera-io/linera-protocol","slug":"only-allowed-protocol-is-tcp","errorCode":null,"errorMessage":"Only allowed protocol is tcp","messagePattern":"Only allowed protocol is tcp","errorType":"validation","errorClass":"anyhow","httpStatus":null,"severity":"error","filePath":"linera-storage-runtime/src/storage_config.rs","lineNumber":120,"sourceCode":"                inner_storage_config,\n                namespace,\n            });\n        }\n        #[cfg(feature = \"storage-service\")]\n        if let Some(s) = input.strip_prefix(STORAGE_SERVICE) {\n            if s.is_empty() {\n                bail!(\n                    \"For Storage service, the formatting has to be service:endpoint:namespace,\\\nexample service:tcp:127.0.0.1:7878:table_do_my_test\"\n                );\n            }\n            let parts = s.split(':').collect::<Vec<_>>();\n            if parts.len() != 4 {\n                bail!(\"We should have one endpoint and one namespace\");\n            }\n            let protocol = parts[0];\n            if protocol != \"tcp\" {\n                bail!(\"Only allowed protocol is tcp\");\n            }\n            let endpoint = parts[1];\n            let port = parts[2];\n            let mut endpoint = endpoint.to_string();\n            endpoint.push(':');\n            endpoint.push_str(port);\n            let endpoint = endpoint.to_string();\n            let namespace = parts[3].to_string();\n            let inner_storage_config = InnerStorageConfig::Service { endpoint };\n            return Ok(StorageConfig {\n                inner_storage_config,\n                namespace,\n            });\n        }\n        #[cfg(feature = \"rocksdb\")]\n        if let Some(s) = input.strip_prefix(ROCKS_DB) {\n            if s.is_empty() {\n                bail!(","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/linera-io/linera-protocol/blob/6c226ddcb332ef55118dc8d0aafbd093d5420899/linera-storage-runtime/src/storage_config.rs#L102-L138","documentation":"Raised while parsing a `service:` storage configuration in `StorageConfig::from_str` (linera-storage-runtime). The first segment after `service:` must be the literal `tcp`; the storage-service client only supports raw TCP transport, so any other scheme (http, https, ws, grpc) is rejected.","triggerScenarios":"Passing `service:http:127.0.0.1:7878:ns`, `service:grpc:...`, or any scheme other than `tcp` as the transport segment.","commonSituations":"Copy-pasting an HTTP URL scheme from service documentation into the storage string; assuming the storage service speaks the same protocol as the node's GraphQL endpoint.","solutions":["Change the transport segment to `tcp`: `service:tcp:<host>:<port>:<namespace>`","Verify the storage service is actually listening on a plain TCP endpoint (it is started with `--endpoint tcp:host:port`)"],"exampleFix":"# before\n--storage service:http:127.0.0.1:7878:table_ns\n\n# after\n--storage service:tcp:127.0.0.1:7878:table_ns","handlingStrategy":"validation","validationCode":"// Rust: check the transport segment before FromStr\nif let Some(rest) = storage_str.strip_prefix(\"service:\") {\n    let protocol = rest.split(':').next().unwrap_or(\"\");\n    anyhow::ensure!(protocol == \"tcp\", \"service storage only supports tcp, got {protocol}\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["The storage service speaks raw TCP only — never reuse an http/ws scheme from node URLs","Start the service with a matching tcp endpoint (e.g. --endpoint tcp:127.0.0.1:7878)"],"tags":["config","parsing","storage-service","protocol"],"backgroundTag":"unsupported-protocol-scheme","analyzedSha":"6c226ddcb332ef55118dc8d0aafbd093d5420899","analyzedAt":"2026-08-22T22:49:09.787Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}