Developer tools dump stack traces, exit codes, and jargon. Figuring out *what to do next* often means searching the same Stack Overflow answers again.
| Rule( |
| 9 | id="redis.connection_refused", |
| 10 | tool="redis", |
| 11 | title="Redis connection failed", |
| 12 | why="The application tried to connect to Redis, but the connection was refused.", |
| 13 | checks=( |
| 14 | "Is Redis running?", |
| 15 | "Is port 6379 listening?", |
| 16 | "Is REDIS_URL correct?", |
| 17 | ), |
| 18 | fixes=( |
| 19 | "docker compose up -d redis", |
| 20 | "Check REDIS_URL", |
| 21 | "Check whether port 6379 is exposed", |
| 22 | ), |
| 23 | patterns=( |
| 24 | Pattern("ECONNREFUSED", kind="exact", required=True), |
| 25 | Pattern("6379", kind="exact", required=True), |
| 26 | ), |
| 27 | confidence="high", |
| 28 | secondary=("redis", "connect"), |
| 29 | ), |
| 30 | Rule( |
| 31 | id="redis.noauth", |
| 32 | tool="redis", |
| 33 | title="Redis authentication required (NOAUTH)", |
| 34 | why="Redis requires a password but the client did not authenticate.", |
| 35 | checks=( |
| 36 | "Does REDIS_URL include the password?", |
| 37 | "Was requirepass enabled on the server?", |
| 38 | ), |
| 39 | fixes=( |
| 40 | "Set the password in REDIS_URL (redis://:password@host:6379)", |
| 41 | "Or call AUTH before other commands", |
| 42 | ), |
| 43 | patterns=( |
| 44 | Pattern("NOAUTH Authentication required", kind="exact", required=True), |
| 45 | ), |
| 46 | confidence="high", |
| 47 | secondary=("redis",), |
| 48 | ), |
| 49 | Rule( |
| 50 | id="redis.wrongpass", |
| 51 | tool="redis", |
| 52 | title="Redis wrong password (WRONGPASS)", |
| 53 | why="The client supplied a Redis password that the server rejected.", |
| 54 | checks=( |
| 55 | "Is the password in REDIS_URL correct?", |
| 56 | "Did the server password change?", |
| 57 | ), |
| 58 | fixes=( |
| 59 | "Update REDIS_URL / Redis credentials", |
| 60 | "Confirm requirepass on the Redis server", |
| 61 | ), |
| 62 | patterns=( |
| 63 | Pattern( |
| 64 | r"WRONGPASS|invalid password|invalid username-password pair", |
| 65 | kind="regex", |
| 66 | required=True, |
| 67 | ), |
| 68 | ), |
| 69 | confidence="high", |
| 70 | secondary=("redis",), |
| 71 | ), |
| 72 | Rule( |
| 73 | id="redis.readonly", |
| 74 | tool="redis", |
| 75 | title="Redis replica is read-only (READONLY)", |
| 76 | why="A write was sent to a Redis replica that only accepts read commands.", |
| 77 | checks=( |
| 78 | "Are you connected to a replica instead of the primary?", |
| 79 | "Is REDIS_URL pointing at the correct node?", |
| 80 | ), |
| 81 | fixes=( |
| 82 | "Connect to the Redis primary for writes", |
| 83 | "Update REDIS_URL to the primary endpoint", |
| 84 | ), |
| 85 | patterns=( |
| 86 | Pattern( |
| 87 | r"READONLY|You can't write against a read only replica", |
| 88 | kind="regex", |
| 89 | required=True, |
| 90 | ), |
| 91 | ), |
| 92 | confidence="high", |
| 93 | secondary=("redis",), |
| 94 | ), |
| 95 | Rule( |
| 96 | id="redis.misconf", |
| 97 | tool="redis", |
| 98 | title="Redis MISCONF — stop-writes-on-bgsave-error", |
| 99 | why="Redis stopped accepting writes because a background save (RDB) failed.", |
| 100 | checks=( |
| 101 | "Is the disk full on the Redis host?", |
| 102 | "Do Redis logs show BGSAVE errors?", |
| 103 | ), |
| 104 | fixes=( |
| 105 | "Free disk space on the Redis host", |
| 106 | "Fix Redis persistence permissions/path", |
| 107 | "As a temporary measure: CONFIG SET stop-writes-on-bgsave-error no", |
| 108 | ), |
| 109 | patterns=( |
| 110 | Pattern( |
| 111 | r"MISCONF|stop-writes-on-bgsave-error|" |
| 112 | r"Redis is configured to save RDB snapshots", |
| 113 | kind="regex", |
| 114 | required=True, |
| 115 | ), |
| 116 | ), |
| 117 | confidence="high", |
| 118 | secondary=("redis",), |
| 119 | ), |
| 120 | Rule( |
| 121 | id="redis.loading", |
| 122 | tool="redis", |
| 123 | title="Redis is loading the dataset", |
| 124 | why="Redis is still loading data from disk and is temporarily unavailable for commands.", |
| 125 | checks=( |
| 126 | "Did Redis just restart?", |
| 127 | "Is the dataset very large?", |
| 128 | ), |
| 129 | fixes=( |
| 130 | "Wait for loading to finish", |
| 131 | "Retry the connection shortly", |
| 132 | ), |
| 133 | patterns=( |
| 134 | Pattern( |
| 135 | r"LOADING Redis is loading|Redis is loading the dataset", |
| 136 | kind="regex", |
| 137 | required=True, |
| 138 | ), |
| 139 | ), |
| 140 | confidence="high", |
| 141 | ), |
| 142 | ] |