We were receiving errors on our vCenter servers that the log disk is getting low on disk space. According to VMWare KBs we checked what is consuming space. We found espiecially a lot of log files named "catalina_[DATE].log" with 11mb size, going back almost a year.
I checked the content of the log, and every 10 minutes it creates the same error message:
2021-04-12T23:59:53.056Z WARN org.apache.catalina.users.MemoryUserDatabase Failed to close [conf/tomcat-users.xml]
java.io.FileNotFoundException: /usr/lib/vmware-sso/vmware-sts/conf/tomcat-users.xml (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
at org.apache.catalina.users.MemoryUserDatabase.backgroundProcess(MemoryUserDatabase.java:700)
at org.apache.catalina.realm.UserDatabaseRealm.backgroundProcess(UserDatabaseRealm.java:160)
at org.apache.catalina.realm.CombinedRealm.backgroundProcess(CombinedRealm.java:308)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1145)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1381)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1353)
at java.lang.Thread.run(Thread.java:748)
VMWare simply tells me to delete the files and to enlarge my log disk, which I did. But it still bugged me what is going on, and so far I did not find anthing in the web related to vCenter.
Anyone has an idea what is going on here, and how to resolve this error? I know that there are many ways to ignore it, and maybe it is safe to ignore it, but I only want to know if the error itself can be fixed.
As the message says your Tomcat installation lacks a
conf/tomcat-users.xml
file. This is a file containing the groups and users used by Tomcat's authentication. By default this file is watched and reloaded regularly.Therefore you need to:
<Resource>
of typeUserDatabase
and all realms of typeUserDatabaseRealm
(together with theLockoutRealm
in which it is nested) from yourserver.xml
configuration file.tomcat-users.xml is a default configuration file that normally is not used unless you specifically activate and manage tomcat access creating users at it console (regulary command line).
in redhat servers, the missing of this file it usually happens when you upgrade tomcat, and the simplest way to correct it is to copy tomcat-users.xml from tomcat binaries and paste it in your install location (in your case /usr/lib/vmware-sso/vmware-sts/conf/tomcat-users.xml).
onece the file is copied you don't need to do anything else, it will 're-load' the file after a few seconds and the error will be gone.
so just look for the file in a location similar to this one (binaries) and copy it into you vCenter conf/ folder. it would be even better if you find a backup folder of your vcenter installation from where you can take the same file:
cheers
The problem obviously was a bug in vCenter - I just updated all instances to version 7.0.0.10700, now the log entry does not appear anymore. The tomcat conf file is still missing, but it looks like this file is not needed and the problem was somewhere else.