PTA-DR. Unable to fail-back from Secondary PTA to Primary PTA
103
Created On 11/10/26 11:02 AM - Last Modified 11/10/26 15:52 PM
Symptom
After failing over to the Secondary PTA server, on restoring the Primary PTA server an attempt to fail-back fails.
After running the /opt/tomcat/utility/dr/promoteDemote.sh script on the restored Primary the file 'secondary' is present in the the /opt/pta/mode directory signifying that the script was partly successful.
However the whole process fails and the following error appears in prepwiz.log:-
PWZ0111E :: Failed to execute command service mongod restart
Environment
10.10;11.1;11;11.2;11.3;11.4;11.5;11.6;11.7;12.0;12.1 PTA DR v11.1
Cause
The /etc/mongod.conf file typically contains the following lines:-
systemLog:
destination: file
path: "/var/log/pta/mongodb/mongod.log"
storage:
dbPath: "/var/lib/pta/mongodb"
engine: "wiredTiger"
wiredTiger:
engineConfig:
journalCompressor: "snappy"
collectionConfig:
blockCompressor: "snappy"
net:
port: 27017
security:
authorization: "enabled"
processManagement:
fork: true
pidFilePath: "/opt/mongodb/mongodb.pid"
replication:
replSetName: pta-repl
security:
clusterAuthMode: x509
net:
ssl:
mode: preferSSL
PEMKeyFile: /opt/mongodb/certs/exportedPTA.pem
CAFile: /opt/mongodb/certs/exportedRootCA.crt
During the resynchronisation of the mongo databases between the two PTA servers as they change roles, authentication statements are added to the blank line between the lines containing 'clusterAuthMode: x509' and 'net:'. If there is no blank line, these statements cannot be written to the file and so the process fails.
Resolution
Ensure there is a blank line between the two lines in the file.