goharbor/harbor · error

failed to connect to tcp:%s after %d seconds

Error message

failed to connect to tcp:%s after %d seconds

What it means

Error "failed to connect to tcp:%s after %d seconds" thrown in goharbor/harbor.

Source

Thrown at src/common/utils/utils.go:128

					n = n * 2
					time.Sleep(time.Duration(interval) * time.Second)
					continue
				}
				if err = conn.Close(); err != nil {
					log.Errorf("failed to close the connection: %v", err)
				}
				success <- 1
				break loop
			}
		}
	}()

	select {
	case <-success:
		return nil
	case <-time.After(time.Duration(timeout) * time.Second):
		cancel <- 1
		return fmt.Errorf("failed to connect to tcp:%s after %d seconds", addr, timeout)
	}
}

// ParseTimeStamp parse timestamp to time
func ParseTimeStamp(timestamp string) (*time.Time, error) {
	i, err := strconv.ParseInt(timestamp, 10, 64)
	if err != nil {
		return nil, err
	}
	t := time.Unix(i, 0)
	return &t, nil
}

// ConvertMapToStruct is used to fill the specified struct with map.
func ConvertMapToStruct(object any, values any) error {
	if object == nil {
		return errors.New("nil struct is not supported")
	}

View on GitHub (pinned to 7b2fd08cc5)

When it happens

Trigger: Thrown at src/common/utils/utils.go:128 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16). Data as JSON: /api/errors/39a47b5916cfab12. Report an issue: GitHub.