In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Redis replication faq
Set key on the 1.master side, no key is received on the slave side
Contents of slave log:
Redis Error condition on socket for SYNC: Broken pipe
Solution: add bind 0.0.0.0 to the masterside to restart redis.
2. Password authentication
In the configuration file
Requirepass master (password)
When operating: redis-cli-p 6379
127.0.0.1 purl 6379 > set h helloworld
(error) NOAUTH Authentication required.
127.0.0.1 purl 6379 > auth master
OK
127.0.0.1 purl 6379 > set h helloworld
OK
127.0.0.1 set number 6379 > 888
(error) NOAUTH Authentication required.
In this way, you have to enter the password for each operation:
Can be set at startup: redis-cli-a master (password)-p 6379
Slave side: profile settings masterauth master
Redis-cli-p 6380
127.0.0.1 6380 > get h
"helloworld"
3.slave write
On the slave side, write appears (error) READONLY You can't write against a read only slave.
We can use the info command to view the information of the master and slave servers, and the info command on the slave machine can see
Role:slave
Master_host:masterip
Master_port:masterport
Master_link_status:up proves that it is connected to the host.
Use the info command on the host
Role:master
Several slave computers are connected at the same time.
Connected_slaves:1
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.