{"record":{"id":"e67cc135318cd5e6","repo":"shadowsocks/shadowsocks-rust","slug":"missing-manager-addr-and-manager-port-in-confi","errorCode":null,"errorMessage":"missing `manager_addr` and `manager_port` in configuration","messagePattern":"missing `manager_addr` and `manager_port` in configuration","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"crates/shadowsocks-service/src/config.rs","lineNumber":2901,"sourceCode":"                ErrorKind::MissingField,\n                \"missing any valid servers in configuration\",\n                None,\n            );\n            return Err(err);\n        }\n\n        #[cfg(feature = \"local-online-config\")]\n        if self.config_type.is_online_config() && self.server.is_empty() {\n            let err = Error::new(\n                ErrorKind::MissingField,\n                \"missing any valid servers in configuration\",\n                None,\n            );\n            return Err(err);\n        }\n\n        if self.config_type.is_manager() && self.manager.is_none() {\n            let err = Error::new(\n                ErrorKind::MissingField,\n                \"missing `manager_addr` and `manager_port` in configuration\",\n                None,\n            );\n            return Err(err);\n        }\n\n        for inst in &self.server {\n            let server = &inst.config;\n\n            // Plugin shouldn't be an empty string\n            if let Some(plugin) = server.plugin()\n                && plugin.plugin.trim().is_empty()\n            {\n                let err = Error::new(ErrorKind::Malformed, \"`plugin` shouldn't be an empty string\", None);\n                return Err(err);\n            }\n","sourceCodeStart":2883,"sourceCodeEnd":2919,"githubUrl":"https://github.com/shadowsocks/shadowsocks-rust/blob/8eb0f0a65b1d976ab6bed5787327ef86529b0435/crates/shadowsocks-service/src/config.rs#L2883-L2919","documentation":"A manager-type configuration (ssserver --manager-address mode) requires manager_addr and manager_port to be set, exposed as the manager field. If config_type is Manager but no manager address was provided, Config::check returns this ErrorKind::MissingField error.","triggerScenarios":"Starting ssserver in manager mode where the config has manager mode enabled (or is invoked as a manager) but manager_addr/manager_port (or the manager section) is absent from the config file or CLI.","commonSituations":"Running the manager with only a plain server config; config file migrated from a non-manager setup missing the manager block; typo'd keys like manager_address instead of manager_addr.","solutions":["Add manager_addr and manager_port to the config, or pass --manager-address on the CLI.","Confirm the config_type is actually Manager — if you meant to run a normal server, remove the manager config type.","Check key spelling in your config file (manager_addr / manager_port) and that it sits in the correct section."],"exampleFix":"// before (manager.json)\n{ \"manager\": null, \"servers_enabled\": true }\n\n// after\n{ \"manager\": { \"addr\": \"127.0.0.1\", \"port\": 8389 }, \"servers_enabled\": true }","handlingStrategy":"validation","validationCode":"// Rust\nlet cfg: serde_json::Value = serde_json::from_str(&raw)?;\nassert!(cfg.get(\"manager\").map_or(false, |m| !m.is_null()), \"manager mode requires manager_addr/manager_port\");","typeGuard":null,"tryCatchPattern":"// Rust\nif let Err(e) = ssserver::run(config) {\n    if e.to_string().contains(\"manager_addr\") {\n        eprintln!(\"manager mode needs --manager-address or a manager block in the config\");\n    }\n    std::process::exit(1);\n}","preventionTips":["Always pass --manager-address explicitly when running manager mode.","Keep manager configs in a dedicated template with the manager block filled.","Watch for key-name typos (manager_addr vs manager_address) across versions."],"tags":["config","manager","missing-field"],"backgroundTag":"missing-required-config-field","analyzedSha":"8eb0f0a65b1d976ab6bed5787327ef86529b0435","analyzedAt":"2026-09-09T12:20:43.168Z","contentChangedAt":"2026-09-09T12:20:43.168Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}