1. 程式人生 > >redis遠端連線異常:Cannot get Jedis connection/Could not get a resource from the pool

redis遠端連線異常:Cannot get Jedis connection/Could not get a resource from the pool

如果是遠端連線redis,多數情況下是沒有禁用127.0.0.1

redis預設是隻允許本機訪問的,需要在redis.conf配置檔案將127.0.0.1給禁用掉,註釋掉即可。允許外部訪問

redis還有個保護模式,預設為yes 改為no, protected-mode no

建議設定個密碼,不然任何知道地址埠的情況下都可以連線了。