royspeedy commented on issue #42123:
URL: https://github.com/apache/superset/issues/42123#issuecomment-5010859581

   Update on root cause:
   
   I traced the SQL Lab failure to the results backend layer, not PostgreSQL 
authentication.
   
   What I observed:
   - The log sequence was: “Running block 1 out of 1” → “Storing results in 
results backend” → failure.
   - Inside `superset shell`, `results_backend` was a `RedisCache` object.
   - Calling `results_backend.set()` / `results_backend.get()` initially failed 
with:
     `redis.exceptions.AuthenticationError: invalid username-password pair or 
user is disabled.`
   - A direct `redis-cli` test from inside the cluster returned `PONG`, which 
confirmed Redis authentication itself was valid.
   
   The key detail was that `CACHE_CONFIG` pointed to Redis DB 1, but the 
runtime `RESULTS_BACKEND` client was instantiated against Redis DB 0. That 
mismatch caused SQL Lab result storage to fail and surface as a misleading 
auth-style error.
   
   I fixed it by explicitly setting `RESULTS_BACKEND` in 
`configOverrides.cache` to use the same Redis host/password and `db=1`:
   
   ```python
   RESULTS_BACKEND = RedisCache(
       host="my-redis-master.databases.svc.cluster.local",
       port=6379,
       password=_redis_pass,
       db=1,
       key_prefix="superset_results",
       default_timeout=300,
   )
   ```
   
   After redeploying with Helm:
   - `vars(current_app.config["RESULTS_BACKEND"])` now shows both the read and 
write clients using `db=1`.
   - `results_backend.set("test_key", b"test_value")` returns `True`.
   - `results_backend.get("test_key")` returns `b'test_value'`.
   
   So the root cause is resolved: SQL Lab was failing during results backend 
storage because the runtime `RESULTS_BACKEND` Redis client was pointing to the 
wrong Redis DB. The PostgreSQL-like auth error was a misleading symptom of that 
misconfiguration.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to