Description of the problem:
1.Could not get a resource from the pool, Connection refused: connect
The client link on the windows java side was rejected, think about the problem
1. The redis installed by linux in Vmware has been started normally
2. The ssh client in windows can be used to link linux to operate redis 3. The linux
firewall has been closed
4. The ip of linux can also be spelled out
It stands to reason that there should be no problem, use telnet to test the port
telnet 192.168.0.104 6379
It is found that the ports cannot be spelled out, but other ports under linu can be spelled out, indicating that it is the problem of redis's own configuration.
Looking at the configuration file, I found that the configuration file is bound to the local ip. This configuration will cause other ip logins to be rejected, so we comment it out.
Next, I will test and run it. The first link has been linked, indicating that the problem has been solved, but a new problem has arisen: DENIED Redis is running in protected mode because protected mode is enabled…
The problem says that redis is currently in protected mode, and non-local client connections are not allowed. We can solve it by setting a password for redis, and then writing the password when the client connects.
The command to configure redis
config set requirepass 123 -> 123 is the password
Now the java client can link the password by configuring the host ip number