{"record":{"id":"0f39069c5a2e9c43","repo":"ipfs/kubo","slug":"unrecognized-swarm-connmgr-type-q","errorCode":null,"errorMessage":"unrecognized Swarm.ConnMgr.Type: %q","messagePattern":"unrecognized Swarm\\.ConnMgr\\.Type: %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/node/groups.go","lineNumber":55,"sourceCode":")\n\nfunc LibP2P(bcfg *BuildCfg, cfg *config.Config, userResourceOverrides rcmgr.PartialLimitConfig) fx.Option {\n\tvar connmgr fx.Option\n\n\t// set connmgr based on Swarm.ConnMgr.Type\n\tconnMgrType := cfg.Swarm.ConnMgr.Type.WithDefault(config.DefaultConnMgrType)\n\tswitch connMgrType {\n\tcase \"none\":\n\t\tconnmgr = fx.Options() // noop\n\tcase \"\", \"basic\":\n\t\tgrace := cfg.Swarm.ConnMgr.GracePeriod.WithDefault(config.DefaultConnMgrGracePeriod)\n\t\tlow := int(cfg.Swarm.ConnMgr.LowWater.WithDefault(config.DefaultConnMgrLowWater))\n\t\thigh := int(cfg.Swarm.ConnMgr.HighWater.WithDefault(config.DefaultConnMgrHighWater))\n\t\tsilence := cfg.Swarm.ConnMgr.SilencePeriod.WithDefault(config.DefaultConnMgrSilencePeriod)\n\t\tconnmgr = fx.Provide(libp2p.ConnectionManager(low, high, grace, silence))\n\n\tdefault:\n\t\treturn fx.Error(fmt.Errorf(\"unrecognized Swarm.ConnMgr.Type: %q\", connMgrType))\n\t}\n\n\t// parse PubSub config\n\n\tps, disc := fx.Options(), fx.Options()\n\tif bcfg.getOpt(\"pubsub\") || bcfg.getOpt(\"ipnsps\") {\n\t\tdisc = fx.Provide(libp2p.TopicDiscovery())\n\n\t\tvar pubsubOptions []pubsub.Option\n\t\tpubsubOptions = append(\n\t\t\tpubsubOptions,\n\t\t\tpubsub.WithMessageSigning(!cfg.Pubsub.DisableSigning),\n\t\t\tpubsub.WithSeenMessagesTTL(cfg.Pubsub.SeenMessagesTTL.WithDefault(pubsub.TimeCacheDuration)),\n\t\t)\n\n\t\tvar seenMessagesStrategy timecache.Strategy\n\t\tconfigSeenMessagesStrategy := cfg.Pubsub.SeenMessagesStrategy.WithDefault(config.DefaultSeenMessagesStrategy)\n\t\tswitch configSeenMessagesStrategy {","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/node/groups.go#L37-L73","documentation":"Kubo validates `Swarm.ConnMgr.Type` during libp2p node construction and only supports the known connection manager types (e.g. \"none\", \"basic\", and the default). Any other string aborts fx dependency graph construction with this error. It is thrown early at daemon start so a typo cannot silently disable connection management.","triggerScenarios":"`Swarm.ConnMgr.Type` in the config contains an unrecognized value; the switch in LibP2P group construction falls to the default case and returns fx.Error.","commonSituations":"Typo like \"basics\" or \"Basic\" in the config; copying config from an older/newer Kubo version or another implementation with different connmgr names.","solutions":["Set `ipfs config Swarm.ConnMgr.Type basic` (or \"none\" to disable), matching a supported value exactly (lowercase)","Check `docs/config.md` for the supported Swarm.ConnMgr.Type values in your Kubo version","If the value came from an upgrade guide, re-apply the recommended default (`ipfs config --json Swarm.ConnMgr` reset or explicit valid value)"],"exampleFix":"// before (config.json)\n\"ConnMgr\": { \"Type\": \"basics\", \"LowWater\": 200, \"HighWater\": 500 }\n// after\n\"ConnMgr\": { \"Type\": \"basic\", \"LowWater\": 200, \"HighWater\": 500 }","handlingStrategy":"validation","validationCode":"t, _ := cfg.Swarm.ConnMgr.Type.WithDefault(config.DefaultConnMgrType)\nvalid := []string{\"\", \"none\", \"basic\"}\nif !slices.Contains(valid, t) {\n\treturn fmt.Errorf(\"Swarm.ConnMgr.Type %q not in %v\", t, valid)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only set Swarm.ConnMgr.Type to documented values: none or basic","Prefer `ipfs config` over hand-editing config.json","Re-validate config after upgrading Kubo versions"],"tags":["config","libp2p","connection-manager"],"backgroundTag":"invalid-config-value","analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}