環(huán)境:3.0.7 redis八節(jié)點(diǎn)集群4主4從 開發(fā)測試環(huán)境

棲霞網(wǎng)站制作公司哪家好,找創(chuàng)新互聯(lián)!從網(wǎng)頁設(shè)計(jì)、網(wǎng)站建設(shè)、微信開發(fā)、APP開發(fā)、響應(yīng)式網(wǎng)站建設(shè)等網(wǎng)站項(xiàng)目制作,到程序開發(fā),運(yùn)營維護(hù)。創(chuàng)新互聯(lián)自2013年起到現(xiàn)在10年的時(shí)間,我們擁有了豐富的建站經(jīng)驗(yàn)和運(yùn)維經(jīng)驗(yàn),來保證我們的工作的順利進(jìn)行。專注于網(wǎng)站建設(shè)就選創(chuàng)新互聯(lián)。
操作:清除集群持久化數(shù)據(jù)
#redis-cli -c -p 6383 -h 172.31.103.238 登陸之后
cluster nodes 察看節(jié)點(diǎn)信息 登陸master節(jié)點(diǎn)進(jìn)行刪除 flushall
在其中一個(gè)節(jié)點(diǎn)執(zhí)行時(shí)抱錯(cuò):
172.31.103.238:6383> flushdb
(error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.
網(wǎng)上信息:
今天運(yùn)行Redis時(shí)發(fā)生錯(cuò)誤,錯(cuò)誤信息如下:
(error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.
Redis被配置為保存數(shù)據(jù)庫快照,但它目前不能持久化到硬盤。用來修改集合數(shù)據(jù)的命令不能用。請查看Redis日志的詳細(xì)錯(cuò)誤信息。
原因:
強(qiáng)制關(guān)閉Redis快照導(dǎo)致不能持久化。
解決方案:
運(yùn)行config set stop-writes-on-bgsave-error no 命令后,關(guān)閉配置項(xiàng)stop-writes-on-bgsave-error解決該問題。
root@ubuntu:/usr/local/redis/bin# ./redis-cli
127.0.0.1:6379> config set stop-writes-on-bgsave-error no
OK
127.0.0.1:6379> lpush myColour "red"
(integer) 1
察看自己配置文件:
stop-writes-on-bgsave-error yes
雖然是測試環(huán)境但是沒有立刻修改,登陸到相應(yīng)節(jié)點(diǎn)上
df -h 察看root滿了
[root@VM-172-31-103-238 /]#df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda3 35G 35G 0 100% /
查找到罪魁禍?zhǔn)资情_發(fā)搞的日志文件33g
確認(rèn)之后刪除之
刪除之后察看
[root@VM-172-31-103-238 /]#df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda3 35G 35G 0 100% /
沒有釋放
[root@VM-172-31-103-238 /]#lsof | grep delete
java 21037 root 1w REG 252,3 35273113600 395356 /opt/server/logs/catalina.out (deleted)
java 21037 root 2w REG 252,3 35273113600 395356 /opt/server/logs/catalina.out (deleted)
[root@VM-172-31-103-238 /]#kill -9 21037
[root@VM-172-31-103-238 /]#df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda3 35G 2.0G 32G 6% /
再次執(zhí)行
[root@VM-172-31-103-73 /cluster]#redis-cli -c -p 6383 -h 172.31.103.238
172.31.103.238:6383> flushall
OK
                當(dāng)前題目:記一次磁盤空間爆滿導(dǎo)致的持久化報(bào)錯(cuò)
                
                文章分享:http://www.chinadenli.net/article38/igpipp.html
            
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供企業(yè)網(wǎng)站制作、微信公眾號(hào)、網(wǎng)站設(shè)計(jì)、小程序開發(fā)、軟件開發(fā)、網(wǎng)站設(shè)計(jì)公司
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)