Home Comments

Java Based Servent and Client

machouichamachouicha Member AmineOrganization: MStarProject: bridge between java and c#

All:
This is the first time I am using slice and zeroc api. Went thru the doc and the hello world example and developed both a server and client. The server started fine on port 9090 and I can check it is listening on that port. When I try to start the client I get the below stack trace, both server and client running on my locahost and I am on a VPN. Any advice how to troubleshoot such issue? I am using 3.7.5 version. Thanks in advance.

Exception in thread "main" com.zeroc.Ice.SocketException
error = 0
at com.zeroc.IceInternal.OutgoingAsync.waitForResponseOrUserEx(OutgoingAsync.java:140)
at com.zeroc.IceInternal.OutgoingAsync.waitForResponse(OutgoingAsync.java:112)
at com.zeroc.Ice._ObjectPrxI.ice_isA(_ObjectPrxI.java:31)
at com.zeroc.Ice.ObjectPrx._checkedCast(ObjectPrx.java:949)
at com.zeroc.Ice.ObjectPrx._checkedCast(ObjectPrx.java:868)
at NetiClient.MorningstarAuthorizerPrx.checkedCast(MorningstarAuthorizerPrx.java:174)
at com.morningstar.entitlement.NetiIceClient.main(NetiIceClient.java:26)
Caused by: java.net.BindException: Can't assign requested address
at sun.nio.ch.Net.connect0(Native Method)
at sun.nio.ch.Net.connect(Net.java:454)
at sun.nio.ch.Net.connect(Net.java:446)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:645)
at com.zeroc.IceInternal.Network.doConnect(Network.java:481)
at com.zeroc.IceInternal.StreamSocket.(StreamSocket.java:23)
at com.zeroc.IceInternal.TcpConnector.connect(TcpConnector.java:12)
at com.zeroc.IceInternal.OutgoingConnectionFactory$ConnectCallback.nextConnector(OutgoingConnectionFactory.java:1110)
at com.zeroc.IceInternal.OutgoingConnectionFactory$ConnectCallback.access$100(OutgoingConnectionFactory.java:875)
at com.zeroc.IceInternal.OutgoingConnectionFactory.getConnection(OutgoingConnectionFactory.java:576)
at com.zeroc.IceInternal.OutgoingConnectionFactory.access$800(OutgoingConnectionFactory.java:12)
at com.zeroc.IceInternal.OutgoingConnectionFactory$ConnectCallback.getConnection(OutgoingConnectionFactory.java:1055)
at com.zeroc.IceInternal.OutgoingConnectionFactory$ConnectCallback.connectors(OutgoingConnectionFactory.java:939)
at com.zeroc.IceInternal.EndpointHostResolver.lambda$resolve$0(EndpointHostResolver.java:106)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Comments

  • machouichamachouicha Member AmineOrganization: MStarProject: bridge between java and c#

    I just resolve this issue by changing the client connection details:

    • From:
    • communicator.stringToProxy("NetiClientIceBridge:default -p 9090");

    • To:
      communicator.stringToProxy("NetiClientIceBridge:default -h localhost -p 9090")

Sign In or Register to comment.