Error happened during run pbm restore
Description
Environment
Smart Checklist
Activity

Akira Kurogane November 9, 2020 at 5:11 AM
Hi Lee.
Thanks for sharing that diagnosis.
Yes, hostname resolution differences will be fatal. If the replica set member's identity as they see it themselves does not match what the other replica set members can resolve the IP address to, or what the clients can, then a lot of operations will fail. The only solution is to reestablish a single hostname identity for every host, as you did.
Cheers,
Akira

james lee November 9, 2020 at 3:45 AM
Hi,
i found the root cause of this issue.
the hostname in each host led to some error on pbm.
i did Not change hostname in each host. i just configured /etc/hosts on each host.
i seems like pbm internally use hostname.
after i changed hostname in each host, this issue has been solved.
Thanks for helping us.

Akira Kurogane November 4, 2020 at 5:45 AM
Hi Lee Ho Jun.
"node in not suitable for restore" has a typo, it should be "node is not suitable for restore". I've created a patch to fix that just now. (PR #452).
The meaning of the log message just as it sounds - the pbm-agent looked at the status of the mongod node it was attached to and determined it wasn't a suitable node to run the restore into. In a restore any not other than a primary is unsuitable of course. This is the only rule I can see that would lead to the "node in not suitable for restore" message appearing in the current code.
Looking at the rs.status() output shared earlier in the description we expect the mongo1-dev would be primary but it seems it wasn't at the time.
Details
Assignee
UnassignedUnassignedReporter
james leejames leeLabels
Components
Priority
Critical
Details
Details
Assignee
Reporter

Labels
Components
Priority

Smart Checklist
Open Smart Checklist
Smart Checklist
Open Smart Checklist
Smart Checklist

hi,
i am using 3node mongodb replica-set.
and when we run "pbm restore" in primary node, it returns error with the follwing content:
what is the problem?
here is the full server infomation:
1) mongodb & pbm version1) mongodb & pbm version- mongodb : MongoDB server version: 4.2.10- pbm :# pbm versionVersion: 1.3.2Platform: linux/amd64GitCommit: b5807ea06ab8f5770d38702a9340ec60ab1f8d9fGitBranch: release-1.3.2BuildTime: 2020-10-12_17:46_UTCGoVersion: go1.14.2#
2) 3 node replica-set's host info- mongo1-dev.com : primary- mongo2-dev.com : secondary- mongo3-dev.com : secondary- tls enabled- mongos Not used
3) 3 node replica-set status
4) pbm account
5) PBM_MONGODB_URI environment in /etc/profile
mongo1-dev.com)
6) run pbm-agent in each hostmongo1-dev.com)
mongo2-dev.com)
mongo3-dev.com)
7) run pbm backup in secondary (mongo3-dev.com)mongo3-dev.com) run backup command
mongo1-dev.com) check log & list
8) run pbm restore in primary (mongo1-dev.com)
mongo1-dev.com) run restore command
"node in not suitable for restore" => what does it mean?
mongo2-dev.com) check log & list
mongo3-dev.com) check log & list