Bug 1010497

Summary: APR connector seems not used when native="true"
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Aleksandar Kostadinov <akostadi>
Component: WebAssignee: Rémy Maucherat <rmaucher>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Cada <mcada>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1.1CC: jclere, jstefl, rsvoboda
Target Milestone: DR11   
Target Release: EAP 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
RHEL5 i386 RPM installation
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Aleksandar Kostadinov 2013-09-20 21:39:11 UTC
Configuring native="true" as jboss-web subsystem attribute does not seem to really use the native connectors. I see in server log:

> 17:20:23,507 INFO  [org.apache.coyote.http11] (MSC service thread 1-3) JBWEB003
000: Coyote HTTP/1.1 starting on: http-/127.0.0.1:8080
> 17:20:23,512 INFO  [org.apache.coyote.http11] (MSC service thread 1-7) JBWEB003
001: Coyote HTTP/1.1 initializing on : http-/127.0.0.1:8443
> 17:20:23,515 INFO  [org.apache.coyote.http11] (MSC service thread 1-7) JBWEB003
000: Coyote HTTP/1.1 starting on: http-/127.0.0.1:8443

According to this doc [1], the full qualified class name should read:
> org.apache.coyote.http11.Http11AprProtocol

The native components seem to be loaded because earlier in the log I am seeing:
> 17:20:23,374 DEBUG [org.apache.catalina.core.AprLifecycleListener] (MSC service
 thread 1-15) Loaded: apr-1
> 17:20:23,374 DEBUG [org.apache.catalina.core.AprLifecycleListener] (MSC service
 thread 1-15) Loaded: z
> 17:20:23,375 DEBUG [org.apache.catalina.core.AprLifecycleListener] (MSC service
 thread 1-15) Loaded: crypto
> 17:20:23,377 DEBUG [org.apache.catalina.core.AprLifecycleListener] (MSC service
 thread 1-15) Loaded: ssl
> 17:20:23,378 DEBUG [org.apache.catalina.core.AprLifecycleListener] (MSC service
 thread 1-15) Loaded: tcnative-1
> 17:20:23,392 DEBUG [org.apache.catalina.core] (MSC service thread 1-15) JBWEB001068: Loaded native library 1.1.27 with APR capabilities: IPv6 [true], sendfile [true], random [true]

On the other hand HTTPS connector works with openssl style of configuration so it seems that at least for SSL the openssl library is used. But it doesn't look so for the other connectors.

I do not see complete documentation around using native connectors with EAP6. Neither in administration and configuration guide, nor CSP [2].

[1] https://community.jboss.org/wiki/JBossAS7ConfiguringSSLOnJBossWeb
[2] https://access.redhat.com/site/solutions/222023

Comment 1 Rémy Maucherat 2013-09-23 08:06:47 UTC
Nothing is wrong here. As part of Andiamo logging was redone and now uses the package name as he category. If you want to really make sure it is using native (you don't need to, really), get a thread dump, the APR connector classnames will be there.

Comment 2 Aleksandar Kostadinov 2013-09-23 10:19:16 UTC
> Nothing is wrong here. As part of Andiamo logging was redone and now uses the package name as he category.

good, thanks

> If you want to really make sure it is using native (you don't need to, really)

haha, I guess there is no chance in the world it could be broken, right?

> get a thread dump, the APR connector classnames will be there.

Thanks, good suggestion.

I think that enabling, verifying and configuring native components should be better documented in the EAP Administration and configuration guide.

Comment 3 Rémy Maucherat 2013-09-23 10:27:02 UTC
(In reply to Aleksandar Kostadinov from comment #2)
> > If you want to really make sure it is using native (you don't need to, really)
> 
> haha, I guess there is no chance in the world it could be broken, right?

That is actually correct. If the native flag is true, the listener is enabled and it will complain if it cannot use the APR library. So that's where you're supposed to get the yes/no and from there the native connector is used. Similarly if OpenSSL is used, it also means it's the native connector.

OTOH, I think that's the second time I see this in a BZ, so maybe the logging can be improved.

Comment 4 Aleksandar Kostadinov 2013-09-23 10:31:20 UTC
Thank you, Rémy. I think your explanation does make perfect sense and we only need a documentation improvement, rather than anything else.

Comment 5 Jean-frederic Clere 2014-02-26 13:36:32 UTC
I have changed the code in jbossweb to log the class name like:
14:17:43,372 INFO  [org.apache.coyote.http11.Http11NioProtocol] (MSC service thread 1-9) JBWEB003001: Coyote HTTP/1.1 initializing on : http-/127.0.0.1:8080

Note that is only for the protocol classes (which corresponds to the BZ).

Comment 6 Rostislav Svoboda 2014-03-19 08:45:05 UTC
*** Bug 899722 has been marked as a duplicate of this bug. ***

Comment 9 Radim Hatlapatka 2014-11-26 11:17:31 UTC
Verified with EAP 6.4.0.DR11