{"record":{"id":"39a47b5916cfab12","repo":"goharbor/harbor","slug":"failed-to-connect-to-tcp-s-after-d-seconds","errorCode":null,"errorMessage":"failed to connect to tcp:%s after %d seconds","messagePattern":"failed to connect to tcp:(.+?) after (.+?) seconds","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/common/utils/utils.go","lineNumber":128,"sourceCode":"\tselect {\n\tcase <-success:\n\t\treturn nil\n\tcase <-time.After(time.Duration(timeout) * time.Second):\n\t\tcancel <- 1\n\t\treturn fmt.Errorf(\"failed to connect to tcp:%s after %d seconds\", addr, timeout)\n\t}\n}","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/common/utils/utils.go#L110-L146","documentation":"Timeout error in TestTCPConn: repeated TCP dial attempts to the address did not succeed within the configured timeout, so the helper gives up and reports the address and elapsed seconds. It fires for unreachable hosts, closed ports, or firewalled connections (e.g. during DB/registry health checks).","triggerScenarios":"Thrown at src/common/utils/utils.go:128 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the target host and port are correct and the service is listening","Check network/firewall rules between Harbor and the endpoint","Increase the timeout or retry once the network issue is resolved"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","contentChangedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}