{"record":{"id":"29ac9f5d10f87612","repo":"kubernetes/kops","slug":"requesting-agent-forwarding-w","errorCode":null,"errorMessage":"requesting agent forwarding: %w","messagePattern":"requesting agent forwarding: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/dump/dumper.go","lineNumber":719,"sourceCode":"\t\t\tif useBastion {\n\t\t\t\terr = agent.ForwardToAgent(client, f.keyRing)\n\t\t\t\tif err != nil {\n\t\t\t\t\terr = fmt.Errorf(\"forwarding ssh auth to keyring: %w\", err)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif err == nil && useBastion {\n\t\t\tsession, err := client.NewSession()\n\t\t\tif err != nil {\n\t\t\t\tfinished <- fmt.Errorf(\"creating ssh session: %w\", err)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tdefer session.Close()\n\n\t\t\terr = agent.RequestAgentForwarding(session)\n\t\t\tif err != nil {\n\t\t\t\tfinished <- fmt.Errorf(\"requesting agent forwarding: %w\", err)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\n\t\tfinished <- err\n\t}()\n\n\tselect {\n\tcase <-ctx.Done():\n\t\tklog.Infof(\"cancelling SSH tcp connection due to context completion\")\n\t\tconn.Close() // Close the TCP connection to force cancellation\n\t\t<-finished   // Wait for cancellation\n\t\treturn nil, ctx.Err()\n\tcase err := <-finished:\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif !useBastion {","sourceCodeStart":701,"sourceCodeEnd":737,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/dump/dumper.go#L701-L737","documentation":"Setting up SSH agent forwarding on the bastion session failed (agent.RequestAgentForwarding); the channel needed to forward the local agent through the bastion to the target node could not be opened.","triggerScenarios":"Thrown at pkg/dump/dumper.go:719 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the SSH server on the bastion permits agent forwarding","Ensure a local ssh-agent with loaded keys is available","Retry the dump; transient session-setup failures occur"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}