tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob DeRemer <>
Subject websocket connection (at startup) between 2 webapps in same Tomcat 7.0.47 instance hangs indefinitely
Date Fri, 18 Oct 2013 21:09:17 GMT
Hi Guys,

In our implementation, we have a gateway app that uses jsr websockets to communication with
our main application server.  In a small system, we want to run them both on a single Tomcat
instance using the same Tomcat NIO connector, but directing to different respective WS paths.
 This works fine if you deploy the MAIN first, then the GW - so that MAIN is already up and
running.  If you restart Tomcat when both webapps are deployed - and the GW (client) starts
first, it hangs indefinitely in the following code trying to establish a WS connection:

Is this a bug or a known limitation when a client/server in the same webapp try to connect
at startup?


"localhost-startStop-1" daemon prio=6 tid=0x000000000ef0f800 nid=0x1624 waiting on condition
   java.lang.Thread.State: WAITING (parking)
       at sun.misc.Unsafe.park(Native Method)
       - parking to wait for  <0x00000007d6d98b18> (a java.util.concurrent.CountDownLatch$Sync)
       at java.util.concurrent.locks.LockSupport.park(
       at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(
       at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(
       at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(
       at java.util.concurrent.CountDownLatch.await(
       at org.apache.tomcat.websocket.WsWebSocketContainer.processResponse(
       at org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(
       at com.thingworx.core.communication.channels.jsr356.client.Jsr356ClientChannel.connect(
       at com.thingworx.core.communication.endpoints.CommunicationEndpoint.connect(
       at com.thingworx.core.communication.CommunicationSubsystem.startSubsystem(
       at com.thingworx.core.subsystems.SubsystemBase.start(
       at com.thingworx.apiserver.APIServerManager.startSubsystem(
       at com.thingworx.core.subsystems.SubsystemBase.start(
       at com.thingworx.apiserver.Bootstrapper.contextInitialized(
       at org.apache.catalina.core.StandardContext.listenerStart(
       at org.apache.catalina.core.StandardContext.startInternal(
       - locked <0x00000007da3e0308> (a org.apache.catalina.core.StandardContext)
       at org.apache.catalina.util.LifecycleBase.start(
       - locked <0x00000007da3e0308> (a org.apache.catalina.core.StandardContext)
       at org.apache.catalina.core.ContainerBase$
       at org.apache.catalina.core.ContainerBase$
       at java.util.concurrent.ThreadPoolExecutor.runWorker(
       at java.util.concurrent.ThreadPoolExecutor$

   Locked ownable synchronizers:
       - <0x00000007da3a7ab0> (a java.util.concurrent.ThreadPoolExecutor$Worker)

Bob DeRemer
Senior Director, Architecture and Development

[Description: Description: Description: Description: cid:image001.png@01CBE3DE.51A12030]<>
Skype: bob.deremer.thingworx
O: 610.594.6200 x812
M: 717.881.3986

  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message