-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Dejan,
On 5/19/15 9:31 AM, Dejan Stamenov wrote: > First, I have downloaded the APR library from here: > http://apache.sunsite.ualberta.ca/apr/apr-1.5.2.tar.gz . > Following this tutorial: > http://www.techsww.com/tutorials/libraries/apr/installation/installing _apache_portable_runtime_library_on_ubuntu_linux.php > > , I have installed this library into /usr/lib/x86_64-linux-gnu. This was not necessary. All Debian distributions have a package available for APR. I highly recommend that you just use the libapr1 package. You are also likely to need the libapr1-dev package in order to build tcnative, since it's got all of the header files, etc. you'll need. Manually installing APR shouldn't hurt, but it will make things more complicated than necessary. > After that, I have downloaded the tcnative library from the links > Mark provided. Also, following the same links I run this config > command: > > ./configure --with-apr=/usr/lib/x86_64-linux-gnu > --with-java-home=/usr/lib/jvm/java-7-openjdk-amd64 --with-ssl=yes > --prefix=/usr/lib/x86_64-linux-gnu Did you also install the APR headers, etc into /usr/lib/x86_64-linux-gnu? That would be unusual. You really have no need to install tcnative into /usr/lib/x86_64-linux-gnu, since it's only going to be used by Apache Tomcat. If I were you, I'd keep tcnative out of your system library and change the java.library.path you use when you launch Tomcat to include the path where tcnative is actually installed. > That --prefix location is where the error log file is expecting > for the library to be found. Ok. What did you do after "configure"? > Here is the error log: > > May 19, 2015 2:59:58 PM org.apache.catalina.startup.Catalina load > INFO: Initialization processed in 1973 ms May 19, 2015 2:59:58 PM > org.apache.catalina.core.StandardService startInternal INFO: > Starting service Catalina May 19, 2015 2:59:58 PM > org.apache.catalina.core.StandardEngine startInternal INFO: > Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu) May 19, 2015 > 2:59:58 PM org.apache.catalina.startup.HostConfig deployDirectory > INFO: Deploying web application directory > /var/lib/tomcat7/webapps/ROOT May 19, 2015 3:00:02 PM > org.apache.coyote.AbstractProtocol start INFO: Starting > ProtocolHandler ["http-bio-8080"] May 19, 2015 3:00:02 PM > org.apache.catalina.startup.Catalina start INFO: Server startup in > 4014 ms May 19, 2015 3:06:39 PM org.apache.coyote.AbstractProtocol > pause INFO: Pausing ProtocolHandler ["http-bio-8080"] May 19, 2015 > 3:06:39 PM org.apache.coyote.AbstractProtocol pause INFO: Pausing > ProtocolHandler ["http-apr-8443"] May 19, 2015 3:06:39 PM > org.apache.catalina.core.StandardService stopInternal INFO: > Stopping service Catalina May 19, 2015 3:06:39 PM > org.apache.coyote.AbstractProtocol stop INFO: Stopping > ProtocolHandler ["http-bio-8080"] May 19, 2015 3:06:39 PM > org.apache.coyote.AbstractProtocol destroy INFO: Destroying > ProtocolHandler ["http-bio-8080"] May 19, 2015 3:06:39 PM > org.apache.coyote.AbstractProtocol stop INFO: Stopping > ProtocolHandler ["http-apr-8443"] May 19, 2015 3:06:39 PM > org.apache.coyote.AbstractProtocol destroy INFO: Destroying > ProtocolHandler ["http-apr-8443"] May 19, 2015 3:07:08 PM > org.apache.catalina.startup.ClassLoaderFactory validateFile > WARNING: Problem with directory > [/usr/share/tomcat7/common/classes], exists: [false], isDirectory: > [false], canRead: [false] May 19, 2015 3:07:08 PM > org.apache.catalina.startup.ClassLoaderFactory validateFile > WARNING: Problem with directory [/usr/share/tomcat7/common], > exists: [false], isDirectory: [false], canRead: [false] May 19, > 2015 3:07:08 PM org.apache.catalina.startup.ClassLoaderFactory > validateFile WARNING: Problem with directory > [/usr/share/tomcat7/server/classes], exists: [false], isDirectory: > [false], canRead: [false] May 19, 2015 3:07:08 PM > org.apache.catalina.startup.ClassLoaderFactory validateFile > WARNING: Problem with directory [/usr/share/tomcat7/server], > exists: [false], isDirectory: [false], canRead: [false] May 19, > 2015 3:07:08 PM org.apache.catalina.startup.ClassLoaderFactory > validateFile WARNING: Problem with directory > [/usr/share/tomcat7/shared/classes], exists: [false], isDirectory: > [false], canRead: [false] May 19, 2015 3:07:08 PM > org.apache.catalina.startup.ClassLoaderFactory validateFile > WARNING: Problem with directory [/usr/share/tomcat7/shared], > exists: [false], isDirectory: [false], canRead: [false] May 19, > 2015 3:07:09 PM org.apache.catalina.core.AprLifecycleListener init > INFO: The APR based Apache Tomcat Native library which allows > optimal performance in production environments was not found on the > java.library.path: > /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64 - -linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib > > May 19, 2015 3:07:10 PM org.apache.coyote.AbstractProtocol init > INFO: Initializing ProtocolHandler ["http-bio-8080"] May 19, 2015 > 3:07:10 PM org.apache.catalina.core.StandardService initInternal > SEVERE: Failed to initialize connector [Connector[HTTP/1.1-8443]] > org.apache.catalina.LifecycleException: Failed to initialize > component [Connector[HTTP/1.1-8443]] at > org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106) > > at org.apache.catalina.core.StandardService.initInternal(StandardService.ja va:559) > at > org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) > > at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java :813) > at > org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) > > at org.apache.catalina.startup.Catalina.load(Catalina.java:638) > at org.apache.catalina.startup.Catalina.load(Catalina.java:663) at > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j ava:57) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) at > org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:280) at > org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:454) > Caused by: org.apache.catalina.LifecycleException: The configured > protocol [org.apache.coyote.http11.Http11AprProtocol] requires the > APR/native library which is not available at > org.apache.catalina.connector.Connector.initInternal(Connector.java:97 2) > > at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) > ... 12 more > > May 19, 2015 3:07:10 PM org.apache.catalina.startup.Catalina load > INFO: Initialization processed in 1689 ms May 19, 2015 3:07:10 PM > org.apache.catalina.core.StandardService startInternal INFO: > Starting service Catalina May 19, 2015 3:07:10 PM > org.apache.catalina.core.StandardEngine startInternal INFO: > Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu) May 19, 2015 > 3:07:10 PM org.apache.catalina.startup.HostConfig deployDirectory > INFO: Deploying web application directory > /var/lib/tomcat7/webapps/ROOT May 19, 2015 3:07:14 PM > org.apache.coyote.AbstractProtocol start INFO: Starting > ProtocolHandler ["http-bio-8080"] May 19, 2015 3:07:14 PM > org.apache.catalina.startup.Catalina start INFO: Server startup in > 3972 ms > > That is what I have done so far. What is the output of: $ ls -l /usr/java/packages/lib/amd64/*tcnative* \ /usr/lib/x86_64-linux-gnu/jni/*tcnative* \ /lib/x86_64-linux-gnu/*tcnative* \ /usr/lib/x86_64-linux-gnu/*tcnative* \ /usr/lib/jni/*tcnative* \ /lib/*tcnative* \ /usr/lib/*tcnative* I suspect you never actually compiled and installed tcnative. - -chris >> Date: Tue, 19 May 2015 09:20:21 -0400 From: >> ch...@christopherschultz.net To: users@tomcat.apache.org Subject: >> Re: Problem with APR library - Tomcat 7 >> > Dejan, > > On 5/18/15 4:15 PM, Dejan Stamenov wrote: >>>> I am sure I need the APR connector as I need to specify my >>>> server certificate, my private key and also a chain of other >>>> certificates that signed my server certificate. I haven't >>>> found any other connecter that can do this except APR, or I >>>> have missed something? > > You are mistaken. All of Tomcat's connectors provide TLS > capabilities. > > If you want to know what you are missing, please provide two > things: > > 1. Complete list of steps you went through to try to install > tcnative (including download, unzip, copy, including all file paths > used for everything including what CATALINA_HOME and CATALINA_BASE > values are). > > 2. The whole log file from a clean run (starting with no log > file), with the text copied and pasted into a message. Nobody wants > to go to another web site and read text out of an image. Besides, > it means that the mailing list archives are worthless for this > thread, since nobody will be able to see that image after a few > days/months. > > Remember that this mailing list is part of the Tomcat community > and not your own personal help desk. The answered provided to you > are expected to benefit the entire community, not just you > specifically. > > -chris > >>>> -----Original Message----- From: Christopher Schultz >>>> [mailto:ch...@christopherschultz.net] Sent: 18 May, 2015 >>>> 22:11 To: Tomcat Users List Subject: Re: Problem with APR >>>> library - Tomcat 7 >>>> >>>> Dejan, >>>> >>>> On 5/18/15 3:53 PM, Dejan Stamenov wrote: >>>>> The error below the warning message is saying that the APR >>>>> library is missing from my server. >>>> >>>> Okay. >>>> >>>>> That's why I am sure I need the APR library for Tomcat 7. >>>> >>>> Well, you can use a different type of connector that *does >>>> not* require the APR connector. You *chose* to use the APR >>>> connector, and now you need both APR and tcnative to get that >>>> to work. I'm asking you about your initial decision: are you >>>> sure you need the APR-based connector? >>>> >>>>> I have seen Mark message, but had some work and didn't >>>>> tried it today. Till tomorrow, I will give you answer if >>>>> that was the case and worked, or I need further help. >>>> >>>> Building the APR-based connector on Linux should be very >>>> easy. If you have the various packages installed via your >>>> package manager, then building tcnative is a typical two-step >>>> process to build: "configure", "make". >>>> >>>> -chris >>>> >>>>> -----Original Message----- From: Christopher Schultz >>>>> [mailto:ch...@christopherschultz.net] Sent: 18 May, 2015 >>>>> 21:46 To: Tomcat Users List Subject: Re: Problem with APR >>>>> library - Tomcat 7 >>>> >>>>> Dejan, >>>> >>>>> On 5/17/15 3:22 PM, Dejan Stamenov wrote: >>>>>> I am working on a project where I need to install SSL >>>>>> certificates on Tomcat 7 server for my Java application. >>>>>> I have been experimenting around, I have set up the >>>>>> connector in the server.xml file, but when I look into >>>>>> the logs I can see this: >>>> >>>>>> http://prntscr.com/76a98v >>>> >>>>> Warning-level message. Are you sure you need tcnative? >>>> >>>>> The error after the warning is more troubling. What's the >>>>> full stack trace for /that/? >>>> >>>>>> For the connector to be working, I needed to install APR >>>>>> library. I did so, following this guide here: >>>>>> http://www.techsww.com/tutorials/libraries/apr/installation/insta lli > >>>>>> n >>>> >>>>>> > g >>>> >>>>>> >>>>>> >>>>>> >>>> _apach >>>> >>>> >>>>> e_portable_runtime_library_on_ubuntu_linux.php >>>> >>>>> It's much easier to do "apt-get install libapr" than >>>>> whatever it is you are doing, here. >>>> >>>>>> In my case, I use the apr-1.5.2 version. Also, in the >>>>>> configure -prefix part I have specified the URL that is >>>>>> shown on my server error log, i.e. >>>>>> /usr/lib/x86_64-linux-gnu. After server reboot, I still >>>>>> get the same error. Have been looking around the internet >>>>>> how to solve this, but only found a couple of open >>>>>> questions on Stack Overflow/Exchange with no answers in >>>>>> them. >>>> >>>>> As Mark says, tcnative is merely APR-based. You need >>>>> libapr, then you need to build tcnative yourself, from >>>>> source, from the links he provided . >>>> >>>>> I'll ask again: are you sure you need tcnative? >>>> >>>>> -chris >>>> >>>>> ------------------------------------------------------------------ - --- >>>> >>>>> >>>> >>>> >>>> >>>> >>>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>>>> For additional commands, e-mail: >>>>> users-h...@tomcat.apache.org >>>> >>>> >>>>> ------------------------------------------------------------------ - --- >>>> >>>>> >>>> >>>> >>>> >>>> >>>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>>>> For additional commands, e-mail: >>>>> users-h...@tomcat.apache.org >>>> >>>> >>>> ------------------------------------------------------------------- - -- >>>> >>>> > >>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>>> For additional commands, e-mail: >>>> users-h...@tomcat.apache.org >>>> >>>> >>>> ------------------------------------------------------------------- - -- >>>> >>>> > >>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >>>> For additional commands, e-mail: >>>> users-h...@tomcat.apache.org >>>> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJVW0D1AAoJEBzwKT+lPKRYwl0P/Aj5pnjTPAWleqeztqBSZdXU f3pgv32wBv4C9Nb6xqPWlqNqdP2GvKkx9kk0aafjdBnJS6J3HDc/OcIOqoOzrjqB Q9f+oVfvgdNeS2TdFozaS+hJSbmgTeuf8PpMbdL0aHnOSEltyhooRZRJaVwShDVN qSRqVGCiGSOJFVUaoo3R5p2GGR75sh7cNGpdgaKS+naqSbHUNBTXVu/fQ+umIEv0 jB8Z/s9Cbx0iz5nQh5TYMWBecjhsWly3PICCUHEiPipsjN0ORpCcqlesjNHLbg3z IBqkIj2YfVUh6nfEi48OVafzPi4M6UpoAEoaBUz7PeBYQhVbcs5c7WLO/Nqn1IBF 2rN6HC3TMunx9Am8Nu0m2vap7mJ4a3VScCw2n4wJVYf+nZwkTzajHVjbg6tTjcCg KYcVcGnxrPjdsOdUPVkGQUWKd5+gxES6bKhIjoDJWk6UUifSHnQphVPQvx7aTTqS vqRX628EdrZkKJfh2mik3E4toeTC2ZvfPj+h0znueUK3kA3Yv2rU+OzxX6DZA2kn lFH2YpgAuOdPMTxNBhWf8sXFApqQnKc+FH0T8FTL8MrE/33QFFwH7XlaIHfMA73X oG6Uc6cwAyJTMK5i7sjxVJRZCCyTzuEpLdWzDAVpKK9rCtz5GPsNPIzkBnyeyegW iSI5tOax4E5SpVNn1ay4 =9J+t -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org