Bug 980939 - EAP 6.1.0 cannot start APR with JBoss native
EAP 6.1.0 cannot start APR with JBoss native
Status: CLOSED NOTABUG
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web (Show other bugs)
6.1.0
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Jean-frederic Clere
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-03 11:24 EDT by jiashun.qian
Modified: 2014-02-17 08:40 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-11 09:57:37 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description jiashun.qian 2013-07-03 11:24:40 EDT
Description of problem:
I modified native="true" in standalone.xml :
<subsystem xmlns="urn:jboss:domain:web:1.4" default-virtual-server="default-host" native="true">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<virtual-server name="default-host" enable-welcome-root="true">
    <alias name="localhost"/>
    <alias name="example.com"/>
</virtual-server>

and add this line in standalone.conf :
JAVA_OPTS="$JAVA_OPTS -Djava.library.path=/home/toto/jboss-eap-6.1/modules/system/layers/base/org/jboss/as/web/main/lib/linux-x86_64:$PATH"

In server.log there is 
DEBUG [org.apache.catalina.core] (MSC service thread 1-1) JBWEB001068: Loaded native library 1.1.27 with APR capabilities: IPv6 [true], sendfile [true], random [true]

But the result is it doesn't start with APR :
INFO [org.apache.coyote.http11] (MSC service thread 1-1) JBWEB003001: Coyote HTTP/1.1 initializing on : http-/127.0.0.1:8080
INFO  [org.apache.coyote.http11] (MSC service thread 1-1) JBWEB003000: Coyote HTTP/1.1 starting on: http-/127.0.0.1:8080

The exactly same configuration works well on JBoss EAP 6.0.1.

Version-Release number of selected component (if applicable):
JBoss EAP 6.1.0

How reproducible:
Launch the script standalone.sh

Steps to Reproduce:
./standalone.sh

Actual results:
INFO [org.apache.coyote.http11] (MSC service thread 1-1) JBWEB003001: Coyote HTTP/1.1 initializing on : http-/127.0.0.1:8080
INFO  [org.apache.coyote.http11] (MSC service thread 1-1) JBWEB003000: Coyote HTTP/1.1 starting on: http-/127.0.0.1:8080

Expected results:
DEBUG [org.apache.coyote.http11.Http11AprProtocol] (MSC service thread 1-2) Initialisation de Coyote HTTP/1.1 sur http-/127.0.0.1:8080
INFO  [org.apache.coyote.http11.Http11AprProtocol] (MSC service thread 1-2) Démarrage de Coyote HTTP/1.1 sur http-/127.0.0.1:8080
Comment 2 Jan Stefl 2013-07-04 08:22:34 EDT
 - The logging system was changed since EAP 6.1.0 - only package name is displayed now. If you see APR was activated on debug level, so it was.
 - Btw. setting java.library.path is not necessary, but if you work in 64b mode, you have to set -d64 into JAVA_OPTS explicitly instead.

Jean,
is there any suitable way how to recognize if APR was activated (cli, log on info level)?

--
We will set qa_ack flag to + if Jean accept this as a bug.
Comment 3 Rostislav Svoboda 2013-07-08 04:08:06 EDT
We need feedback for Comment 2 before we make decision for qa_ack.
Comment 4 Jean-frederic Clere 2013-07-09 09:02:36 EDT
APR is activated and used once you have the message:
"DEBUG [org.apache.catalina.core] (MSC service thread 1-1) JBWEB001068: Loaded native library 1.1.27 with APR capabilities"
that is one way to check that APR/native is used.
If it is not used you get an info message:
"The native library which allows optimal performance in production environments was not found on the java.library.path: ..."
That is not a bug :D

Note You need to log in before you can comment on or make changes to this bug.