8 Replies Latest reply on Dec 3, 2008 5:24 AM by Christos Vasilakis

    JBoss Web 2.1.1.GA Questions

    Christos Vasilakis Newbie

      Hi there, I have just downloaded and installed JBoss Web 2.1.1 GA

      Couple of points.

      - I was unable to locate "tomcat-native.tar.gz" in jboss-web/bin/ although in the documentation states "The wrapper library sources are located in the JBoss Web binary bundle, in the bin/tomcat-native.tar.gz archive"

      I have downloaded a precompiled binary "JBoss Native 2.0.6 Linux x86" from the downloaded center. Although I haven't proceed to compile I would like to ask, the reason for the missing file means that APR can only be installed with the precompiled supported binaries.

      -The tomcat-native src in the source binaries of the JBoss Native has version tomcat-native-1.1.16 but in the tomcat web site the latest release is tomcat-native is 1.1.15(?)

      -Is it possible to customize PHP and enable some more extensions that we use internally in our company. In the documentation it states that only in Solaris you can do that but I am curious! Usually what I do in my PHP installation is to compile statically features such as postgres etc in libphp not using the extensions API. So is there any way I can modify libphp.so to include the features I need?

      -The last and most important question. During the next couple of weeks we are migrating our existing "only-servlet" application running in macromedia jrun to apache tomcat 6.x series. I would really like to ask what additional benefits can jboss-web provide for us in order to use it instead of using a plain tomcat?

      Regards and keep up the good work!

      Christos

        • 1. Re: JBoss Web 2.1.1.GA Questions
          Jean-Frederic Clere Master

          1 - Right the tomcat-native.tar.gz is not in the JBoss Web binaries.
          2 - tomcat-native-1.1.16 has not be (yet) release by the TC community.
          3 - It is because it has only been tested on Solaris and at the time of the testing a lot of PHP extensions weren't compatible with the JVM in other platform.
          4 - JBoss Web should better performance and also you an easy migration to AS.

          • 2. Re: JBoss Web 2.1.1.GA Questions
            Christos Vasilakis Newbie

            Thanks for your reply.

            I am facing with a kind of a weird problem. I have successfully installed and configured the APR Runtime using the Linux prebuild binaries from the jboss download site.

            What I have done is to modify the setclasspath.sh file in $TOMCAT_HOME/bin and add the following: (this approach is suggested in the tomcat native web site)

            LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/java.libs/native
            export LD_LIBRARY_PATH

            where /opt/java.libs/native is the folder that I have stored the native libraries.

            When I start jboss web in the log file(catalina.out) I get this

            ---------
            Nov 19, 2008 10:09:12 AM org.apache.catalina.core.AprLifecycleListener init
            INFO: Loaded Apache Tomcat Native library 1.1.16.
            Nov 19, 2008 10:09:12 AM org.apache.catalina.core.AprLifecycleListener init
            INFO: APR capabilities: IPv6 [true], sendfile [true], random [true].
            Nov 19, 2008 10:09:34 AM org.apache.coyote.http11.Http11AprProtocol init
            INFO: Initializing Coyote HTTP/1.1 on http-8080
            Nov 19, 2008 10:09:34 AM org.apache.coyote.ajp.AjpAprProtocol init
            INFO: Initializing Coyote AJP/1.3 on ajp-8009
            .....
            INFO: Server startup in 725 ms
            ------
            That is it starts successfully and I can point to http://localhost:8080

            The problem is that sometimes(not always) when I start the server it freezes when it displays the following in catalina.out

            INFO: APR capabilities: IPv6 [true], sendfile [true], random [true].

            Then You have to wait 2 or 3 minutes before the server finishes bootstrapping. Its weird because it doesn't happen all the time, but completely randomly. During that time you can't connect to http://localhost:8080

            If someone willing to give some light on this?

            I am using Ubuntu 8.10 and java version "1.6.0_10" (latest)

            Regards,
            Christos

            • 3. Re: JBoss Web 2.1.1.GA Questions
              Jean-Frederic Clere Master

              That happens when entropy have to be collect for SSL.
              Use SSLRandomSeed=/dev/urandom in the AprLifecycleListener entry.

              • 4. Re: JBoss Web 2.1.1.GA Questions
                Christos Vasilakis Newbie

                Hi there,

                I have successfully installed and run JBoss Web 2.1.1 GA on an Ubuntu Machine 8.10 under jdk1.6_10 and works perfectly.

                I have installed SSL(https) using the native OpenSSL libraries(APR downloaded from the jboss web site)
                and used jsvc to start the service e.g. sudo /etc/init.d/jbossweb.sh start.

                The shell script (which is an adoption from the Tomcat.sh found in the jsvc distribution) uses the jsvc binary compiled by me as found in the jboss-web/bin folder. I used the jsvc approach because in the production environment I would like to start jboss web at port 80 and 443(SSL)(only root can do this) and further have jboss run as a separate user(security policy).

                The problem is that although in my configuration under Ubuntu works perfectly when I deploy it on CentOS it fails miserably. The problem is that during startup jboss-web can't find the native libraries(APR). The exact error from catalina.out
                ...
                INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/nms/jboss-web/native-libs
                ...

                It's kind of weird, because in this path the libraries are installed.
                -------------
                [myproductionmachine]$ ls /opt/nms/jboss-web/native-libs/
                engines libcrypto.so.0 libtcnative-1.so
                libapr-1.so libcrypto.so.0.9.8 libtcnative-1.so.0
                libapr-1.so.0 libexpat.so libtcnative-1.so.0.1.16
                libapr-1.so.0.2.8 libexpat.so.0 libz.so
                libaprutil-1.so libexpat.so.0.1.0 libz.so.1
                libaprutil-1.so.0 libssl.so libz.so.1.2.3
                libaprutil-1.so.0.2.8 libssl.so.0
                libcrypto.so libssl.so.0.9.8
                ----------
                The problem happens if I do

                sudo /etc/init.d/jbossweb.sh start

                IF I run the script it as root the problem goes away. It can find the libraries and starts OK.

                The administrators gave me permission to run the script as sudo

                I have double check the configurations, the paths etc but I can't find any problem. I suspect there is sth with sudo behaviour being different on CentOS and Ubuntu.

                Any ideas why this happens?

                The CentOS version is CentOS release 5.2 (Final)
                The Ubuntu version is 8.10

                Regards,
                Christos










                • 5. Re: JBoss Web 2.1.1.GA Questions
                  Peter Johnson Master

                  A few thoughts.

                  APR is not required for JBoss Web to run (note that the log entry is of type INFO). You should still be able to access the web apps on Centos.

                  If you can run as root but not otherwise, there is some permission issue. It might not be with the shared objects in native-libs, but could be with another shared object one of them relies on. I know there is a Linux utility you can use to test this (the utility attempts to load all shared objects reference and provides information about which shared objects it had problems with), but cannot recall what it is.

                  • 6. Re: JBoss Web 2.1.1.GA Questions
                    Christos Vasilakis Newbie

                    Hi Peter,
                    thank you for your reply

                    I agree too jboss-web can still run but only in the default configuration that comes with.

                    If you have configured APR for SSL(and others) as I do then it fails immediately upon startup and exits.

                    The connection as defined in conf/servel.xml
                    <!-- Define a APR SSL Coyote HTTP/1.1 Connector on port 443 -->
                    <Connector protocol="org.apache.coyote.http11.Http11AprProtocol"
                    ....

                    So internally if he can't find the native.libs then it fails.

                    I will have a look if I can find the utility you describe, I suspect myself too there is some permission error somewhere.

                    I will keep you informed.

                    Regards,
                    Christos

                    • 8. Re: JBoss Web 2.1.1.GA Questions
                      Christos Vasilakis Newbie

                      For the record,

                      our wizard admin(!) found the solution. He added an entry to the system wide /etc/ld.so.conf.d/jboss.conf pointing to the native.libs and now sudo works as expected. (Just keep in mind that this was needed on CentOS on Ubuntu didn't have to do this). I will have an in-depth look on this.

                      Regards,
                      Christos