Home Help Center

ConnectionRefusedException to which service?

peter.lawreypeter.lawrey Member Peter LawreyOrganization: MLPProject: Setup development
When I get a ConnectionRefusedException, what is the easiest way to determine what it failed to connect to?

I traced through the code using debugging and managed to trace the error eventually. Is there a way I can log out what it failed to connect to without using the debugger?

I get this exception
    error = 0
	at IceInternal.ConnectRequestHandler.getConnection(ConnectRequestHandler.java:240)
	at Ice.ObjectPrxHelperBase.ice_getConnection(ObjectPrxHelperBase.java:1710)
    .... deleted code ...
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.net.ConnectException: Connection refused
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:701)
	at IceInternal.Network.doFinishConnect(Network.java:325)
	at IceInternal.TcpTransceiver.initialize(TcpTransceiver.java:33)
	at Ice.ConnectionI.initialize(ConnectionI.java:1831)
	at Ice.ConnectionI.message(ConnectionI.java:1038)
	at IceInternal.ThreadPool.run(ThreadPool.java:302)
	at IceInternal.ThreadPool.access$300(ThreadPool.java:12)
	at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:643)
	... 1 more


  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff

    You can configure your client with the Ice.Trace.Network=2 property to show the endpoint information that caused the connection failure.

  • peter.lawreypeter.lawrey Member Peter LawreyOrganization: MLPProject: Setup development
    Thank you for all your help.

Sign In or Register to comment.