Download MX4j 3.0.1 and cp mx4j.jar to bin/jmx.jar at your tomcat release.
Regards
Peter
Oded Arbel schrieb:
Hi people.
I'm using tomcat5 to host a commercial web site, and due to some
integration issues we are using a single service with two
CoyoteConnectors - one on port 8080 and one on port 8081.
Here is the relevant configuration:
<Service name="Catalina">
<Connector port="8080"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
debug="0" connectionTimeout="20000" disableUploadTimeout="true" />
<Connector port="8081"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
debug="0" connectionTimeout="20000" disableUploadTimeout="true" />
I've noticed that some times, when catalina is starting, I get this
error in the logs:
Nov 24, 2005 4:28:30 PM org.apache.coyote.tomcat5.MapperListener init
WARNING: Error registering contexts
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:782)
at java.util.HashMap$EntryIterator.next(HashMap.java:824)
at java.util.HashMap.putAllForCreate(HashMap.java:424)
at java.util.HashMap.clone(HashMap.java:656)
at
mx4j.server.DefaultMBeanRepository.clone(DefaultMBeanRepository.java:56)
at
mx4j.server.MBeanServerImpl.findMBeansByPattern(MBeanServerImpl.java:1603)
at
mx4j.server.MBeanServerImpl.queryObjectNames(MBeanServerImpl.java:1568)
at
mx4j.server.MBeanServerImpl.queryMBeans(MBeanServerImpl.java:1512)
at
org.apache.coyote.tomcat5.MapperListener.init(MapperListener.java:115)
at
org.apache.coyote.tomcat5.CoyoteConnector.start(CoyoteConnector.java:1537)
at
org.apache.catalina.core.StandardService.start(StandardService.java:489)
When that happens, HTTP requests to the second connector (port 8081)
return with error 400 - no host matches, while requests to the first
connector are handled just fine.
It looks to me like a race condition where something (possibly
MBeanServerImpl) isn't locking a shared resource (or isn't locking it
properly) and an contained HashMap gets modifier concurrently.
I though initially about writing to the dev list, but I don't have any
idea what is that mx4j so I'm not sure if its the correct place to ask.
BTW - I'm using tomcat 5.0.28.
TIA
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]