問題描述:
應用連接redis報錯Connection failure occurred. Restarting subscription task after 5000 ms
解決方式:
方式一:檢查並修改redis.conf中bind 127.0.0.1
為bind *
方式二:直接在redis.conf末尾新加一行bind *
注意配置文件讀取時下方配置會覆蓋上方配置
使用ps -ef|grep redis
,檢查結果中的./redis-server *:6379,若綁定了127.0.0.1后,結果為./redis-server 127.0.0.1:6379