BR Backup Reports ErrBackupNoLeader: Backup No Leader Error

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: [br备份报ErrBackupNoLeader]backup no leader的错误](br备份报ErrBackupNoLeader]backup no leader的错误 - TiDB 的问答社区)

| username: tug_twf

【TiDB Usage Environment】Production\Test Environment\POC
【TiDB Version】5.1.4 br v5.1.4
【Encountered Problem】br backup failed (BR:Backup:ErrBackupNoLeader]backup no leader)
【Reproduction Path】Execute br backup:
【Problem Phenomenon and Impact】
【Attachment】
Error message:
[2022/08/26 05:45:19.489 +08:00] [ERROR] [backup.go:41] [“failed to backup”] [error=“can not find leader: [BR:Backup:ErrBackupNoLeader]backup no leader”] [errorVerbose=“[BR:Backup:ErrBackupNoLeader]backup no leader
can not find leader
github.com/pingcap/br/pkg/backup.(*Client).findRegionLeader
\tgithub.com/pingcap/br/pkg/backup/client.go:547
github.com/pingcap/br/pkg/backup.(*Client).handleFineGrained
\tgithub.com/pingcap/br/pkg/backup/client.go:756
github.com/pingcap/br/pkg/backup.(*Client).fineGrainedBackup.func2
\tgithub.com/pingcap/br/pkg/backup/client.go:608
runtime.goexit
\truntime/asm_amd64.s:1371”] [stack=“main.runBackupCommand
\tcommand-line-arguments/backup.go:41
main.newFullBackupCommand.func1
\tcommand-line-arguments/backup.go:109
github.com/spf13/cobra.(*Command).execute
\tgithub.com/spf13/cobra@v1.0.0/command.go:842
github.com/spf13/cobra.(*Command).ExecuteC
\tgithub.com/spf13/cobra@v1.0.0/command.go:950
github.com/spf13/cobra.(*Command).Execute
\tgithub.com/spf13/cobra@v1.0.0/command.go:887
main.main
\tcommand-line-arguments/main.go:56
runtime.main
\truntime/proc.go:225”]
[2022/08/26 05:45:19.489 +08:00] [ERROR] [main.go:58] [“br failed”] [error=“can not find leader: [BR:Backup:ErrBackupNoLeader]backup no leader”] [errorVerbose=“[BR:Backup:ErrBackupNoLeader]backup no leader
can not find leader
github.com/pingcap/br/pkg/backup.(*Client).findRegionLeader
\tgithub.com/pingcap/br/pkg/backup/client.go:547
github.com/pingcap/br/pkg/backup.(*Client).handleFineGrained
\tgithub.com/pingcap/br/pkg/backup/client.go:756
github.com/pingcap/br/pkg/backup.(*Client).fineGrainedBackup.func2
\tgithub.com/pingcap/br/pkg/backup/client.go:608
runtime.goexit
\truntime/asm_amd64.s:1371”] [stack=“main.main
\tcommand-line-arguments/main.go:58
runtime.main
\truntime/proc.go:225”]


If the question is related to performance optimization or troubleshooting, please download the script and run it. Please select all and copy-paste the terminal output.

| username: tug_twf | Original post link

The problem has been found.

| username: Kongdom | Original post link

What is the issue causing this? Can you share it?

| username: forever | Original post link

Share the solution to help more friends :grin:

| username: alfred | Original post link

This error message is not very readable. What is the solution approach?

| username: zzzzzz | Original post link

The reason for this error is that even after 5 attempts, the Region/Leader for a certain Key could not be found from PD.

I have the same question, how was it resolved?

| username: tug_twf | Original post link

The reason is that when we forcibly removed the node, one node remained in a down state. From the PD’s perspective, it recorded a region on it, causing BR to be unable to find the leader information for this region. Manually forcing the removal of this node resolved the issue.

| username: alfred | Original post link

PD did not update the metadata of problematic regions in a timely manner.

| username: tug_twf | Original post link

Yes, that’s right.

| username: system | Original post link

This topic was automatically closed 1 minute after the last reply. No new replies are allowed.