War Stories: Apache Native Runtime on JBoss 5
kennardconsulting Jul 6, 2009 6:54 PM6 months after the release of JBoss 5, it's probably time we updated this wiki page...
http://www.jboss.org/community/wiki/HowToAddAprToJBoss
...I'm happy to do it if someone can help me get APR working. Before following the wiki (which is for JBoss 4.2), this is what JBoss 5 is saying...
08:32:06,688 main INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/java/jdk1.6.0_14/jre/lib/i386/server:/usr/local/java/jdk1.6.0_14/jre/lib/i386:/usr/local/java/jdk1.6.0_14/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
But after following the wiki, it says:
01:17:59,016 main INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /jboss/prod/jboss-5.1.0.GA/bin/META-INF/lib/linux2/x86
The message is slightly different but still a failure. The .so files are all there, and correctly symlinked:
username@haruko:/jboss/prod/jboss-5.1.0.GA/bin/META-INF/lib/linux2/x86$ ls -l total 3388 drwxrwxr-x 2 username username 4096 2008-10-30 12:08 engines lrwxrwxrwx 1 username username 17 2009-07-06 01:14 libapr-1.so -> libapr-1.so.0.2.8 lrwxrwxrwx 1 username username 17 2009-07-06 01:14 libapr-1.so.0 -> libapr-1.so.0.2.8 -rwxr-xr-x 1 username username 515542 2008-10-30 12:09 libapr-1.so.0.2.8 lrwxrwxrwx 1 username username 21 2009-07-06 01:14 libaprutil-1.so -> libaprutil-1.so.0.2.8 lrwxrwxrwx 1 username username 21 2009-07-06 01:14 libaprutil-1.so.0 -> libaprutil-1.so.0.2.8 -rwxr-xr-x 1 username username 288578 2008-10-30 12:10 libaprutil-1.so.0.2.8 lrwxrwxrwx 1 username username 18 2009-07-06 01:14 libcrypto.so -> libcrypto.so.0.9.8 lrwxrwxrwx 1 username username 18 2009-07-06 01:14 libcrypto.so.0 -> libcrypto.so.0.9.8 -r-xr-xr-x 1 username username 1204967 2008-10-30 12:08 libcrypto.so.0.9.8 lrwxrwxrwx 1 username username 17 2009-07-06 01:14 libexpat.so -> libexpat.so.0.1.0 lrwxrwxrwx 1 username username 17 2009-07-06 01:14 libexpat.so.0 -> libexpat.so.0.1.0 -rwxr-xr-x 1 username username 303414 2008-10-30 12:10 libexpat.so.0.1.0 lrwxrwxrwx 1 username username 15 2009-07-06 01:14 libssl.so -> libssl.so.0.9.8 lrwxrwxrwx 1 username username 15 2009-07-06 01:14 libssl.so.0 -> libssl.so.0.9.8 -r-xr-xr-x 1 username username 256316 2008-10-30 12:08 libssl.so.0.9.8 lrwxrwxrwx 1 username username 23 2009-07-06 01:14 libtcnative-1.so -> libtcnative-1.so.0.1.16 lrwxrwxrwx 1 username username 23 2009-07-06 01:14 libtcnative-1.so.0 -> libtcnative-1.so.0.1.16 -rwxr-xr-x 1 username username 776610 2008-10-30 12:10 libtcnative-1.so.0.1.16 lrwxrwxrwx 1 username username 13 2009-07-06 01:14 libz.so -> libz.so.1.2.3 lrwxrwxrwx 1 username username 13 2009-07-06 01:14 libz.so.1 -> libz.so.1.2.3 -rwxr-xr-x 1 username username 75778 2008-10-30 12:05 libz.so.1.2.3
We have this working in Tomcat 5 and 6, in multiple installations, but for some reason no such luck with JBoss 5.1 GA. Steps we took:
1. Download from http://www.jboss.org/jbossweb/downloads/jboss-native/
2. Unzip/tar wget -O native.tar.gz --no-check-certificate http://labs.jboss.com/file-access/default/members/jbossweb/freezone/dist/2.0.6.GA/jboss-native-2.0.6-linux2-x86-ssl.tar.gz tar -xvvf native.tar.gz
3. Move files into correct locations: export JBOSS_HOME=/jboss/prod/jboss-5.1.0.GA mv bin/META-INF $JBOSS_HOME/bin/META-INF
4. Set permissions (same as other files in JBOSS_HOME/bin)
5. Start JBoss
6. It recognises that the folder /jboss/prod/jboss-5.1.0.GA/bin/META-INF/lib/linux2/x86 is now present, and changes the warning message as described above, but says the files are not present even though they are.
2. Unzip/tar wget -O native.tar.gz --no-check-certificate http://labs.jboss.com/file-access/default/members/jbossweb/freezone/dist/2.0.6.GA/jboss-native-2.0.6-linux2-x86-ssl.tar.gz tar -xvvf native.tar.gz
3. Move files into correct locations: export JBOSS_HOME=/jboss/prod/jboss-5.1.0.GA mv bin/META-INF $JBOSS_HOME/bin/META-INF
4. Set permissions (same as other files in JBOSS_HOME/bin)
5. Start JBoss
6. It recognises that the folder /jboss/prod/jboss-5.1.0.GA/bin/META-INF/lib/linux2/x86 is now present, and changes the warning message as described above, but says the files are not present even though they are.
Can anybody please help getting APR working with JBoss 5? If we're successful I'll update the wiki.
Regards,
Richard.