在帮助运维搭建预生产的过程中,搭建完项目调试接口时报了redis的Could not get a resource from the pool的错误,特此记录。
出现的原因是需要修改redis的远程配置
进入redis的安装目录下 /**/redis/etc的目录中有个redis.conf,修改其中注释掉bind 127.0.0.1 将protected-mode修改为no
同时附上redis的启动及重启命令
启动:redis-server(redis-server redis.conf)
关闭:redis-cli shutdown