今天用docker部署项目 redis容器也挂载了启动了 前端一直报这个 求大家帮忙看下
nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379 ### Cause: org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to 127.0.0.1:6379
这就是连不上哇,检查一下你的6379端口有没有开放,可能是防火墙拦住了
docker run -p 6379:6379 --name redis500 -v /home/redis/conf:/etc/redis/redis.conf -v /home/redis/data:/data -d redis redis-server /etc/redis/redis.conf --appendonly yes
我是这样运行的
本机为什么连不上,和防火墙没有关系吧,docker ps容器有在跑吗