PTA - STATIC_FILES Replication Failing
Symptom
Static files replication fails to the PTA DR.
From the dr-files-sync.log the following errors can be seen:
.d..t....a. ./
.f........x systemparm.properties
rsync: change_dir "/opt/tomcat/plugins" failed: Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1650) [Receiver=3.1.2]
rsync: [Receiver] write error: Broken pipe (32)
Error syncing path /opt/tomcat/plugins/ from machine ukvaprdcyb001.igi.ig.local
Environment
11.1;11;11.2;11.3 PTA Other
Cause
This can be caused due to a file permissions issue which fails a DR sync script.
The script is scheduled to run every minute from the secondary machine.
It is an internal bash script which is called from /usr/lib/systemd/system/drfilessync.service.
Resolution
In order to solve this issue, please run the following commands:
setfacl -R -m u:ptadr:rx /opt/tomcat/diamond-resources/local/
setfacl -R -m u:ptadr:rx /opt/tomcat/plugins/
setfacl -R -m u:ptadr:rx /opt/tomcat/diamond-resources/license.xml
setfacl -R -m u:ptadr:rx /opt/tomcat/diamond-resources/Vault.ini
setfacl -R -m u:ptadr:rx /opt/tomcat/diamond-resources/client-certificates/
Also, add the commands to the end of the promoteDemote.sh file (in both nodes) in order to prevent the issue from reoccurring during Failover.