hello everyone, today we want to use Nexus3.27 in k8s with NFS HA, there are two NFS nodes .
A is master and another is Slave, we use " NFSv4+ serrsync+keepalive" to rsync data.
of course, there are use vip to mount in k8s . but when master’s keepalived stopped , the vip moved to slave node , nexus was broken with some error:
OpenJDK 64-Bit Server VM warning: Cannot open file ../sonatype-work/nexus3/log/jvm.log due to Permission denied
Warning: Cannot open log file: ../sonatype-work/nexus3/log/jvm.log
Warning: Forcing option -XX:LogFile=/tmp/jvm.log
java.io.FileNotFoundException: ../sonatype-work/nexus3/tmp/i4j_ZTDnGON8hezynsMX2ZCYAVDtQog=.lock (Permission denied)
at java.io.RandomAccessFile.open0(Native Method)
at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243)
at com.install4j.runtime.launcher.util.SingleInstance.check(SingleInstance.java:72)
at com.install4j.runtime.launcher.util.SingleInstance.checkForCurrentLauncher(SingleInstance.java:31)
at com.install4j.runtime.launcher.UnixLauncher.checkSingleInstance(UnixLauncher.java:88)
at com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:67)
Unable to delete file: /nexus-data/cache/bundle157/bundle.info
Unable to update instance pid: /nexus-data/instances/instance.properties (Permission denied)
we have checked the capacity of dir data.
root@nfs-nexus01:/home/nexus# du -sh /nexus
136M /nexus
root@nfs-nexus02:/home/nexus# du -sh /nexus
136M /nexus
but when I restart the master keepalived , the nexus is ok. I don’t know what happen.
By the way, I used docker to mount the slave exporter, it also doesn’t matter. I want to know if I scp
all the data of Nexus Data Dir to another dir, Can it run again ?
update:
it’s interesting to find that if I cp
the master data to another dir in the same node, it’s ok. but if use scp
the data to another node’s dir , it showed the error . are there any lock or anything else to cause it ? thanks