-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Dejan,
On 5/19/15 10:06 AM, Dejan Stamenov wrote: > The output of the ls's below is "No such file or directory" on all > of them. It is strange, cause I made make & make install after the > ./configuration was done. What was the output of make && make install? (Again, I'd argue that "make install" should not be necessary; just copy the .so files -- preserving symlinks of course -- to somewhere Tomcat can find it with an adjusted java.library.path). > Also, I have just installed the libapr1 package, should I do the > tcnative configuration and install again? Yes, you will have to re-build tcnative if you have a different APR library, assuming they are different versions. Remember you will probably: 1. Need to install libapr1-dev 2. Not need to specify --with-apr for configure - -chris >> Date: Tue, 19 May 2015 09:56:05 -0400 From: >> ch...@christopherschultz.net To: users@tomcat.apache.org >> Subject: Re: Problem with APR library - Tomcat 7 >> > 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/install ing > >>>> >>>> _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.ja va > > > :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(NativeMethodAccessorImp l.j > >>>> >>>> ava:57) >>>> >>>> > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess or > > > 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/in sta > >>>>>>>>> >>>>>>>>> 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 >> > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJVW1kXAAoJEBzwKT+lPKRYZzkQAJ/8pqvIqwYkIZzRyugcPYXl hChU8PtvYt/gXWr4BLvHM7UdwySd16Grjw9ELAerEhP3X4zCqgsUN4CR7ZPPs9Jz YR+fYN74Vt4ntLT2Zr06OEyXLLzaCwyCTTYhyXODad3RV3BqEXBLCRm2Dn2HcxTq KN8+rUSHvxIRxn7ICpxtZhg7+5FpEavZ14pMpNDPyHQDWjo1vYgBFqVeeyZ2JlMn aakuEVw9oVrCOZtH5jAZnmUklzEo/6jm4Z+T1R5BpoMG7elfqoPZjenpplGqnTzD 0aL8gQTwMnbJUfd1XzsIheHs6sdX2TYBtgH8bI6HGPi78bDZoS04/S+RQ8c+SlwT 1BWoBCDJp8Vq4vZxrIpY/gGan3M8iFGKckFs1ApdKnZLgqA4xavRFOZiWqQZ3xi3 m7pPVnCxSNTYRGVTrMw8AnHaJ+nvQJL+Oi+XU7gU50WxF/ymBk5MeoMI89TIWOqk ySKLzVMrmZB4iMd9Tta+NB/3F8GiBanG3Fjxqe84X4GVNL1A0FiBszAmgH9YaIvo IQF8ayPLaBDMHcdXn9i1Nl84IoWRQWkn2TlqwDlKMDxebN3SSj4lCAcUw5Zp4b5C EFuZpMb6CmkjCFeAZVO6nXsFx82SEMSWHwMzXLl4CccZje/UHOCIIms3ZH3utKbE mn2/XoM40UbRXXqKQvKC =RTUH -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org