tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: Tomcat 6.0.10 hangs on startup when APR enabled
Date Sun, 01 Apr 2007 15:19:25 GMT
Just a guess: looks like SSL is waiting for /dev/random (blocking
random) to answer, and /dev/random can take a long time to answer if
there's not enough entropy in the system.

Usually you can choose betwenn /dev/random and /dev/urandom (non
blocking but cryptographic quality depending on entropy) by
configuration. I didn't follow this thread, so I don't know, if we are
talking about OpenSSL or Java SSL.

I hope others will comment to complete the solution.

Regards,

Rainer

Stefan Armbruster schrieb:
> Hi,
> 
> thanks for the responses so far. I removed all libapr* deb packages and 
> installed apr 1.2.8 from source, but Tomcat still hangs. Below the thread 
> dump as suggested by Filip:
> 
> 29.03.2007 19:38:56 org.apache.catalina.core.AprLifecycleListener init
> INFO: Loaded Apache Tomcat Native library 1.1.8.
> 2007-03-29 19:39:01
> Full thread dump Java HotSpot(TM) 64-Bit Server VM (1.6.0-b105 mixed mode):
> 
> "Low Memory Detector" daemon prio=10 tid=0x00002aaad360c000 nid=0xe51 runnable 
> [0x0000000000000000..0x0000000000000000]
>    java.lang.Thread.State: RUNNABLE
> 
> "CompilerThread1" daemon prio=10 tid=0x00002aaad3609400 nid=0xe50 waiting on 
> condition [0x0000000000000000..0x0000000040a31dd0]
>    java.lang.Thread.State: RUNNABLE
> 
> "CompilerThread0" daemon prio=10 tid=0x00002aaad3607800 nid=0xe4f waiting on 
> condition [0x0000000000000000..0x0000000040930d20]
>    java.lang.Thread.State: RUNNABLE
> 
> "Signal Dispatcher" daemon prio=10 tid=0x00002aaad3606000 nid=0xe4e waiting on 
> condition [0x0000000000000000..0x0000000000000000]
>    java.lang.Thread.State: RUNNABLE
> 
> "Finalizer" daemon prio=10 tid=0x00002aaad35e2400 nid=0xe4d in Object.wait() 
> [0x000000004072f000..0x000000004072fcb0]
>    java.lang.Thread.State: WAITING (on object monitor)
>         at java.lang.Object.wait(Native Method)
>         - waiting on <0x00002aaac91cc198> (a 
> java.lang.ref.ReferenceQueue$Lock)
>         at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
>         - locked <0x00002aaac91cc198> (a java.lang.ref.ReferenceQueue$Lock)
>         at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
>         at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
> 
> "Reference Handler" daemon prio=10 tid=0x00002aaad35e1400 nid=0xe4c in 
> Object.wait() [0x000000004062e000..0x000000004062ec30]
>    java.lang.Thread.State: WAITING (on object monitor)
>         at java.lang.Object.wait(Native Method)
>         - waiting on <0x00002aaac91cc1d0> (a java.lang.ref.Reference$Lock)
>         at java.lang.Object.wait(Object.java:485)
>         at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
>         - locked <0x00002aaac91cc1d0> (a java.lang.ref.Reference$Lock)
> 
> "main" prio=10 tid=0x0000000040113000 nid=0xe48 runnable 
> [0x0000000040229000..0x000000004022af70]
>    java.lang.Thread.State: RUNNABLE
>         at org.apache.tomcat.jni.SSL.initialize(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at 
> org.apache.catalina.core.AprLifecycleListener.initializeSSL(AprLifecycleListener.java:209)
>         - locked <0x00002aaaaead4c40> (a java.lang.Class for 
> org.apache.catalina.core.AprLifecycleListener)
>         at 
> org.apache.catalina.core.AprLifecycleListener.lifecycleEvent(AprLifecycleListener.java:81)
>         at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
>         at 
> org.apache.catalina.core.StandardServer.initialize(StandardServer.java:767)
>         at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
>         at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
> 
> "VM Thread" prio=10 tid=0x00002aaad35dc800 nid=0xe4b runnable
> 
> "GC task thread#0 (ParallelGC)" prio=10 tid=0x000000004011d800 nid=0xe49 
> runnable
> 
> "GC task thread#1 (ParallelGC)" prio=10 tid=0x000000004011ec00 nid=0xe4a 
> runnable
> 
> "VM Periodic Task Thread" prio=10 tid=0x00002aaad360dc00 nid=0xe52 waiting on 
> condition
> 
> JNI global references: 757
> 
> Heap
>  PSYoungGen      total 9408K, used 7002K [0x00002aaac8920000, 
> 0x00002aaac9b80000, 0x00002aaad3120000)
>   eden space 8128K, 72% used 
> [0x00002aaac8920000,0x00002aaac8ed79e8,0x00002aaac9110000)
>   from space 1280K, 89% used 
> [0x00002aaac9110000,0x00002aaac922efb0,0x00002aaac9250000)
>   to   space 1280K, 0% used 
> [0x00002aaac9a40000,0x00002aaac9a40000,0x00002aaac9b80000)
>  PSOldGen        total 21504K, used 0K [0x00002aaab3920000, 
> 0x00002aaab4e20000, 0x00002aaac8920000)
>   object space 21504K, 0% used 
> [0x00002aaab3920000,0x00002aaab3920000,0x00002aaab4e20000)
>  PSPermGen       total 21248K, used 7826K [0x00002aaaae520000, 
> 0x00002aaaaf9e0000, 0x00002aaab3920000)
>   object space 21248K, 36% used 
> [0x00002aaaae520000,0x00002aaaaecc49a8,0x00002aaaaf9e0000)
> 
> $ ldd /usr/local/apr/lib/libtcnative-1.so
>         libapr-1.so.0 => /usr/local/apr/lib/libapr-1.so.0 (0x00002ba129577000)
>         libuuid.so.1 => /lib/libuuid.so.1 (0x00002ba1296a1000)
>         librt.so.1 => /lib/librt.so.1 (0x00002ba1297a5000)
>         libcrypt.so.1 => /lib/libcrypt.so.1 (0x00002ba1298ae000)
>         libpthread.so.0 => /lib/libpthread.so.0 (0x00002ba1299e2000)
>         libdl.so.2 => /lib/libdl.so.2 (0x00002ba129af9000)
>         libssl.so.0.9.8 => /usr/lib/libssl.so.0.9.8 (0x00002ba129bfd000)
>         libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8 (0x00002ba129d44000)
>         libc.so.6 => /lib/libc.so.6 (0x00002ba129fba000)
>         /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
>         libz.so.1 => /usr/lib/libz.so.1 (0x00002ba12a1fa000)
> 
> Regards,
> Stefan
> 
> 
> Am Mittwoch, 28. März 2007 21:02 schrieb Mladen Turk:
>> Stefan Armbruster wrote:
>>> Hi,
>>>
>>> Tomcat hangs on startup when I try to enable the APR native library.
>>> After setting java.library.path to /usr/local/apr/lib/, catalina.out gets
>>> just these two lines:
>> You will need apr 1.2.x
>> The generic path for that looks like
>> /usr/local/apr-1/lib
>>
>> The
>> /usr/local/apr/lib is for APR 0.9.x shipped
>> with Apache Httpd 2.0.x and Subversion,
>> so try to set the correct path to APR-1
>>
>> Regards,
>> Mladen.
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 

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


Mime
View raw message