PTA DR Error Syncing Static Files
Symptom
Running the Diagnostics or checking the Replication Status REST API shows that although the DB replication is working as expected, static files sync continues to fail.
In the dr-files-sync.log we can see errors. For example;
Error syncing path /opt/tomcat/plugins/ from machine XXX
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(226) [Receiver=3.1.2]
Environment
12.2 PTA Disaster Recovery
Cause
The ssh key used by ptadr is not synchronized across the servers.
In the primary PTA secure log, the following error will be repeating itself:
Mar 2 11:55:11 aagcdpta001a sshd[30869]: Failed password for ptadr from xxx.xxx.xxx.xxx port 54792 ssh2
This could happen if there were errors while running /opt/tomcat/utility/dr/setupPrimary.sh, on the primary PTA.
Resolution
Copy the public key from the DR to the authorized keys folder of the Primary.
Please copy the data from the DR's
/home/ptadr/.ssh/drfilessync.pub
to the Primary's authorised keys file:
/home/ptadr/.ssh/authorized_keys
Or copy the Primary's .pub file to the DRs authorized keys file so this problem doesn't happen in the future after a failover.