{"record":{"id":"27a90bc829b41644","repo":"ipfs/kubo","slug":"probe-resolve-w","errorCode":null,"errorMessage":"probe resolve: %w","messagePattern":"probe resolve: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/commands/diag.go","lineNumber":67,"sourceCode":"Exits 0 if the daemon is running and can resolve the well-known empty\nUnixFS directory. Exits non-zero if shutdown has started or the DAG\npipeline is broken. Intended for container healthchecks.\n`,\n\t},\n\tRun: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {\n\t\tif t := shutdown.StartedAt(); !t.IsZero() {\n\t\t\treturn fmt.Errorf(\"daemon is shutting down (started %s ago)\", time.Since(t).Round(time.Second))\n\t\t}\n\t\tapi, err := cmdenv.GetApi(env, req)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tprobeCID, err := cid.Decode(diagHealthyProbeCIDStr)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid probe CID: %w\", err)\n\t\t}\n\t\tif _, _, err := api.ResolvePath(req.Context, path.FromCid(probeCID)); err != nil {\n\t\t\treturn fmt.Errorf(\"probe resolve: %w\", err)\n\t\t}\n\t\tif _, err := api.Dag().Get(req.Context, probeCID); err != nil {\n\t\t\treturn fmt.Errorf(\"probe fetch: %w\", err)\n\t\t}\n\t\treturn cmds.EmitOnce(res, \"ok\")\n\t},\n}\n\nvar diagDatastoreCmd = &cmds.Command{\n\tStatus: cmds.Experimental,\n\tHelptext: cmds.HelpText{\n\t\tTagline: \"Low-level datastore inspection for debugging and testing.\",\n\t\tShortDescription: `\n'ipfs diag datastore' provides low-level access to the datastore for debugging\nand testing purposes.\n\nWARNING: FOR DEBUGGING/TESTING ONLY\n","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/commands/diag.go#L49-L85","documentation":"`ipfs diag healthy` resolves its built-in probe CID through the node's API (api.ResolvePath) to verify the DAG pipeline; a resolution failure is wrapped as 'probe resolve'. It means the node could not resolve the probe path, typically because the probe block is not present and cannot be fetched, or the node is unhealthy.","triggerScenarios":"api.ResolvePath(req.Context, path.FromCid(probeCID)) fails: blockstore miss with broken DAG service, node shutting down, or routing unable to fetch the probe block.","commonSituations":"Container healthchecks failing on nodes with corrupted blockstores or non-functional routing; offline nodes trying to fetch the probe content from the network.","solutions":["Check daemon logs for the underlying resolve error","Verify blockstore integrity / run `ipfs repo gc` or repairs","Ensure network/routing works so the probe block can be fetched"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"err := diagHealthy(ctx)\nif err != nil && strings.Contains(err.Error(), \"probe resolve\") { checkLogs(); retryWithBackoff(ctx) }","preventionTips":["Ensure routing/network is functional before healthchecks","Monitor blockstore health; resolve wrapped errors from daemon logs"],"tags":["diag","healthcheck","dag","resolve"],"backgroundTag":"dag-resolve-failed","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"}