We used the above setup fine for almost a year or so and it worked until we changed our domain name for Jenkins from ci.example.com į ci.example.net.
grep -R ci.example.com /var/lib/jenkins 2>/dev/null | grep -v workspace | grep -v '^/jobs'
grep -R ci.example.com /etc 2>/dev/null
The above does not return anything. We have rebuilt the container from scratch, leaving only /var/lib/jenkins as a mountpoint.
The problem is that sometimes Jenkins runs the check for .owner file and it finds one which is owned by Jenkins instance with ci.example.com, not ci.example.net. E.g.:
This Jenkins: 147224775 at 27@ci.example.net
Other Jenkins: 1772912571 at 29@ci.example.com
The mystery is where is it taking ci.example.com domain?
There is no other Jenkins or any other Java processes on the host or in the container.