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/installing_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(StandardService.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(DelegatingMethodAccessorImpl.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
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> 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/installi
> 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
> > 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
> Comment: GPGTools - http://gpgtools.org
> 
> iQIcBAEBCAAGBQJVWziVAAoJEBzwKT+lPKRYk2sQAIqy7jTdK3yDezHrAXYKrBKo
> mn69ZsSj1FfCuX6RKjHH1vEmCwKsD+QN0lnn3upEHIzqyoxOZURNncsi8kdVCmNK
> oBGz5UV6PlN5vZyqio3SlM1ryuurLOSg6jFj42pCh+m0kWOmT7+lmmddH0YEpSI5
> 5uneXQF9Tg6D426X7UMG1L5qnf43c8Gy/j0VPPowNhX5YYmQxdwTcd01FkYY39Tp
> UVSL9k/e8SmT9uTdY/9GsdIA/XfWa76LfM9OfiXPRO/tXY1J07Cc0iX0TefW8TLj
> JDIUVJ1PDEvGDas9fjizs+NquyiQH8RHopY4MsygFADW6rw6UcL/LuNDT5LVXCZ1
> dATbQpMhGlB89tmB/6q/PtnIdL4Vmd6oIl6qdXlopkivuSfsEmrz+aDydE7rK0sr
> n4Dq/MEy/QlzAElwQBLIl1jCh9durr2J5cKUf2f2H6bMnSjMseXNPtMSNxEeZYiI
> TVFxHA0lzOIr2pvUyufPsS56wjpfd2o11W8iPg3SeWslaIFRLsn0G27BeXRAnJex
> DBgutbthZCWltuPaaVnqXLnUA0WMAq50SNwmJ+9eb8fP8nvnOeMi6k+6WyyhR/D8
> q8kOYcFBl8oXnRgI1uWaFO/+vdzy+0YerbfOzlnYEiLlRF3dUh6An/yb8nttSrRl
> MXh+xXcpE10tnLnI157r
> =HRz8
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
                                          

Reply via email to