{"record":{"id":"a1324965a550d830","repo":"redis/redis-py","slug":"maintenance-notifications-are-not-supported-with-u-a13249","errorCode":null,"errorMessage":"Maintenance notifications are not supported with Unix domain socket connections","messagePattern":"Maintenance notifications are not supported with Unix domain socket connections","errorType":"exception","errorClass":"RedisError","httpStatus":null,"severity":"error","filePath":"redis/client.py","lineNumber":432,"sourceCode":"                \"decode_responses\": decode_responses,\n                \"retry_on_error\": retry_on_error,\n                \"retry\": copy.deepcopy(retry),\n                \"max_connections\": max_connections,\n                \"health_check_interval\": health_check_interval,\n                \"client_name\": client_name,\n                \"driver_info\": computed_driver_info,\n                \"redis_connect_func\": redis_connect_func,\n                \"credential_provider\": credential_provider,\n                \"protocol\": protocol,\n                \"legacy_responses\": legacy_responses,\n            }\n            # based on input, setup appropriate connection args\n            if unix_socket_path is not None:\n                if (\n                    maint_notifications_config\n                    and maint_notifications_config.enabled is True\n                ):\n                    raise RedisError(\n                        \"Maintenance notifications are not supported with Unix \"\n                        \"domain socket connections\"\n                    )\n                kwargs.update(\n                    {\n                        \"path\": unix_socket_path,\n                        \"connection_class\": UnixDomainSocketConnection,\n                        \"maint_notifications_config\": MaintNotificationsConfig(\n                            enabled=False\n                        ),\n                    }\n                )\n            else:\n                # TCP specific options\n                kwargs.update(\n                    {\n                        \"host\": host,\n                        \"port\": port,","sourceCodeStart":414,"sourceCodeEnd":450,"githubUrl":"https://github.com/redis/redis-py/blob/6a6b581b48225afa0b76912d1028c6035baee932/redis/client.py#L414-L450","documentation":"Raised as RedisError during Redis.__init__ when a Unix domain socket path is supplied AND maintenance notifications are enabled. Maintenance notifications rely on RESP3 out-of-band pushes delivered over TCP; Unix socket connections do not support this transport, so the combination is rejected up front. The constructor then forces maint_notifications_config.enabled = False for the socket connection.","triggerScenarios":"Constructing Redis(unix_socket_path='/path/sock', maint_notifications_config=MaintNotificationsConfig(enabled=True)). The check at client.py:428-435 fires before the connection pool is created.","commonSituations":"Running Redis locally via unix socket (common in sidecar/same-host setups) and copying a config that enables maintenance notifications intended for a TCP/cluster deployment. Enabling OSS cluster maintenance notifications without switching off unix sockets.","solutions":["Disable maintenance notifications when using a unix socket: pass MaintNotificationsConfig(enabled=False) or omit it.","Switch to a TCP connection (host/port) if you need maintenance notifications."],"exampleFix":"# before\nr = Redis(unix_socket_path='/var/run/redis/redis.sock',\n         maint_notifications_config=MaintNotificationsConfig(enabled=True))  # RedisError\n# after\nr = Redis(unix_socket_path='/var/run/redis/redis.sock',\n         maint_notifications_config=MaintNotificationsConfig(enabled=False))","handlingStrategy":"validation","validationCode":"if unix_socket_path and maint_notifications_config and maint_notifications_config.enabled:\n    raise ValueError(\"disable maintenance notifications for unix socket\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not enable maintenance notifications over unix sockets.","Validate transport vs. feature matrix at config-build time."],"tags":["configuration","maintenance-notifications","unix-socket","resp3"],"backgroundTag":null,"analyzedSha":"6a6b581b48225afa0b76912d1028c6035baee932","analyzedAt":"2026-08-10T12:52:44.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-21T04:17:39.646Z"}