uyuni
uyuni copied to clipboard
Logrotation tries to write into CATALINA_HOME instead of the log directory
Problem description
In our Tomcat logs we currently see a lot of these error messages:
ajp-nio-127.0.0.1-8009-exec-303 ERROR Unable to copy file /var/log/rhn/rhn_web_api.log to /usr/share/tomcat/rhn_web_api-1.log: java.nio.file.AccessDeniedException /usr/share/tomcat/rhn_web_api-1.log
Version of Uyuni Server and Proxy (if used)
2022.08 on OpenSUSE 15.4
Details about the issue
https://github.com/uyuni-project/uyuni/blob/b8042807d6f7297a734b86fd97098f2801f9066c/java/code/src/log4j2.xml#L9-L13
The Log4J2 RollingAppender tries to rotate the logfile because it is larger then the configured maximal size. But because the filePattern is relative it tries to write the rotated file into CATALINA_HOME - what is denied