3

I have a Solaris 10 box on which I have successfully built the tomcat native libraries from source which include apr-1.5.2.tar.gz, openssl-1.0.2a.tar.gz, and tomcat-native-1.1.33-src.tar.gz. I can then start my tomcat server and get a series of logging statements indicating that the Tomcat server is indeed using the native libraries, as shown below.

Jun 9, 2015 4:07:07 PM org.apache.catalina.core.AprLifecycleListener init INFO: Loaded APR based Apache Tomcat Native library 1.1.33 using APR version 1.5.2.

Jun 9, 2015 4:07:08 PM org.apache.catalina.core.AprLifecycleListener init INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].

Jun 9, 2015 4:07:09 PM org.apache.catalina.core.AprLifecycleListener initializeSSL INFO: OpenSSL successfully initialized with version OpenSSL 1.0.2a 19 Mar 2015

Jun 9, 2015 4:07:10 PM org.apache.coyote.http11.Http11AprProtocol init

So what's my problem? Well, I now have to deploy the tomcat native libraries on 11 other Solaris boxes. I would rather not build the code 11 more times, as it is very time consuming. I'm not much of a unix person, so maybe someone can explain why the following does not work. I simply copied all the libraries from the working Solaris box to a folder on the new Solaris box, keeping the permissions the same, rwxr-xr-x, as shown below:

apr.exp                                    9,278 
libapr-1.a                               968,936 
libapr-1.la                                  976 
libapr-1.so                              641,972 
libapr-1.so.0                            641,972 
libapr-1.so.0.5.2                        641,972 
libcrypto.a                            3,152,616 
libssl.a                                 591,140 
libtcnative-1.a                        1,054,352 
libtcnative-1.la                           1,206 
libtcnative-1.lai                          1,177 
libtcnative-1.so                         922,176 
libtcnative-1.so.0                       922,176 
libtcnative-1.so.0.1.33                  922,176 

On the new Solaris box, I then edited my tomcat/bin.setenv.sh file and set the java.library.path System property to point to the folder, just like I did on the Solaris box where I originally built the libraries and where tomcat correctly loads and uses the native libraries.

But when I start the tomcat server on the new box where I simply copied the libraries, tomcat says it can't find the libraries, as shown by the log message:

NFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/pdm/web/tomcat/native/1.1.33.

Is there something else I need to do? Some additional library(ies) I'm missing? Or is this just not possible on Unix and I have to build the libraries from scratch on every Solaris box?

Any help would be greatly appreciated.

  • 1
    Check with $ldd /path/to/libtcnative.so and adjust your LD_LIBRARY_PATH until every dependant .so is found. – Federico Sierra Jun 11 '15 at 22:05
  • That didn't work. Also, it wasn't necessary to do that on the Solaris server where the libraries were built. The library path on the the Solaris server where the libraries were built and that works only contains the path to the libtcnative-1.so.0.1.33 file. Nothing else. Thanks for the help though. I just have no idea why this doesn't work. It seems like the most simplest of problems. – joneric wennerstrom Jun 15 '15 at 13:10
  • What are the exact error message(s) you are getting? What does the output of ldd -s -r ... on all your shared objects show for both the working server and non-working server(s)? – Andrew Henle Jun 16 '15 at 0:40
  • The error I'm getting is: INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /lib:/us r/lib:/usr/local/lib:/usr/sfw/lib:/lib/libm:/platform/SUNW,SPARC-Enterprise-T5220/lib:/opt/pdm/web/tomcat/native/1.1.33:/opt/pdm/web/ENOVIA/studio/bin/solaris4 executing ldd -s -r on libtcnative-1.so.0.1.33 These comment boxes don't allow me to paste in the results becuase it is too long. – joneric wennerstrom Jun 17 '15 at 18:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.