{"record":{"id":"75b2688818cdd38b","repo":"ipfs/kubo","slug":"no-delegated-routers-or-publishers-configured-for","errorCode":null,"errorMessage":"no delegated routers or publishers configured for 'delegated' routing mode","messagePattern":"no delegated routers or publishers configured for 'delegated' routing mode","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/node/libp2p/routingopt.go","lineNumber":204,"sourceCode":"// ConstructDelegatedOnlyRouting returns routers used when Routing.Type is set to \"delegated\"\n// This provides HTTP-only routing without DHT, using only delegated routers and IPNS publishers.\n// Useful for environments where DHT connectivity is not available or desired\nfunc ConstructDelegatedOnlyRouting(cfg *config.Config) RoutingOption {\n\treturn func(args RoutingOptionArgs) (routing.Routing, error) {\n\t\t// Use only HTTP routers (includes both read and write capabilities) - no DHT\n\t\tvar routers []*routinghelpers.ParallelRouter\n\n\t\t// Add HTTP delegated routers (includes both router and publisher capabilities)\n\t\taddrFunc := httpRouterAddrFunc(args.Host, cfg.Addresses)\n\t\thttpRouters, err := constructDefaultHTTPRouters(cfg, addrFunc)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\trouters = append(routers, httpRouters...)\n\n\t\t// Validate that we have at least one router configured\n\t\tif len(routers) == 0 {\n\t\t\treturn nil, fmt.Errorf(\"no delegated routers or publishers configured for 'delegated' routing mode\")\n\t\t}\n\n\t\trouting := routinghelpers.NewComposableParallel(routers)\n\t\treturn routing, nil\n\t}\n}\n\n// ConstructDefaultRouting returns routers used when Routing.Type is unset or set to \"auto\"\nfunc ConstructDefaultRouting(cfg *config.Config, routingOpt RoutingOption) RoutingOption {\n\treturn func(args RoutingOptionArgs) (routing.Routing, error) {\n\t\t// Defined routers will be queried in parallel (optimizing for response speed)\n\t\t// Different trade-offs can be made by setting Routing.Type = \"custom\" with own Routing.Routers\n\t\tvar routers []*routinghelpers.ParallelRouter\n\n\t\tdhtRouting, err := routingOpt(args)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}","sourceCodeStart":186,"sourceCodeEnd":222,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/node/libp2p/routingopt.go#L186-L222","documentation":"Routing.Type is set to 'delegated' (HTTP-only routing, no DHT) but the config contains no delegated routers and no IPNS delegated publishers to use; there is nothing to route with, so node construction fails.","triggerScenarios":"Thrown at core/node/libp2p/routingopt.go:204 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure at least one HTTP delegated router under Routing.DelegatedRouters (or Routers) in the config","Or configure Ipns.DelegatedPublishers if you only need IPNS publish over HTTP","Or switch Routing.Type back to 'autorb'/'dht' to use the DHT","Reference: docs/config.md Routing section"],"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"}