Description of problem: When the system property org.apache.tomcat.util.Constants.ENABLE_MODELER is set to true (in order to enable monitoring of JBossWeb JMX beans) AND the web connector is set to "native", JBossWeb fails to start. This is caused by a bug in class org.apache.coyote.http11.Http11AprProtocol in method start() where a JMX ObjectName is created using the method getName(). Since the name will usually contain a colon (as in "ip:port"), the resulting JMX ObjectName is invalid, creating an exception that causes the connector to fail. Proposed Solution: Use getJmxName() instead of getName() to construct the ObjectName (as it is already done in other places of this class). Version-Release number of selected component (if applicable): JBossWeb in EAP 6.1 and 6.1.1 How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
10:32:15,011 INFO [org.apache.catalina.core] (MSC service thread 1-4) JBWEB001065: The native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/i386:/lib:/usr/lib 10:32:15,300 INFO [org.apache.coyote.http11] (MSC service thread 1-4) JBWEB003001: Coyote HTTP/1.1 initializing on : http-/127.0.0.1:8080 10:32:15,304 ERROR [org.apache.coyote.http11] (MSC service thread 1-4) JBWEB003044: Threadpool JMX registration failed: javax.management.MalformedObjectNameException: Invalid character ':' in value part of property at javax.management.ObjectName.construct(ObjectName.java:618) [rt.jar:1.7.0_25] at javax.management.ObjectName.<init>(ObjectName.java:1382) [rt.jar:1.7.0_25] at org.apache.coyote.http11.Http11NioProtocol.start(Http11NioProtocol.java:132) Testing with jbossweb 7.4.x BTW: native isn't in the beta.
I don't know what happened, but NIO and APR were not using the JMX name, which caused the problem. I suppose JMX is not used very often with AS.
We use JMX to monitor the number of http requests, thread pool usage etc. on our production systems. And of course we use the native connectors for performance reasons. I would expect this is a common scenario or are there better ways to monitor the internals of AS?!
The bug also (still) exists in EAP 6.2
Also see bug 1036977 for a fix.
After checking the repos it is fixed in EAP6.2 CP01 CP02 CP03 (it is NOT fixed in EAP6.2). EAPP6.3 from the available release...
I checked back and the bug is still present in EAP 6.2 CP01 (aka EAP 6.2.1). Both Http11NioProtocol and Http11AprProtocol in jbossweb-7.3.0.Final-redhat-1 still contain the old, unchanged code that uses getName() instead of getJmxName(). And booting the server still throws exactly the same error message.
This was fixed in JBossWeb 7.3.1 and 7.4.0 beta 2, and 7.4.0 beta 4 was in DR2. A quick test by adding -Dorg.apache.tomcat.util.Constants.ENABLE_MODELER=true shows the current 6.3 build working. It may be too late for QA to test, but I'll push the state forward since it's been committed to the code already.
I have verified that the it works as expected with NIO2, JIO and APR connector using EAP 6.3.0.ER10