连接Linux的redis遇到connection的问题

标题 Unable to connect to Redis

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'enableRedisKeyspaceNotificationsInitializer' defined in org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration: Invocation of init method failed; nested exception is org.springframework.data.redis.RedisConnectionFailureException: Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to 169.254.63.201:6379

连接线上的redis连接失败,原因是redis.conf里面的bind 127.0.0.1没有注释掉,如果不注释的话就只允许本机访问,还有protected-mode yes要改为protected-mode no,保存文件之后重启redis就可以连接了


版权声明:本文为weixin_44524763原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。