goharbor/harbor · error

bad _REDIS_URL_HARBOR

Error message

bad _REDIS_URL_HARBOR

What it means

Error "bad _REDIS_URL_HARBOR" thrown in goharbor/harbor.

Source

Thrown at src/core/main.go:169

	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)
	}
	// when config/db init function is called, the cache is not ready,
	// enable config cache explicitly when the cache is ready
	dbCfg.EnableConfigCache()

	web.AddTemplateExt("htm")

	log.Info("initializing configurations...")
	config.Init()
	log.Info("configurations initialization completed")

	// default beego max memory and max upload size is 128GB, consider from some AI related image would be large,
	// also support customize it from the environment variables if the default value cannot satisfy some scenarios.
	web.BConfig.MaxMemory = config.GetBeegoMaxMemoryBytes()
	web.BConfig.MaxUploadSize = config.GetBeegoMaxUploadSizeBytes()

View on GitHub (pinned to 7b2fd08cc5)

When it happens

Trigger: Thrown at src/core/main.go:169 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/37b9fca401bfa89b. Report an issue: GitHub.