You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2020/02/28 09:56:01 UTC

[Bug 64184] New: Continuously trying to close the conf/tomcat-users.xml if it doesn't exist.

https://bz.apache.org/bugzilla/show_bug.cgi?id=64184

            Bug ID: 64184
           Summary: Continuously trying to close the conf/tomcat-users.xml
                    if it doesn't exist.
           Product: Tomcat 8
           Version: 8.5.50
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: stefan.roukens@sidn.nl
  Target Milestone: ----

We recently installed TomEE 7.0.7 along with Tomcat 8.5.50. In the previous
Tomcat version (8.5.41) shipped with TomEE 7.0.6 we only notices an error
message "SEVERE: The specified user database [conf/tomcat-users.xml] could not
be found" because we removed the tomcat-users.xml file (we don't use that
functionality). In the 8.5.41 version of Tomcat this was no issue the error was
only displayed at startup. Now with Tomcat 8.5.50 we notice that it's trying to
close the file every 10 seconds. But throws an error because the file does not
exists.

Why should it repeatedly try to close the file if it already noticed at startup
that the file didn't exists.

Same behaviour also occurs when upgraded to TomEE 8.0.1 along with Tomcat
9.0.30

Below the errors/warnings we noticed in the catalina.out log file:

SEVERE: The specified user database [conf/tomcat-users.xml] could not be found
Feb 28, 2020 9:22:59 AM org.apache.catalina.users.MemoryUserDatabase open
WARNING: Failed to close [conf/tomcat-users.xml]
java.io.FileNotFoundException: /sidn/tomee/rdap/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.open(MemoryUserDatabase.java:465)
        at
org.apache.catalina.users.MemoryUserDatabaseFactory.getObjectInstance(MemoryUserDatabaseFactory.java:107)
        at
org.apache.naming.factory.FactoryBase.getObjectInstance(FactoryBase.java:96)
        at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:839)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:159)
        at
org.apache.naming.NamingContextBindingsEnumeration.nextElementInternal(NamingContextBindingsEnumeration.java:117)
        at
org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:71)
        at
org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:34)
        at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:132)
        at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:106)
        at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:81)
        at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
        at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
        at
org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
        at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:759)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:688)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:343)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)

<SNIP>

Feb 28, 2020 9:23:19 AM org.apache.catalina.users.MemoryUserDatabase
backgroundProcess
WARNING: Failed to close [conf/tomcat-users.xml]
java.io.FileNotFoundException: /sidn/tomee/rdap/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.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)

<SNIP>

Feb 28, 2020 9:23:29 AM org.apache.catalina.users.MemoryUserDatabase
backgroundProcess
WARNING: Failed to close [conf/tomcat-users.xml]
java.io.FileNotFoundException: /sidn/tomee/rdap/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.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)

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64184] Continuously trying to close the conf/tomcat-users.xml if it doesn't exist.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64184

Remy Maucherat <re...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

--- Comment #1 from Remy Maucherat <re...@apache.org> ---
If you are not using a component, you should remove it. The MemoryUserDatabase
will now monitor conf/tomcat-users.xml (if that's the path used) causing this.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64184] Continuously trying to close the conf/tomcat-users.xml if it doesn't exist.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64184

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Mark Thomas <ma...@apache.org> ---
Fixed in:
- master for 10.0.0-M2 onwards
- 9.0.x for 9.0.32 onwards
- 8.5.x for 8.5.52 onwards

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64184] Continuously trying to close the conf/tomcat-users.xml if it doesn't exist.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64184

--- Comment #3 from Christopher Schultz <ch...@christopherschultz.net> ---
(In reply to Stefan Roukens from comment #0)
> Why should it repeatedly try to close the file if it already noticed at
> startup that the file didn't exists.

If the file doesn't exist at startup, it may be created later and then take
effect.

> SEVERE: The specified user database [conf/tomcat-users.xml] could not be
> found
> Feb 28, 2020 9:22:59 AM org.apache.catalina.users.MemoryUserDatabase open
> WARNING: Failed to close [conf/tomcat-users.xml]
> java.io.FileNotFoundException: /sidn/tomee/rdap/conf/tomcat-users.xml (No
> such file or directory)

It looks like there is a confusing error message, here. It's not failing to
close the file; it's failing to open it in the first place. It's possible this
is an effect of using try-with-resources.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 64184] Continuously trying to close the conf/tomcat-users.xml if it doesn't exist.

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64184

--- Comment #2 from Stefan Roukens <st...@sidn.nl> ---
How should I achieve to the remove the component?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org