Tag Archives: In the pit of

Jedis exception resolution: noauth authentication required

The introduction
Before, the project worked just fine because the default was DB0. Then the new requirement came, instead of default DB0, it chose DB for the parameter.
the modified code is as follows, but an error NOAUTH Authentication required.

The solution
The problem is usually a password error, or a problem with the firewall on the Redis machine not turning off the lights.
I checked the password firewall etc and there is no problem.
later through the debug finally found the problem, modify the code is as follows:

when selecting a number the db, it needs to connect redis, but now I will choose the library code on the configuration code before the number, lead to the newspaper password error problem.
conclusion
The problem is actually very simple, actually calm down and think carefully can know what is wrong.
Programming requires a quiet mind, otherwise it is really difficult to make progress, I hope to remind myself.