{"record":{"id":"9286a97b48e8bbd5","repo":"goharbor/harbor","slug":"bad-redis-url-core","errorCode":null,"errorMessage":"bad _REDIS_URL_CORE","messagePattern":"bad _REDIS_URL_CORE","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/main.go","lineNumber":154,"sourceCode":"\n\tos.Exit(0)\n}\n\nfunc main() {\n\t// Start pprof server\n\tlib.StartPprof()\n\n\trunMode := flag.String(\"mode\", \"normal\", \"The harbor-core container run mode, it could be normal, migrate or skip-migrate, default is normal\")\n\tflag.Parse()\n\n\tweb.BConfig.WebConfig.Session.SessionOn = true\n\tweb.BConfig.WebConfig.Session.SessionName = config.SessionCookieName\n\t// the core db used for beego session\n\tredisCoreURL := os.Getenv(\"_REDIS_URL_CORE\")\n\tif len(redisCoreURL) > 0 {\n\t\t_, err := url.Parse(redisCoreURL)\n\t\tif err != nil {\n\t\t\tpanic(\"bad _REDIS_URL_CORE\")\n\t\t}\n\t\t// configure the beego session redis\n\t\tweb.BConfig.WebConfig.Session.SessionProvider = session.HarborProviderName\n\t\tweb.BConfig.WebConfig.Session.SessionProviderConfig = redisCoreURL\n\t}\n\n\tlog.Info(\"initializing cache ...\")\n\t// the harbor db used for harbor business, use core db if not specified\n\tredisHarborURL := os.Getenv(\"_REDIS_URL_HARBOR\")\n\tif redisHarborURL == \"\" {\n\t\tredisHarborURL = redisCoreURL\n\t}\n\tu, err := url.Parse(redisHarborURL)\n\tif err != nil {\n\t\tpanic(\"bad _REDIS_URL_HARBOR\")\n\t}\n\tif err := cache.Initialize(u.Scheme, redisHarborURL); err != nil {\n\t\tlog.Fatalf(\"failed to initialize cache: %v\", err)","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/core/main.go#L136-L172","documentation":"Error \"bad _REDIS_URL_CORE\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/core/main.go:154 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}