You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michele Mase' <mi...@gmail.com> on 2009/12/22 10:02:57 UTC
tomcat native problem 64bit linux os
I've successfully enabled the apr native on linux CentOS 32 bit following
some simple steps:
Install apr and openssl dev required files
yum install openssl-devel apr-devel
Install jdk, tomcat and set JAVA_HOME; accordlin to my conf JAVA_HOME is
/usr/java/latest and tomcat is in /home/tomcat/tomcat-6b
Get tomcat native (I used the 1.1.18 version)
Before compiling is useful to test that tomcat is fully working (eg. cd ~;
cd tomcat-6b/bin; sh catalina.sh run)
Native:
untarring
tar zxvf tomcat-native-version-src.tar.gz (version=1.1.18 in my env)
compiling:
./configure --with-apr=$(which apr-1-config)
--with-java-home=$JAVA_HOME --with-ssl=yes
--prefix=/home/tomcat/tomcat6-a
make && make install
Now native libs are in /home/tomcat/tomcat-6b/lib
Edit catalina.sh adding:
CATALINA_OPTS="$CATALINA_OPTS
-Djava.library.path=/home/tomcat/tomcat-6b/lib"
Restart tomcat and verify that the message complying the missing apr is gone
...
If you set CATALINA_HOME env, you can optionally use --prefix=$CATALINA_HOME
The apr will be put in $CATALINA_HOME/lib
The same procedure on linux 64bit doesn't work
The tomcat native libraries now are put under $CATALINA_HOME/lib64
ll lib64
total 2448
-rw-r--r-- 1 tomcat tomcat 1577256 Dec 18 11:11 libtcnative.a
-rwxr-xr-x 1 tomcat tomcat 865 Dec 18 11:11 libtcnative.la
lrwxrwxrwx 1 tomcat tomcat 21 Dec 18 11:11 libtcnative.so ->
libtcnative.so.0.1.18
lrwxrwxrwx 1 tomcat tomcat 21 Dec 18 11:11 libtcnative.so.0 ->
libtcnative.so.0.1.18
-rwxr-xr-x 1 tomcat tomcat 884518 Dec 18 11:11 libtcnative.so.0.1.18
drwxr-xr-x 2 tomcat tomcat 4096 Dec 22 09:28 pkgconfig
I've added in the catalina.sh the following
CATALINA_OPTS="$CATALINA_OPTS
-Djava.library.path=/home/tomcat/tomcat-6b/lib64"
And again, after tomcat is started i find the missing apr messages
...
Dec 22, 2009 9:59:16 AM 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: /home/tomcat/tomcat-6b/lib64
...
Any suggestion?????
Re: tomcat native problem 64bit linux os
Posted by Michele Mase' <mi...@gmail.com>.
Nice hint!
I'm out of office now and I'll verify on monday;
Maybe, the names are incorrect; maybe a symbolic link will be sufficient to
solve the missing files ...
I'll try it.
But The question remains: is something wrong/missing in the installer or in
the command line that claimed the configure?
Best regards
Michele
On Sat, Jan 2, 2010 at 1:23 AM, Konstantin Kolinko
<kn...@gmail.com>wrote:
> 2010/1/1 Michele Mase' <mi...@gmail.com>:
> > Anyone????
> >
> > On Tue, Dec 22, 2009 at 10:02 AM, Michele Mase' <michele.mase@gmail.com
> >wrote:
> >
> >> (...)
> >> The tomcat native libraries now are put under $CATALINA_HOME/lib64
> >> ll lib64
> >> total 2448
> >> -rw-r--r-- 1 tomcat tomcat 1577256 Dec 18 11:11 libtcnative.a
> >> -rwxr-xr-x 1 tomcat tomcat 865 Dec 18 11:11 libtcnative.la
> >> lrwxrwxrwx 1 tomcat tomcat 21 Dec 18 11:11 libtcnative.so ->
> >> libtcnative.so.0.1.18
> >> lrwxrwxrwx 1 tomcat tomcat 21 Dec 18 11:11 libtcnative.so.0 ->
> >> libtcnative.so.0.1.18
> >> -rwxr-xr-x 1 tomcat tomcat 884518 Dec 18 11:11 libtcnative.so.0.1.18
> >>
>
> I do not see "-1" in the library file names.
>
> From Java source of o.a.tomcat.jni.Library:
>
> /* Default library names */
> private static String [] NAMES = {"tcnative-1", "libtcnative-1"};
>
>
> also make sure that the libraries are compiled as 64-bit, if you are
> using 64-bit JVM. Maybe the 'file' command will show such info, though
> I do not really know.
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: tomcat native problem 64bit linux os
Posted by Michele Mase' <mi...@gmail.com>.
Solved in the following way:
cd $CATALINA_HOME/lib64 (or anywhere you have put the tomcat native library)
ln -s libtcnative.so libtcnative-1.so
start tomcat and the message "missing apr ..." changed into
"...
Jan 2, 2010 4:50:40 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.18.
Jan 2, 2010 4:50:40 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters
[false], random [true].
..."
When using 64bit ...
Is something wrong/missing in the installer or in the command line that
claimed the configure?
./configure --enable-layout=RedHat64 --with-apr=$(which apr-1-config)
--with-java-home=$JAVA_HOME --with-ssl=yes --prefix=$CATALINA_HOME
PS:sorry 4 my double mail (i've some troubles with my internet connection)
Michele
On Sat, Jan 2, 2010 at 4:07 PM, Michele Mase' <mi...@gmail.com>wrote:
> Nice hint!
> I'm out of office now and I'll verify on monday;
> Maybe, the names are incorrect; maybe a symbolic link will be sufficient to
> solve the missing files ...
> I'll try it.
> But The question remains: is something wrong/missing in the installer or in
> the command line that claimed the configure?
> Best regards
> Michele
>
>
> On Sat, Jan 2, 2010 at 1:23 AM, Konstantin Kolinko <knst.kolinko@gmail.com
> > wrote:
>
>> 2010/1/1 Michele Mase' <mi...@gmail.com>:
>> > Anyone????
>> >
>> > On Tue, Dec 22, 2009 at 10:02 AM, Michele Mase' <michele.mase@gmail.com
>> >wrote:
>> >
>> >> (...)
>> >> The tomcat native libraries now are put under $CATALINA_HOME/lib64
>> >> ll lib64
>> >> total 2448
>> >> -rw-r--r-- 1 tomcat tomcat 1577256 Dec 18 11:11 libtcnative.a
>> >> -rwxr-xr-x 1 tomcat tomcat 865 Dec 18 11:11 libtcnative.la
>> >> lrwxrwxrwx 1 tomcat tomcat 21 Dec 18 11:11 libtcnative.so ->
>> >> libtcnative.so.0.1.18
>> >> lrwxrwxrwx 1 tomcat tomcat 21 Dec 18 11:11 libtcnative.so.0 ->
>> >> libtcnative.so.0.1.18
>> >> -rwxr-xr-x 1 tomcat tomcat 884518 Dec 18 11:11 libtcnative.so.0.1.18
>> >>
>>
>> I do not see "-1" in the library file names.
>>
>> From Java source of o.a.tomcat.jni.Library:
>>
>> /* Default library names */
>> private static String [] NAMES = {"tcnative-1", "libtcnative-1"};
>>
>>
>> also make sure that the libraries are compiled as 64-bit, if you are
>> using 64-bit JVM. Maybe the 'file' command will show such info, though
>> I do not really know.
>>
>> Best regards,
>> Konstantin Kolinko
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
Re: tomcat native problem 64bit linux os
Posted by Michele Mase' <mi...@gmail.com>.
Nice hint!
I'm out of office now and I'll verify on monday;
Maybe, the names are incorrect; maybe a symbolic link will be sufficient to
solve the missing files ...
I'll try it.
But The question remains: is something wrong/missing in the installer or in
the command line that claimed the configure?
Best regards
Michele
On Sat, Jan 2, 2010 at 1:23 AM, Konstantin Kolinko
<kn...@gmail.com>wrote:
> 2010/1/1 Michele Mase' <mi...@gmail.com>:
> > Anyone????
> >
> > On Tue, Dec 22, 2009 at 10:02 AM, Michele Mase' <michele.mase@gmail.com
> >wrote:
> >
> >> (...)
> >> The tomcat native libraries now are put under $CATALINA_HOME/lib64
> >> ll lib64
> >> total 2448
> >> -rw-r--r-- 1 tomcat tomcat 1577256 Dec 18 11:11 libtcnative.a
> >> -rwxr-xr-x 1 tomcat tomcat 865 Dec 18 11:11 libtcnative.la
> >> lrwxrwxrwx 1 tomcat tomcat 21 Dec 18 11:11 libtcnative.so ->
> >> libtcnative.so.0.1.18
> >> lrwxrwxrwx 1 tomcat tomcat 21 Dec 18 11:11 libtcnative.so.0 ->
> >> libtcnative.so.0.1.18
> >> -rwxr-xr-x 1 tomcat tomcat 884518 Dec 18 11:11 libtcnative.so.0.1.18
> >>
>
> I do not see "-1" in the library file names.
>
> From Java source of o.a.tomcat.jni.Library:
>
> /* Default library names */
> private static String [] NAMES = {"tcnative-1", "libtcnative-1"};
>
>
> also make sure that the libraries are compiled as 64-bit, if you are
> using 64-bit JVM. Maybe the 'file' command will show such info, though
> I do not really know.
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: tomcat native problem 64bit linux os
Posted by Konstantin Kolinko <kn...@gmail.com>.
2010/1/1 Michele Mase' <mi...@gmail.com>:
> Anyone????
>
> On Tue, Dec 22, 2009 at 10:02 AM, Michele Mase' <mi...@gmail.com>wrote:
>
>> (...)
>> The tomcat native libraries now are put under $CATALINA_HOME/lib64
>> ll lib64
>> total 2448
>> -rw-r--r-- 1 tomcat tomcat 1577256 Dec 18 11:11 libtcnative.a
>> -rwxr-xr-x 1 tomcat tomcat 865 Dec 18 11:11 libtcnative.la
>> lrwxrwxrwx 1 tomcat tomcat 21 Dec 18 11:11 libtcnative.so ->
>> libtcnative.so.0.1.18
>> lrwxrwxrwx 1 tomcat tomcat 21 Dec 18 11:11 libtcnative.so.0 ->
>> libtcnative.so.0.1.18
>> -rwxr-xr-x 1 tomcat tomcat 884518 Dec 18 11:11 libtcnative.so.0.1.18
>>
I do not see "-1" in the library file names.
>From Java source of o.a.tomcat.jni.Library:
/* Default library names */
private static String [] NAMES = {"tcnative-1", "libtcnative-1"};
also make sure that the libraries are compiled as 64-bit, if you are
using 64-bit JVM. Maybe the 'file' command will show such info, though
I do not really know.
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: tomcat native problem 64bit linux os
Posted by Michele Mase' <mi...@gmail.com>.
Anyone????
On Tue, Dec 22, 2009 at 10:02 AM, Michele Mase' <mi...@gmail.com>wrote:
> I've successfully enabled the apr native on linux CentOS 32 bit following
> some simple steps:
>
> Install apr and openssl dev required files
> yum install openssl-devel apr-devel
>
> Install jdk, tomcat and set JAVA_HOME; accordlin to my conf JAVA_HOME is
> /usr/java/latest and tomcat is in /home/tomcat/tomcat-6b
> Get tomcat native (I used the 1.1.18 version)
> Before compiling is useful to test that tomcat is fully working (eg. cd ~;
> cd tomcat-6b/bin; sh catalina.sh run)
>
> Native:
> untarring
> tar zxvf tomcat-native-version-src.tar.gz (version=1.1.18 in my env)
> compiling:
> ./configure --with-apr=$(which apr-1-config)
> --with-java-home=$JAVA_HOME --with-ssl=yes
> --prefix=/home/tomcat/tomcat6-a
> make && make install
>
> Now native libs are in /home/tomcat/tomcat-6b/lib
>
> Edit catalina.sh adding:
> CATALINA_OPTS="$CATALINA_OPTS
> -Djava.library.path=/home/tomcat/tomcat-6b/lib"
>
> Restart tomcat and verify that the message complying the missing apr is
> gone ...
>
> If you set CATALINA_HOME env, you can optionally use
> --prefix=$CATALINA_HOME
> The apr will be put in $CATALINA_HOME/lib
>
> The same procedure on linux 64bit doesn't work
> The tomcat native libraries now are put under $CATALINA_HOME/lib64
> ll lib64
> total 2448
> -rw-r--r-- 1 tomcat tomcat 1577256 Dec 18 11:11 libtcnative.a
> -rwxr-xr-x 1 tomcat tomcat 865 Dec 18 11:11 libtcnative.la
> lrwxrwxrwx 1 tomcat tomcat 21 Dec 18 11:11 libtcnative.so ->
> libtcnative.so.0.1.18
> lrwxrwxrwx 1 tomcat tomcat 21 Dec 18 11:11 libtcnative.so.0 ->
> libtcnative.so.0.1.18
> -rwxr-xr-x 1 tomcat tomcat 884518 Dec 18 11:11 libtcnative.so.0.1.18
> drwxr-xr-x 2 tomcat tomcat 4096 Dec 22 09:28 pkgconfig
>
> I've added in the catalina.sh the following
> CATALINA_OPTS="$CATALINA_OPTS
> -Djava.library.path=/home/tomcat/tomcat-6b/lib64"
>
> And again, after tomcat is started i find the missing apr messages
> ...
> Dec 22, 2009 9:59:16 AM 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: /home/tomcat/tomcat-6b/lib64
> ...
>
> Any suggestion?????
>
>
>