You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jean Pierre Urkens <je...@devoteam.com> on 2018/01/15 14:45:40 UTC

Activating Tomcat 8.5 APR on RHEL7

I am having problems getting the apr library discovered by Tomcat 8.5. This
is what I tried:

 

1.      I installed Tomcat-8.5 on RHEL-7.

2.      As the native tomcat apr libraries wheren't available on RHEL I made
them myself as instructed by
http://tomcat.apache.org/tomcat-8.5-doc/apr.html. After that the tomcat
native apr libraries where present under '/usr/local/apr/lib'.

3.      To get this library path included in java.library.path I tried:

a.      Create/modify $TOMCAT_BASE/bin/setenv.sh to include the following
two lines:
       LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/apr/lib
       export LD_LIBRARY_PATH
After restarting tomcat the catalina log shows the message:
15-Jan-2018 13:03:31.778 INFO [main]
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent 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/lib64:/lib64:/lib:/usr/lib]

Apparantly the LD_LIBRARY_PATH isn't taken up by catalina?

b.      I also tried setting environment variables via the command prompt:
#> TOMCAT_HOME=/opt/tomcat8;
#> export TOMCAT_HOME
#> TOMCAT_BASE=/var/lib/tomcat8/nodes/node1; 
#> export TOCAT_BASE
#> LD_LIBRARY_PATH=$LD_LIBARAY_PATH:/usr/local/apr/lib;
#> export LD_LIBRARY_PATH
#> /opt/tomcat8/bin/startup.sh start

But also that is giving the same AprLifecycleListener  message?

 

Could someone clarify what the right way is to get the apr libraries on the
java.library.path of Tomcat8.5?

 


Met vriendelijke groet,

Jean Pierre Urkens


System Architect


Adv. Dev and Cloud Integration


 <tel:+32+14+722162> +32 (0)14 722162


 <tel:+32+478+838336> +32 (0)478 838336


 <ma...@devoteam.com> jean-pierre.urkens@devoteam.com




 <https://www.linkedin.com/company/devoteam> 

 <https://plus.google.com/+Devoteam-group> 

 <https://twitter.com/devoteam> 


 <http://www.devoteam.com/> 

Maatschappelijke zetel Devoteam NV/SA

Belgicastraat 17  - 1930 Zaventem
VAT: BE 0466.475.275  /  RPM Bruxelles - RPR Brussel

 

 


RE: Activating Tomcat 8.5 APR on RHEL7

Posted by Jean Pierre Urkens <je...@devoteam.com>.
Thanks, this worked.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Activating Tomcat 8.5 APR on RHEL7

Posted by Peter Kreuser <lo...@kreuser.name>.

Hi Jean-Pierre,

> Am 15.01.2018 um 15:45 schrieb Jean Pierre Urkens <je...@devoteam.com>:
> 
> I am having problems getting the apr library discovered by Tomcat 8.5. This is what I tried:
>  
> 1.      I installed Tomcat-8.5 on RHEL-7.
> 2.      As the native tomcat apr libraries wheren’t available on RHEL I made them myself as instructed by http://tomcat.apache.org/tomcat-8.5-doc/apr.html. After that the tomcat native apr libraries where present under ‘/usr/local/apr/lib’.
> 3.      To get this library path included in java.library.path I tried:
> a.      Create/modify $TOMCAT_BASE/bin/setenv.sh to include the following two lines:
>        LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/apr/lib
>        export LD_LIBRARY_PATH
> After restarting tomcat the catalina log shows the message:
> 15-Jan-2018 13:03:31.778 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent 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/lib64:/lib64:/lib:/usr/lib]
> 

Set this variable using JAVA_OPTS with -Djava.library.path=/usr/local/apr/lib


> Apparantly the LD_LIBRARY_PATH isn’t taken up by catalina?
> b.      I also tried setting environment variables via the command prompt:
> #> TOMCAT_HOME=/opt/tomcat8;
> #> export TOMCAT_HOME
> #> TOMCAT_BASE=/var/lib/tomcat8/nodes/node1; 
> #> export TOCAT_BASE
> #> LD_LIBRARY_PATH=$LD_LIBARAY_PATH:/usr/local/apr/lib;
> #> export LD_LIBRARY_PATH
> #> /opt/tomcat8/bin/startup.sh start
> 
> But also that is giving the same AprLifecycleListener  message?
>  
> Could someone clarify what the right way is to get the apr libraries on the java.library.path of Tomcat8.5?
>  
> Met vriendelijke groet,
> Jean Pierre Urkens
> System Architect
> Adv. Dev and Cloud Integration
> +32 (0)14 722162
> +32 (0)478 838336
> jean-pierre.urkens@devoteam.com
> 
> 
> 
> 
> 
> Maatschappelijke zetel Devoteam NV/SA
> Belgicastraat 17  - 1930 Zaventem
> VAT: BE 0466.475.275  /  RPM Bruxelles - RPR Brussel
>  
>  

Best regards

Peter