{"record":{"id":"15f150a714accbcb","repo":"ipfs/kubo","slug":"errnoresourcemgr","errorCode":"ErrNoResourceMgr","errorMessage":"missing ResourceMgr: make sure the daemon is running with Swarm.ResourceMgr.Enabled","messagePattern":"missing ResourceMgr: make sure the daemon is running with Swarm\\.ResourceMgr\\.Enabled","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/node/libp2p/rcmgr.go","lineNumber":30,"sourceCode":"\t\"github.com/ipfs/kubo/core/node/helpers\"\n\t\"github.com/ipfs/kubo/core/shutdown\"\n\t\"github.com/ipfs/kubo/repo\"\n\n\tlogging \"github.com/ipfs/go-log/v2\"\n\t\"github.com/libp2p/go-libp2p\"\n\t\"github.com/libp2p/go-libp2p/core/network\"\n\t\"github.com/libp2p/go-libp2p/core/peer\"\n\t\"github.com/libp2p/go-libp2p/core/protocol\"\n\trcmgr \"github.com/libp2p/go-libp2p/p2p/host/resource-manager\"\n\t\"github.com/multiformats/go-multiaddr\"\n\t\"go.uber.org/fx\"\n)\n\nvar rcmgrLogger = logging.Logger(\"rcmgr\")\n\nconst NetLimitTraceFilename = \"rcmgr.json.gz\"\n\nvar ErrNoResourceMgr = errors.New(\"missing ResourceMgr: make sure the daemon is running with Swarm.ResourceMgr.Enabled\")\n\nfunc ResourceManager(repoPath string, cfg config.SwarmConfig, userResourceOverrides rcmgr.PartialLimitConfig) any {\n\treturn func(mctx helpers.MetricsCtx, lc fx.Lifecycle, repo repo.Repo) (network.ResourceManager, Libp2pOpts, error) {\n\t\tvar manager network.ResourceManager\n\t\tvar opts Libp2pOpts\n\n\t\tenabled := cfg.ResourceMgr.Enabled.WithDefault(true)\n\n\t\t//  ENV overrides Config (if present)\n\t\tswitch os.Getenv(\"LIBP2P_RCMGR\") {\n\t\tcase \"0\", \"false\":\n\t\t\tenabled = false\n\t\tcase \"1\", \"true\":\n\t\t\tenabled = true\n\t\t}\n\n\t\tif enabled {\n\t\t\tlog.Debug(\"libp2p resource manager is enabled\")","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/node/libp2p/rcmgr.go#L12-L48","documentation":"Sentinel error (libp2p.ErrNoResourceMgr) returned by 'ipfs swarm stats'/'ipfs swarm limit' style commands when the node has no resource manager: the running daemon was started with Swarm.ResourceMgr.Enabled=false (or LIBP2P_RCMGR=0), so there are no stats or limits to inspect.","triggerScenarios":"Thrown at core/node/libp2p/rcmgr.go:30 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable the resource manager: set Swarm.ResourceMgr.Enabled=true in the config and restart the daemon","Make sure LIBP2P_RCMGR is not set to 0/false in the daemon's environment","The NullResourceManager case also triggers this; a restart with the manager enabled is required"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}