tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <adam....@cyberspaceroad.com>
Subject Re: Long freeze during tomcat start
Date Thu, 22 May 2008 12:24:14 GMT
Found it! But I think my knowledge of linux system calls and kernel functions is 
letting me down now. Presumably that is port 48669, which should be open - but 
is it a DNS call? If it is a DNS call, then the DNS server on the same machine 
should serve it - piping it out to the net, presumably. But with my DNS server 
running, which up to now has worked fine, and with the gateway open to allow 
internet access, tomcat still freezes.

So I guess it doesn't matter what the DNS call is for, the problem is that my 
DNS server is not serving it? I guess that means its config needs tweaking to 
tell it to serve DNS requests on the loopback interface.


socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 10
listen(10, 1)                           = 0
getsockname(10, {sa_family=AF_INET6, sin6_port=htons(48669), inet_pton(AF_INET6, 
"::", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, [28]) = 0
socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 11
connect(11, {sa_family=AF_INET6, sin6_port=htons(48669), inet_pton(AF_INET6, 
"::1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 ETIMEDOUT 
(Connection timed out)
close(10)                               = 0
close(11)                               = 0




Jim Cox on 22/05/08 11:23, wrote:
> I'd think it's more likely to be timing out while resolving a hostname via
> DNS, but starting tomcat via strace should show you exactly where it is
> pausing.
> 
> On Thu, May 22, 2008 at 5:08 AM, Adam Hardy <adam.ant@cyberspaceroad.com>
> wrote:
> 
>> I'm still frustrated by this freeze. Looking at this thread dump, I can see
>> it must be the "main" thread that's hanging - but how can I work out
>> anything more regarding the problem?
>>
>> I've done all I can think of to open up the machine it's running on -
>> stopping all other unnecessary processes such as the firewall, apache, the
>> DNS server etc.
>>
>> Could tomcat be waiting in vain for a port? As far as I can tell, it should
>> be using 8080 and 8005 - nothing else is set up in server.xml. Yet these
>> ports are free on the machine. Is there a linux tool I can use to check
>> those ports?
>>
>> Thanks
>> Adam
>>
>> -------- Original Message --------
>> Date: Mon, 19 May 2008 23:13:02 +0100
>>
>> 19-May-2008 23:04:32 org.apache.tomcat.util.modeler.BaseModelMBean
>> preRegister
>> FINE: preRegister org.apache.catalina.connector.Connector@17f1ba3
>> Catalina:type=Connector,port=8080
>> Full thread dump Java HotSpot(TM) Client VM (1.5.0_12-b04 mixed mode,
>> sharing):
>>
>> "Low Memory Detector" daemon prio=1 tid=0x0809e1a8 nid=0xe39 runnable
>> [0x00000000..0x00000000]
>>
>> "CompilerThread0" daemon prio=1 tid=0x0809cc40 nid=0xe38 waiting on
>> condition
>> [0x00000000..0xb2176828]
>>
>> "Signal Dispatcher" daemon prio=1 tid=0x0809bd60 nid=0xe37 runnable
>> [0x00000000..0x00000000]
>>
>> "Finalizer" daemon prio=1 tid=0x08094f38 nid=0xe36 in Object.wait()
>> [0xb23a0000..0xb23a1140]
>>        at java.lang.Object.wait(Native Method)
>>        - waiting on <0x88e609e8> (a java.lang.ref.ReferenceQueue$Lock)
>>        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
>>        - locked <0x88e609e8> (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=1 tid=0x08094240 nid=0xe35 in Object.wait()
>> [0xb2421000..0xb24220c0]
>>        at java.lang.Object.wait(Native Method)
>>        - waiting on <0x88e60910> (a java.lang.ref.Reference$Lock)
>>        at java.lang.Object.wait(Object.java:474)
>>        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
>>        - locked <0x88e60910> (a java.lang.ref.Reference$Lock)
>>
>> "main" prio=1 tid=0x080557c8 nid=0xe33 runnable [0xbf8d6000..0xbf8d8078]
>>        at java.net.PlainSocketImpl.initProto(Native Method)
>>        at java.net.PlainSocketImpl.<clinit>(PlainSocketImpl.java:84)
>>        at java.net.ServerSocket.setImpl(ServerSocket.java:236)
>>        at java.net.ServerSocket.<init>(ServerSocket.java:178)
>>        at java.net.ServerSocket.<init>(ServerSocket.java:141)
>>        at
>>
>> org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:50)
>>        at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:496)
>>        at
>> org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:177)
>>        at
>> org.apache.catalina.connector.Connector.initialize(Connector.java:1059)
>>        at
>>
>> org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
>>        - locked <0x88f6e690> (a [Lorg.apache.catalina.connector.Connector;)
>>        at
>> org.apache.catalina.core.StandardServer.initialize(StandardServer.java:792)
>>        at org.apache.catalina.startup.Catalina.load(Catalina.java:518)
>>        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:585)
>>        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
>>        at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:275)
>>        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:585)
>>        at
>> org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:160)
>>
>> "VM Thread" prio=1 tid=0x08092e48 nid=0xe34 runnable
>>
>> "VM Periodic Task Thread" prio=1 tid=0x0809f650 nid=0xe3a waiting on
>> condition
>>
>> Full thread dump Java HotSpot(TM) Client VM (1.5.0_12-b04 mixed mode,
>> sharing):
>>
>> "Low Memory Detector" daemon prio=1 tid=0x0809e1a8 nid=0xe39 runnable
>> [0x00000000..0x00000000]
>>
>> "CompilerThread0" daemon prio=1 tid=0x0809cc40 nid=0xe38 waiting on
>> condition
>> [0x00000000..0xb2176828]
>>
>> "Signal Dispatcher" daemon prio=1 tid=0x0809bd60 nid=0xe37 runnable
>> [0x00000000..0x00000000]
>>
>> "Finalizer" daemon prio=1 tid=0x08094f38 nid=0xe36 in Object.wait()
>> [0xb23a0000..0xb23a1140]
>>        at java.lang.Object.wait(Native Method)
>>        - waiting on <0x88e609e8> (a java.lang.ref.ReferenceQueue$Lock)
>>        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
>>        - locked <0x88e609e8> (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=1 tid=0x08094240 nid=0xe35 in Object.wait()
>> [0xb2421000..0xb24220c0]
>>        at java.lang.Object.wait(Native Method)
>>        - waiting on <0x88e60910> (a java.lang.ref.Reference$Lock)
>>        at java.lang.Object.wait(Object.java:474)
>>        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
>>        - locked <0x88e60910> (a java.lang.ref.Reference$Lock)
>>
>> "main" prio=1 tid=0x080557c8 nid=0xe33 runnable [0xbf8d6000..0xbf8d8078]
>>        at java.net.PlainSocketImpl.initProto(Native Method)
>>        at java.net.PlainSocketImpl.<clinit>(PlainSocketImpl.java:84)
>>        at java.net.ServerSocket.setImpl(ServerSocket.java:236)
>>        at java.net.ServerSocket.<init>(ServerSocket.java:178)
>>        at java.net.ServerSocket.<init>(ServerSocket.java:141)
>>        at
>>
>> org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:50)
>>        at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:496)
>>        at
>> org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:177)
>>        at
>> org.apache.catalina.connector.Connector.initialize(Connector.java:1059)
>>        at
>>
>> org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
>>        - locked <0x88f6e690> (a [Lorg.apache.catalina.connector.Connector;)
>>        at
>> org.apache.catalina.core.StandardServer.initialize(StandardServer.java:792)
>>        at org.apache.catalina.startup.Catalina.load(Catalina.java:518)
>>        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:585)
>>        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
>>        at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:275)
>>        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:585)
>>        at
>> org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:160)
>>
>> "VM Thread" prio=1 tid=0x08092e48 nid=0xe34 runnable
>>
>> "VM Periodic Task Thread" prio=1 tid=0x0809f650 nid=0xe3a waiting on
>> condition
>>
>>
>>
>> Filip Hanik - Dev Lists on 19/05/08 22:17, wrote:
>>
>>> just do two thread dumps during the freeze
>>>
>>> kill -3 <tomcat process id>
>>> sleep 5
>>> kill -3 <tomcat process id>
>>>
>>> the thread dump will identify where it is hanging, and it gets output to
>>> std.out, by default to catalina.out
>>>
>>> Filip
>>>
>>> Adam Hardy wrote:
>>>
>>>> I've been trying to solve this problem for a couple of hours now and I
>>>> can't see any solution on google or in the archives.
>>>>
>>>> I have tomcat 6.0.13 and java 1.5.0_12 running on debian linux 2.6, my
>>>> own installation, not the debian packages.
>>>>
>>>> I stripped the tomcat config down to the bare minimum, no webapps, and
>>>> just the one connector configured:
>>>>
>>>>   <Connector port="8080" protocol="HTTP/1.1"
>>>>              connectionTimeout="20000"
>>>>              redirectPort="8443" />
>>>>
>>>> It takes about 3 mins to start, as you can see from the logging below at
>>>> the point where BaseModelMBean tries to preregister.
>>>>
>>>> The config works fine on my linux workstation, but not on this machine.
>>>> The machine is a gateway and DNS server also running Apache on port 80, but
>>>> even with the firewall and the servers down, I can't get around this
>>>> problem.
>>>>
>>>> Can anybody help?
>>>>
>>>>
>>>> FINE: preRegister org.apache.tomcat.util.buf.StringCache@3eca90Catalina:type=StringCache
>>>> 19-May-2008 17:22:58 org.apache.tomcat.util.modeler.Registry
>>>> registerComponent
>>>> FINE: Managed= Catalina:type=Service,serviceName=Catalina
>>>> 19-May-2008 17:22:58 org.apache.tomcat.util.modeler.BaseModelMBean
>>>> preRegister
>>>> FINE: preRegister StandardService[Catalina]
>>>> Catalina:type=Service,serviceName=Catalina
>>>> 19-May-2008 17:22:58 org.apache.tomcat.util.modeler.Registry
>>>> registerComponent
>>>> FINE: Managed= Catalina:type=Connector,port=8080
>>>> 19-May-2008 17:22:58 org.apache.tomcat.util.modeler.BaseModelMBean
>>>> preRegister
>>>> FINE: preRegister org.apache.catalina.connector.Connector@17f1ba3Catalina:type=Connector,port=8080
>>>> 19-May-2008 17:26:07 org.apache.tomcat.util.modeler.BaseModelMBean
>>>> preRegister
>>>> FINE: preRegister BaseModelMbean[null] Catalina:type=MBeanFactory
>>>> 19-May-2008 17:26:07 org.apache.tomcat.util.modeler.BaseModelMBean
>>>> preRegister
>>>> FINE: preRegister null Catalina:type=MBeanFactory
>>>> 19-May-2008 17:26:07 org.apache.tomcat.util.modeler.BaseModelMBean
>>>> preRegister
>>>> FINE: preRegister org.apache.catalina.deploy.NamingResources@1dd46f7Catalina:type=NamingResources,resourcetype=Global


---------------------------------------------------------------------
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