I think in ubuntu/Debian, you can create the file in /usr/share/tomcat7/bin/setenv.sh but still you have to explore, as i am not using the deb package for tomcat installation
On Tue, May 19, 2015 at 6:58 PM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Dejan, > > On 5/19/15 9:45 AM, Dejan Stamenov wrote: > > I have wrote in the message before, I have specified it at: > > /usr/lib/x86_64-linux-gnu. In this folder, I can see libapr-1.so, > > libapr-1.so.0.5.1. and libarputil-1.so.0.5.3 too. > > How about libtcnative? > > > About the Tomcat /bin folder, it doesn't exist on my Tomcat path: > > /etc/tomcat7. Should I create it, including the file too? > > That's not necessary. > > > When I do a search for the setenv.sh file, I can't find it either. > > Tomcat doesn't ship with a setenv.sh file. If you want to use one, > you'll have to create it yourself. If you are using a package-managed > version of Tomcat, those files could be anywhere. When using a > standard Tomcat package downloaded from apache.org (or a mirror), then > setenv.sh should be in CATALINA_BASE/bin/setenv.sh if you'd like to > create one. > > Note that some methods for launching Tomcat ignore setenv.sh (like > using jsvc, for instance). Make sure you know what you are doing > before you do it. > > - -chris > > >> Date: Tue, 19 May 2015 18:38:23 +0500 Subject: Re: Problem with > >> APR library - Tomcat 7 From: sanaulla...@gmail.com To: > >> users@tomcat.apache.org > >> > >> so where did you specify your Apr lib path for tomcat? > >> > >> you can set the Apr lib path in setenv.sh in tomcat bin folder > >> > >> JAVA_OPTS="$JAVA_OPTS -Djavax.net.debug=all" > >> CATALINA_OPTS="-Djava.library.path=/usr/lib/x86_64-linux-gnu/apr/lib" > >> > >> > >> > you should verify the path and restart the tomcat again also may be you > >> need to compile the apr-utils as well > >> > >> > >> On Tue, May 19, 2015 at 6:31 PM, Dejan Stamenov > >> <dejanstameno...@outlook.com > >>> wrote: > >> > >>> Hello Chris, > >>> > >>> 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/installi > ng_apache_portable_runtime_library_on_ubuntu_linux.php > >>> > >>> > >>> > , I have installed this library into /usr/lib/x86_64-linux-gnu. > >>> 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 > >>> > >>> That --prefix location is where the error log file is > >>> expecting for the library to be found. 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(StandardServic > e.java: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 > .java:57) > >>> > >>> > >>> > at > >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce > ssorImpl.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: > 972) > >>> > >>> > >>> > 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. > >>> > >>>> 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/ins > talli > > > >>>>>>>> > >>>>>>>> > 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 > > iQIcBAEBCAAGBQJVW0GWAAoJEBzwKT+lPKRYBZMQAI1Fqvw+WGnaFV2CfBo5MJJK > L+igfH+Gns9rlFJS4Xim3/REprET+3VJdl9U0Hi4Dvt93pKkCUvuOf9BmA7G3yzv > Z1bpxnUSJgDeUZJKux0d2EVBp9AAI2ONY4ZTbuY5jOT7YieSBA1L8mbTVD5BFPY3 > 9e2NO4CCmBu+hw5nuafL0vfM7dEcb8V+qcMakYGi/jymyV+8Q3LgFePvqn4NHOzk > auRjct5jVQXsrLH68DrJi00PnhhYPCZwshfO6KqGqN4ZC6hkN2j8BZ9fKC1N/r03 > erwk+zyK0Jzp22IZBSA3fAggcjUJaAUkoE6PRWR16kxuzWdDH/NIF8+7KqD6bTra > Sm177afioF/H4mIstdPC4sBLKnE5dShRwLAWNeODkVXXFBwxlBD5KDgsy8q0eXiW > aaabMyyF4avYh82CDRyqq8FM8hLqDqLs9T8ipWrcH8CuAzP9s+eGHZDpwAXQDFs+ > 0sM5SpjIAU1cpmh+QaxXx7/V/9EHHqeJk+WFysnFS5eXjBOTkBq0dSjP2gzOJ/M/ > CP1cVN/uvBEIEJbcchtagaDMhiOAcxv/RlnTSeaQnwAt4XrnxhjfyvNAhkDoCOiS > ZiIjs3BQCg7kb6scThEZfPulD0V7wWD/AQ1Ctdn56L60wVIUhRpxuk38KhT4XsnR > 56NdeNRBgXY7h2HHsuya > =3ZrJ > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >