Explain in detail that the Java client can’t link to the redis solution

Problem Description:

1.Could not get a resource from the pool,Connection refused: connect

The windows java client link is rejected. Think about the problem

1. Redis installed on Linux in VMware has been started normally

2. You can operate redis by linking Linux with SSH client on windows

3. The Linux firewall has been closed

4. You can spell Linux IP

It's supposed to be OK. Use telnet to test the port

telnet 192.168. 0.104 6379

It is found that the ports can not be connected, but other ports under Linu can be connected, which indicates that redis has its own configuration problem

After looking at the configuration file, we found that the configuration file is bound to the local IP. This configuration will result in other IP logins being rejected, so we commented it out

Next, the test run will be started. It has been linked to explain that the problem has been solved, but there are new problems: denied redis is running in protected mode because protected mode is enabled

This problem says that redis is currently in protected mode and does not allow non local client links. We can solve it by setting a password for redis and writing the password when the client links

Commands for configuring redis

Now the Java client can link the password by configuring the host IP number

The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>