概述
1、Connecting to node 127.0.0.17000 [ERR] Sorry, can't connect to node 192.168.1.917000
redis集群:Connecting to node 127.0.0.1:7000: [ERR] Sorry, can't connect to node 192.168.1.91:7000
2016年12月17日 01:29:53
阅读数:6168
Connecting to node 127.0.0.1:7000: [ERR] Sorry, can't connect to node 192.168.1.91:7001
这个错误的话那就查看下你6个端口是否都启动了,没启动的话会报上面的错误
2、error) NOAUTH Authentication required.
出现认证问题,应该是设置了认证密码,输入密码既可以
方法一、
127.0.0.1:6379> auth "yourpassword"
例如密码是‘root’,当出现认证问题时候,输入“auth ‘root’”即可
127.0.0.1:6379> set name "fish"
(error) NOAUTH Authentication required.
127.0.0.1:6379> auth "root"
127.0.0.1:7000> auth joinu_1233
OK
方法二、
[root@bogon conf]# redis-cli -c -p 7000 -a joinu_1233
127.0.0.1:7000> set name fish
-> Redirected to slot [5798] located at 127.0.0.1:7002
OK
127.0.0.1:7002>
3、redis停止报错
Redis 停止时出现: (error) NOAUTH Authentication required.
复制代码
root@iZ25gdzs0p8Z:~# /etc/init.d/redis_6379 stop
Stopping ...
(error) NOAUTH Authentication required.
Waiting for Redis to shutdown ...
Waiting for Redis to shutdown ...
解决:
停止时要加登陆时密码。
[root@bogon conf]# redis-cli -c -p 7000 -a joinu_1233 shutdown
[root@bogon conf]# redis-cli -c -p 7000
Could not connect to Redis at 127.0.0.1:7000: Connection refused
Could not connect to Redis at 127.0.0.1:7000: Connection refused
not connected>
4、redis远程连接以及注意事项
[root@mch ~]# ps -ef | grep redis
root 2175 1 0 08:15 ? 00:00:05 /usr/local/bin/redis-server *:6379
/usr/local/bin/redis-server *:6379 中通过"*"就可以看出此时是允许所有的ip连接登录到这台redis服务上。
redis-cli -h 192.168.43.75 -p 6379 -a ilanniredis
5、reidis集群报错
[root@localhost src]# ./redis-trib.rb create --replicas 1 127.0.0.1:7000 127.0.0.1:7001 127.0.0.3:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005
报错:[ERR] Sorry, can't connect to node 172.0.0.0:7000
解决:重启centos系统,亲测,网上的都试过,没有用
6、在k8s里面连接redis报错
# redis-cli -h 10.104.130.187
Could not connect to Redis at 10.104.130.187:6379: No route to host
Could not connect to Redis at 10.104.130.187:6379: No route to host
解决:
把endpoint 的地址改成内网地址即可
7、k8s中连接redis错误: java.lang.NumberFormatException: For input string: "6379@16379"
把java配置文件中的端口写死,写成 6379
参考地址:https://blog.csdn.net/murongxuesheng/article/details/81562846
转载于:https://www.cnblogs.com/effortsing/p/10013320.html
最后
以上就是复杂秀发为你收集整理的redis报错解决的全部内容,希望文章能够帮你解决redis报错解决所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复