Archived

This forum has been archived. Please start a new discussion on GitHub.

Client/Server Connection Issues - ThreadPool Exception

Hi,

I have C# and Python clients and a Java servant. I am intermittently getting the following exception on the server side on an incoming connection attempt when I call checkedCast in the client. Other times, the call will hang for a few minutes and then eventually connect.
Ice.ThreadPool.Server-21: connection exception:$
   local address = --.-.---.---:----$
   remote address = --.-.---.---:----$
   Ice.ConnectionLostException$
       error = 0$
   :at IceInternal.TcpTransceiver.read(Unknown Source)$
   :at Ice.ConnectionI.message(Unknown Source)$
   :at IceInternal.ThreadPool.run(Unknown Source)$
   :at IceInternal.ThreadPool.access$300(Unknown Source)$
   :at IceInternal.ThreadPool$EventHandlerThread.run(Unknown Source)$
   :at java.lang.Thread.run(Thread.java:722)$
   Caused by: java.io.IOException: Connection reset by peer$
   :at sun.nio.ch.FileDispatcherImpl.read0(Native Method)$
   :at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)$
   :at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:225)$
   :at sun.nio.ch.IOUtil.read(IOUtil.java:193)$
   :at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:359)$
   :... 6 more$


This has also caused my C# clients to crash from the following exception:

Attachment not found.

For some reason, this only happens when I connect to servants written in Java. I have other servants written in C# and Python where this does not occur. This does not happen with every connection attempt, and many times is resolved by a restart of the client and fresh connection attempt. I am running version 1.5.0 of ICE. The server side registry is running on a different server than the servant process.

Let me know if you need anymore information.

Thanks

Comments

  • Additional Details

    I found the connectivity issue and it has to do with refreshing the registry to remove some outdated routes. So it did not have to do with anything Java related but manifested itself in our Java servers.

    I still need some help in handling the screenshot Exception on the client side - this does not get caught in our exception handling and does not happen every time.
  • mes
    mes California
    Hi Scott,

    Welcome to the forum.

    I'm guessing you meant that you're using Ice 3.5.0 and not 1.5.0. It would be helpful for us to know the operating environment (operating system and .NET version).

    Please note that we typically only provide free support here on the forum for the latest release, which is 3.5.1.

    The exception issue is definitely unusual. Obviously the Ice code uses an assertion here because it's not expecting the condition to be true under normal circumstances. Can you provide a description of what the application is doing (in all application threads) at the time this happens? Better yet, a small code example would be preferable if that's possible.

    Regards,
    Mark