Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redis.exceptions.ResponseError: Writing binlog failed, maybe no space left on device (主备同步无法恢复) #3013

Open
fdl66 opened this issue Feb 13, 2025 · 3 comments
Labels
✏️ Feature New feature or request

Comments

@fdl66
Copy link

fdl66 commented Feb 13, 2025

Which PikiwiDB functionalities are relevant/related to the feature request?

No response

Description

版本: 4.0.2-alpha
#2520
此链接中提到的恢复方案——执行diskrecovery 命令, 只能恢复主机的访问, 备机同步还是异常的,无法恢复。

Proposed solution

除了清理数据后全量同步, 是否还有其他方案恢复?

Alternatives considered

有没有办法恢复主备增量同步。重新全量同步有点费劲。

@fdl66 fdl66 added the ✏️ Feature New feature or request label Feb 13, 2025
@fdl66
Copy link
Author

fdl66 commented Feb 13, 2025

主机日志:

I20250213 19:32:39.849817 3056603 pika_rm.cc:69] Add Slave Node, db: (db0), ip_port: x.x.x.x:9222
I20250213 19:32:39.849833 3056603 pika_repl_server_conn.cc:156] DB: db0 TrySync Success, Session: 657
W20250213 19:32:39.903905 3056604 pika_rm.cc:163] (db0) Read Binlog error : IO error: File Does Not Exists
W20250213 19:32:39.903991 3056604 pika_repl_server_conn.cc:354] Activate Binlog Sync failed db=db0_,ip_port=x.x.x.x:9222,session id=0 IO error: File Does Not Exists
I20250213 19:32:39.904038 3056601 holy_thread.cc:293] receive noti close
I20250213 19:32:39.904093 3056601 pika_repl_server_thread.cc:24] ServerThread Close Slave Conn, fd: 286, ip_port: x.x.x.x:56460
# Replication(MASTER)
role:master
ReplicationID:513692040668115baa7603f425a1afd6a0cad4e2db31007991
connected_slaves:0
is_eligible_for_master_election:true
db0:binlog_offset=365 37748804,safety_purge=write2file355
slave_repl_offset:38310772804


root@debian:/pika/pika402/log/log_db0# ls -alh
total 941M
drwxr-xr-x  2 root root  260 Feb 13 17:41 .
drwxr-xr-x 25 root root  740 Feb 12 21:06 ..
-rw-r--r--  1 root root  64K Feb 13 17:28 manifest
-rw-r--r--  1 root root 101M Feb 13 17:38 write2file356
-rw-r--r--  1 root root 101M Feb 13 17:38 write2file357
-rw-r--r--  1 root root 101M Feb 13 17:38 write2file358
-rw-r--r--  1 root root 101M Feb 13 17:39 write2file359
-rw-r--r--  1 root root 101M Feb 13 17:39 write2file360
-rw-r--r--  1 root root 101M Feb 13 17:39 write2file361
-rw-r--r--  1 root root 101M Feb 13 17:39 write2file362
-rw-r--r--  1 root root 101M Feb 13 17:39 write2file363
-rw-r--r--  1 root root 101M Feb 13 17:39 write2file364
-rw-r--r--  1 root root  40M Feb 13 17:43 write2file365

备机日志:

==> pika.INFO <==
I20250213 19:31:31.093528 854912 pika_repl_client.cc:199] Try Send Meta Sync Request to Master (x.x.x.x:9222)
I20250213 19:31:31.095773 854861 pika_server.cc:452] Mark try connect finish
I20250213 19:31:31.095821 854861 pika_repl_client_conn.cc:155] Finish to handle meta sync response
I20250213 19:31:31.236708 854861 pika_repl_client_conn.cc:231] DB: db0 TrySync Ok


I20250213 19:31:31.290748 854860 client_thread.cc:458] Get request error 3
I20250213 19:31:31.290829 854860 client_thread.cc:465] close connection 262 reason 1 1
I20250213 19:31:31.290904 854860 pika_repl_client_thread.cc:20] ReplClient Close conn, fd=262, ip_port=x.x.x.x:11222
W20250213 19:31:31.290940 854860 pika_repl_client_thread.cc:29] Master conn disconnect : x.x.x.x:11222 try reconnect

# Replication(SLAVE)
role:slave
ReplicationID:513692040668115baa7603f425a1afd6a0cad4e2db31007991
master_host:x.x.x.x
master_port:9222
master_link_status:down
repl_connect_status:
db0:no_connect
slave_priority:100
slave_read_only:1
db_repl_state:(db0:NoConnect)
is_eligible_for_master_election:false
db0:binlog_offset=365 37748729,safety_purge=write2file355
slave_repl_offset:38310772729

root@debian:/pika/pika402/log/log_db0# ls -alh
total 937M
drwxr-xr-x  2 root root  260 Feb 13 17:41 .
drwxr-xr-x 31 root root  860 Feb 11 20:31 ..
-rw-r--r--  1 root root  64K Feb 13 17:28 manifest
-rw-r--r--  1 root root 101M Feb 13 17:40 write2file356
-rw-r--r--  1 root root 101M Feb 13 17:40 write2file357
-rw-r--r--  1 root root 101M Feb 13 17:40 write2file358
-rw-r--r--  1 root root 101M Feb 13 17:40 write2file359
-rw-r--r--  1 root root 101M Feb 13 17:40 write2file360
-rw-r--r--  1 root root 101M Feb 13 17:41 write2file361
-rw-r--r--  1 root root 101M Feb 13 17:41 write2file362
-rw-r--r--  1 root root 101M Feb 13 17:41 write2file363
-rw-r--r--  1 root root 101M Feb 13 17:41 write2file364
-rw-r--r--  1 root root  36M Feb 13 17:41 write2file365


@Mixficsol
Copy link
Collaborator

diskrecovery 命令是读命令,需要确认一下从节点是否执行了这个命令

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


The diskrecovery command is a read command. You need to confirm whether the slave node has executed this command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✏️ Feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants