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