goharbor/harbor · error

bad _REDIS_URL_CORE

Error message

bad _REDIS_URL_CORE

What it means

Error "bad _REDIS_URL_CORE" thrown in goharbor/harbor.

Source

Thrown at src/core/main.go:154

	os.Exit(0)
}

func main() {
	// Start pprof server
	lib.StartPprof()

	runMode := flag.String("mode", "normal", "The harbor-core container run mode, it could be normal, migrate or skip-migrate, default is normal")
	flag.Parse()

	web.BConfig.WebConfig.Session.SessionOn = true
	web.BConfig.WebConfig.Session.SessionName = config.SessionCookieName
	// the core db used for beego session
	redisCoreURL := os.Getenv("_REDIS_URL_CORE")
	if len(redisCoreURL) > 0 {
		_, err := url.Parse(redisCoreURL)
		if err != nil {
			panic("bad _REDIS_URL_CORE")
		}
		// configure the beego session redis
		web.BConfig.WebConfig.Session.SessionProvider = session.HarborProviderName
		web.BConfig.WebConfig.Session.SessionProviderConfig = redisCoreURL
	}

	log.Info("initializing cache ...")
	// the harbor db used for harbor business, use core db if not specified
	redisHarborURL := os.Getenv("_REDIS_URL_HARBOR")
	if redisHarborURL == "" {
		redisHarborURL = redisCoreURL
	}
	u, err := url.Parse(redisHarborURL)
	if err != nil {
		panic("bad _REDIS_URL_HARBOR")
	}
	if err := cache.Initialize(u.Scheme, redisHarborURL); err != nil {
		log.Fatalf("failed to initialize cache: %v", err)

View on GitHub (pinned to 7b2fd08cc5)

When it happens

Trigger: Thrown at src/core/main.go:154 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/9286a97b48e8bbd5. Report an issue: GitHub.