Could not get a resource from the pool
Key error information: could not get a resource from the pool
The common reason is that redis on the remote server is not configured properly.
The solutions are as follows: (1) redis Bind in conf: 127.0 0.1 comment out; (2) Redis The protected mode yes in conf is changed to protected mode No
According to the above solution, this problem can be solved. However, taking springboot as an example, this still cannot solve the problem because of the application The redis configuration in YML is incorrect.
The problem can be solved according to the following configuration:
The reason for this configuration is that the Maven dependency spring boot starter data redis is used. Of course, if you don't want to configure like this, you can write a jedis by yourself, but usually Maven already provides it, so you don't have to make wheels by yourself.
For details, please refer to the following: addition, deletion and modification of redis connected to redis in Java: https://www.cnblogs.com/youcong/p/8098881.html
If you haven't installed redis, you can refer to my article on redis installation and precautions for client use