DENIED Redis is running in protected mode: Redis is running in protected mode
Redis의미
Redis가 protected mode로 실행 중이어서 외부(loopback이 아닌 주소)의 비밀번호 없는 연결을 거부했다. 보안을 위해 인증되지 않은 원격 접근이 차단된다.
원인
모든 인터페이스에 바인딩된(또는 느슨한 bind 설정의) Redis가 비밀번호(requirepass) 설정 없이 외부 클라이언트의 연결을 받았다. protected-mode는 기본적으로 켜져 있으며 이 상황에서 loopback이 아닌 요청을 차단한다. 보안 설정이 없는 Redis가 실수로 인터넷에 노출되었음을 나타낸다.
해결 방법
올바른 해결책은 보안을 강화하는 것이다: requirepass(또는 ACL 사용자)로 강력한 비밀번호를 설정하고 bind로 신뢰할 수 있는 인터페이스에서만 수신한다. 원격 접근이 필요하다면 비밀번호/TLS로 보호하고 방화벽으로 6379 포트를 제한한다. protected-mode no는 폐쇄된/안전한 네트워크에서만 일시적으로 설정할 수 있으며, 인터넷에 노출된 설치에서는 절대 권장하지 않는다.
같은 데이터베이스의 다른 항목
- BUSYGROUP Consumer Group name already existsConsumer group already exists
- NOGROUP No such key or consumer groupNo such key or consumer group in stream
- NOTBUSY No scripts in execution right nowNo scripts in execution right now
- ERR Can't execute '<cmd>': only (P|S)SUBSCRIBE / (P|S)UNSUBSCRIBE / PING / QUIT / RESET are allowed in this contextCommand not allowed in subscribe context (subscribe 컨텍스트에서 허용되지 않는 명령)
- ERR SELECT is not allowed in cluster modeSELECT is not allowed in cluster mode
- ERR wrong number of arguments for commandWrong number of arguments for command
- ERR Background save already in progressBackground save already in progress