{"record":{"id":"39d2582f412ccc28","repo":"redis/go-redis","slug":"failed-to-enable-maintnotifications-server-does-n","errorCode":null,"errorMessage":"failed to enable maintnotifications: server does not support RESP3 (HELLO command failed)","messagePattern":"failed to enable maintnotifications: server does not support RESP3 \\(HELLO command failed\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"redis.go","lineNumber":1044,"sourceCode":"\t\tendpointType = c.opt.MaintNotificationsConfig.EndpointType\n\t\tmaintNotifMode = c.opt.MaintNotificationsConfig.Mode\n\t}\n\tc.optLock.RUnlock()\n\n\t// Maintenance notifications require RESP3 push frames. If HELLO failed\n\t// and the connection fell back to RESP2, there is no point in sending\n\t// CLIENT MAINT_NOTIFICATIONS: the server either rejects it (making the\n\t// error misleading) or accepts it silently, leaving the client unable\n\t// to receive any notifications. Decide based on the actual negotiated\n\t// protocol rather than the requested one.\n\tif maintNotifEnabled && protocol == 3 && !helloOK {\n\t\tif maintNotifMode == maintnotifications.ModeEnabled {\n\t\t\t// Explicitly requested - fail fast with a clear reason.\n\t\t\tcn.GetStateMachine().Transition(pool.StateClosed)\n\t\t\tif errorCallback := pool.GetMetricErrorCallback(); errorCallback != nil {\n\t\t\t\terrorCallback(ctx, \"HANDSHAKE_FAILED\", cn, \"HANDSHAKE_FAILED\", true, 0)\n\t\t\t}\n\t\t\treturn fmt.Errorf(\"failed to enable maintnotifications: server does not support RESP3 (HELLO command failed)\")\n\t\t}\n\t\t// auto/other modes: silently disable maintnotifications for this client.\n\t\tc.optLock.Lock()\n\t\tc.opt.MaintNotificationsConfig.Mode = maintnotifications.ModeDisabled\n\t\tc.optLock.Unlock()\n\t\tif err := c.disableMaintNotificationsUpgrades(); err != nil {\n\t\t\tinternal.Logger.Printf(ctx, \"failed to disable maintnotifications in auto mode: %v\", err)\n\t\t}\n\t\tmaintNotifEnabled = false\n\t}\n\n\tvar maintNotifHandshakeErr error\n\tif maintNotifEnabled && protocol == 3 {\n\t\t// Hold the manager read lock across the handshake and tracking so a\n\t\t// concurrent downgrade cannot remove pool-level listeners before a\n\t\t// successfully enabled connection is tracked for retirement.\n\t\tc.maintNotificationsManagerLock.RLock()\n\t\tmanager := c.maintNotificationsManager","sourceCodeStart":1026,"sourceCodeEnd":1062,"githubUrl":"https://github.com/redis/go-redis/blob/c5cad058c72f58370553b48566302303cf8a2e89/redis.go#L1026-L1062","documentation":"Error \"failed to enable maintnotifications: server does not support RESP3 (HELLO command failed)\" thrown in redis/go-redis.","triggerScenarios":"Thrown at redis.go:1044 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":"c5cad058c72f58370553b48566302303cf8a2e89","analyzedAt":"2026-09-01T06:50:53.388Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}