10 Replies Latest reply on Dec 10, 2008 9:21 AM by W Strater

    Apache Portable Runtime (APR) on Jboss 4.2.3 GA

    Dejan Mratinkovic Newbie

      Hi,

      Can someone please recommend related me documentation on similar, as I could not find any reference.

      More over, I have find either documentation about it working out of box(Jboss 5.0?)?! Or, not enough detailed description on:
      http://talismoon.net/docs/apr.html

      Good description I could find on:

      http://www.jboss.org/community/docs/DOC-9912

      But I can not apply it directly to Windows installation.

      More over, I am not yet sure which is client target environment. I need to have "official" instructions how to enable it.

      Any kind of link/resource/advice how to acheave this would be very helpful.

      Btw. Currently, I get: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path ...

      Thanks

        • 1. Re: Apache Portable Runtime (APR) on Jboss 4.2.3 GA
          Peter Johnson Master

          First, the warning "The Apache Tomcat Native library which allows optimal performance in production environments was not found" can be ignored - the app server will work just fine without it.

          Second, if you want to load APR, then get JBoss Native from http://www.jboss.org/jbossweb/downloads/jboss-native-archive. Download the 2.0.3 version*. You can unzip it directly into the jboss_home directory, but I recommend instead unzipping it to a temporary location and then copying the files over - the zip file contains a 'bin' directory, copy the contents of that directory to jboss_home/bin.

          *NOTE: The 2.0.3 version is the last version that places files in the location expected by the run scripts in 4.2.x. You can probably use a later version of JBoss Native, but you would have to modify the run scripts to change the library path.

          • 2. Re: Apache Portable Runtime (APR) on Jboss 4.2.3 GA
            Dejan Mratinkovic Newbie

            Thanks for the help, this was quick!

            This solved the issue. I need APR for some SSL stuff.

            However, I could not make it work before I copied all the files from jboss_home/bin/native folder to jboss_home/bin. Is this me doing something wrong? Is there any path or similar to set to make it work with .dlls in jboss_home/bin/native folder

            According both to this answer and article on the page I have mentioned in initial post (tested on Windows) it should just work, without further movement of files.

            Thanks.

            • 3. Re: Apache Portable Runtime (APR) on Jboss 4.2.3 GA
              Peter Johnson Master

              The run script, when it finds bin/native, adds bin/native to PATH and to java.library.path. So it should just work with the files located in bin/native. Or are you not using run.bat to start the app server?

              • 4. Re: Apache Portable Runtime (APR) on Jboss 4.2.3 GA
                Dejan Mratinkovic Newbie

                 

                Or are you not using run.bat to start the app server?


                I was not, I was running it from eclipse.

                Thanks for the help.

                • 5. Re: Apache Portable Runtime (APR) on Jboss 4.2.3 GA
                  Peter Johnson Master

                  There's your problem. I'm not sure of the exact mechanism Eclipse uses to run JBoss AS, but it probably runs it directly, and does not call run.bat. In that case, the path was never set correctly. You could always change the PATH setting in My Computer > Properties to include the native library directory.

                  Personally, I would not even bother. As I said earlier, APR is not required, rather it is a (supposed) performance enhancement. If you are running JBoss AS within Eclipse you do not need this enhancement.

                  • 6. Re: Apache Portable Runtime (APR) on Jboss 4.2.3 GA
                    W Strater Newbie

                    I am having a slightly different problem. It is finding the native directory but not APR.

                    I run JBoss and it reports that it can not find APR in a bunch of directories. I download jboss-native-2.0.6-linux2-x86-ssl.tar.gz and follow the instructions on http://www.jboss.org/community/docs/DOC-9912 which has me moving files from META-INF/lib/linux2/x86 to jboss/bin/native and META-INF/bin/linux2/x86 to jboss/bin. It finds the native directory but not APR.

                    Before the download install.

                    16:17:16,715 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/jdk1.5.0_03/jre/lib/i386/server:/usr/jdk1.5.0_03/jre/lib/i386:/usr/jdk1.5.0_03/jre/../lib/i386

                    The results of the download and install.

                    [webuser@bri-devweb01 bin]$ find . -type f | sort
                    ./classpath.sh
                    ./javassist.jar
                    ./jboss_init_hpux.sh
                    ./jboss_init_redhat.sh
                    ./jboss_init_suse.sh
                    ./jboss.pid
                    ./jboss.pidx
                    ./jboss-profiler.jar
                    ./jboss-profiler-plugins.jar
                    ./jboss-profiler.properties
                    ./.jboss-profiler.properties.swp
                    ./jsvc
                    ./native/engines/lib4758cca.so
                    ./native/engines/libaep.so
                    ./native/engines/libatalla.so
                    ./native/engines/libcapi.so
                    ./native/engines/libchil.so
                    ./native/engines/libcswift.so
                    ./native/engines/libgmp.so
                    ./native/engines/libnuron.so
                    ./native/engines/libsureware.so
                    ./native/engines/libubsec.so
                    ./native/libapr-1.so
                    ./native/libaprutil-1.so
                    ./native/libcrypto.so
                    ./native/libexpat.so
                    ./native/libssl.so
                    ./native/libtcnative-1.so
                    ./native/libz.so
                    ./openssl
                    ./probe.bat
                    ./probe.sh
                    ./run.bat
                    ./run.conf
                    ./run.jar
                    ./run.sh
                    ./shutdown.bat
                    ./shutdown.jar
                    ./shutdown.sh
                    ./startup.bat
                    ./startup.sh
                    ./twiddle.bat
                    ./twiddle.jar
                    ./twiddle.log
                    ./twiddle.sh
                    ./wsconsume.bat
                    ./wsconsume.sh
                    ./wsprovide.bat
                    ./wsprovide.sh
                    ./wsrunclient.bat
                    ./wsrunclient.sh
                    ./wstools.bat
                    ./wstools.sh
                    [webuser@bri-devweb01 bin]$

                    The restart after the install.

                    JBOSS_HOME: /usr/local/jboss
                    JBoss Profiler 2.0.Beta4 (Sun Microsystems Inc. 1.5.0_03)
                    JBoss Profiler depends on external communication module
                    16:29:56,757 INFO [Server] Starting JBoss (MX MicroKernel)...
                    16:29:56,759 INFO [Server] Release ID: JBoss [Trinity] 4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)
                    16:29:56,761 INFO [Server] Home Dir: /usr/local/jboss-4.2.3.GA
                    16:29:56,761 INFO [Server] Home URL: file:/usr/local/jboss-4.2.3.GA/
                    16:29:56,763 INFO [Server] Patch URL: null
                    16:29:56,763 INFO [Server] Server Name: default
                    16:29:56,763 INFO [Server] Server Home Dir: /usr/local/jboss-4.2.3.GA/server/default
                    16:29:56,764 INFO [Server] Server Home URL: file:/usr/local/jboss-4.2.3.GA/server/default/
                    16:29:56,764 INFO [Server] Server Log Dir: /usr/local/jboss-4.2.3.GA/server/default/log
                    16:29:56,765 INFO [Server] Server Temp Dir: /usr/local/jboss-4.2.3.GA/server/default/tmp
                    16:29:56,765 INFO [Server] Root Deployment Filename: jboss-service.xml
                    16:29:57,720 INFO [ServerInfo] Java version: 1.5.0_03,Sun Microsystems Inc.
                    16:29:57,720 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.5.0_03-b07,Sun Microsystems Inc.
                    16:29:57,720 INFO [ServerInfo] OS-System: Linux 2.4.21-57.ELsmp,i386
                    16:29:58,298 INFO [Server] Core system initialized
                    16:30:02,357 INFO [WebService] Using RMI server codebase: http://bri-devweb01:8083/
                    16:30:02,361 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
                    16:30:03,291 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
                    16:30:03,291 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer
                    16:30:03,709 INFO [TransactionManagerService] Starting recovery manager
                    16:30:03,988 INFO [TransactionManagerService] Recovery manager started
                    16:30:03,988 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
                    16:30:10,726 INFO [EJB3Deployer] Starting java:comp multiplexer
                    16:30:11,190 INFO [Profiler] JBoss Profiler: ProfilerMBean started
                    16:30:11,190 INFO [Communicator] JBoss Profiler: Communicator for JBoss Profiler 2.0.Beta4
                    16:30:11,199 INFO [Communicator] JBoss Profiler: Socket=0.0.0.0:5400
                    16:30:16,800 INFO [NativeServerConfig] JBoss Web Services - Native
                    16:30:16,801 INFO [NativeServerConfig] jbossws-3.0.1-native-2.0.4.GA (build=200803312044)
                    16:30:18,049 INFO [Embedded] Catalina naming disabled
                    16:30:18,334 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/jboss/bin/native
                    16:30:18,476 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-9080
                    16:30:19,925 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-9443
                    16:30:19,927 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-0.0.0.0-9009

                    [webuser@bri-devweb01 bin]$ cat /proc/cpuinfo
                    processor : 0
                    vendor_id : GenuineIntel
                    cpu family : 15
                    model : 4
                    model name : Intel(R) Xeon(TM) CPU 3.20GHz
                    stepping : 1
                    cpu MHz : 3200.272
                    cache size : 1024 KB
                    physical id : 0
                    siblings : 2
                    runqueue : 0
                    fdiv_bug : no
                    hlt_bug : no
                    f00f_bug : no
                    coma_bug : no
                    fpu : yes
                    fpu_exception : yes
                    cpuid level : 5
                    wp : yes
                    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm lm
                    bogomips : 6383.20

                    Am I missing a step?

                    Wes.

                    • 7. Re: Apache Portable Runtime (APR) on Jboss 4.2.3 GA
                      Peter Johnson Master

                      Which version of JBoss Native are you using? The run script assumes that the shared objects in JBoss Native are located at a certain directory. Unfortunately, the directory structure of JBoss Native changed, I think in 2.0.3. The JBoss AS 4.2.x run scripts assume the pre 2.0.3 directory structure. You can either:

                      a) change the run scripts to use the new directory structure (look at the JBoss AS 5.0 run script - it uses the new structure)
                      b) revert to 2.0.2 (or whatever the last version was that had the old directory structure)

                      Note that you do not need APR to run JBoss AS - it runs just fine without it. Note that the log message was of type "info", not "warning" or "error".

                      • 8. Re: Apache Portable Runtime (APR) on Jboss 4.2.3 GA
                        W Strater Newbie

                        I downloaded jboss-native-2.0.6-linux2-x86-ssl.tar.gz. The download page only lists 2.0.6.

                        The Wiki page is for JBoss AS 4.2 and covers Native 2.0.0 and has additional directions for Native 2.0.4 which I followed. I listed the contents of the bin directory using the same technique as the wiki. I noticed the wiki had version numbers for some of the libraries but other than that, they appeared to be similar.

                        The libraries in bin/native and bin/native/engines are owned by the user running JBoss AS and are either 755 or 555.

                        Wes.

                        • 9. Re: Apache Portable Runtime (APR) on Jboss 4.2.3 GA
                          Peter Johnson Master

                          If you look at http://www.jboss.org/jbossweb/downloads/, there are two links, one for the current version and one for older versionsn.

                          • 10. Re: Apache Portable Runtime (APR) on Jboss 4.2.3 GA
                            W Strater Newbie

                            Thanks for the help. I did not find 2.0.2 so I used to 2.0.3 and loaded.

                            I still have issues with HTTPS since I need to make some configuration changes to connector but I probably will just leave it undefined. I found some useful information on following page http://www.jboss.org/file-access/default/members/jbossweb/freezone/docs/2.1.0/apr.html.

                            Thanks, Wes.