Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 06-06-2007
caos1234 caos1234 is offline
Registered User
 
Name: Carlos Hurtado
Organization: U de Chile
Project: Sixbell
 
Join Date: May 2007
Posts: 6
throughput demo (java client) failing to connect to throughput demo (C++ server)

That' about it. I am able to use the throughput demo in the following combinations (on the same machine, no config files were changed):
Java Server - Java Client
C++ Server - C++ Client
Java Server - C++ Client

but when i load the C++ server and execute the Java client (java Client)
the following error appear
Code:
Client: Ice.ConnectionRefusedException
    error = 0
Ice.ConnectionRefusedException
    error = 0
        at IceInternal.Network.doConnect(Network.java:284)
        at IceInternal.TcpConnector.connect(TcpConnector.java:25)
        at IceInternal.OutgoingConnectionFactory.create(OutgoingConnectionFactory.java:308)
        at IceInternal.RoutableReference.createConnection(RoutableReference.java:379)
        at IceInternal.DirectReference.getConnection(DirectReference.java:192)
        at Ice._ObjectDelM.setup(_ObjectDelM.java:258)
        at Ice.ObjectPrxHelperBase.__getDelegate(ObjectPrxHelperBase.java:905)
        at Ice.ObjectPrxHelperBase.ice_isA(ObjectPrxHelperBase.java:73)
        at Ice.ObjectPrxHelperBase.ice_isA(ObjectPrxHelperBase.java:61)
        at Demo.ThroughputPrxHelper.checkedCast(ThroughputPrxHelper.java:418)
        at Client.run(Client.java:51)
        at Ice.Application.main(Application.java:114)
        at Ice.Application.main(Application.java:57)
        at Client.main(Client.java:412)
Caused by: java.net.ConnectException: Connection refused
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:521)
        at IceInternal.Network.doConnect(Network.java:259)
        ... 13 more
Which is the same error i get if i don't execute the server at all. I don't know what is needed to allow this object to work that way, (i guessed it was the same object, and the thing that's failing is the connection.
Maybe the config files are the problem. I haven't changed anything in those files. Any idea of what could it be?

btw: Ice 3.1.1 (both java and C) under ubuntu

Last edited by caos1234 : 06-06-2007 at 02:48 PM.
Reply With Quote
  #2 (permalink)  
Old 06-06-2007
beagles's Avatar
beagles beagles is offline
ZeroC Staff
 
Name: Brent Eagles
Organization: ZeroC, Inc
Project: Ice Developer
 
Join Date: Feb 2003
Location: Newfoundland
Posts: 110
The Throughput proxy in the Ice for Java demo's config.client file is missing the host specification. Change it to:

Throughput.Throughput=throughput:default -h 127.0.0.1 -p 10000

and it should work okay for you.

Cheers,

Brent
Reply With Quote
  #3 (permalink)  
Old 06-06-2007
caos1234 caos1234 is offline
Registered User
 
Name: Carlos Hurtado
Organization: U de Chile
Project: Sixbell
 
Join Date: May 2007
Posts: 6
It worked but...

Thanks mr. beagles, that worked fine. But now, i found myself with another problem.
When i moved my tests to different hosts
i can't get the c++ server to work
i could get the following combinations right:
Java Server - Java Client
Java Server - C++ Client

but when i run the C++ server (in CAOS_NOTEBOOK machine)
and use the c++ client in another machine with the following config.client
Code:
Throughput.Throughput=throughput:tcp -h CAOS_NOTEBOOK -p 10000

#
# SSL Configuration
#
Ice.Plugin.IceSSL=IceSSL:createIceSSL
IceSSL.DefaultDir=../../../certs
IceSSL.CertAuthFile=cacert.pem
IceSSL.CertFile=c_rsa1024_pub.pem
IceSSL.KeyFile=c_rsa1024_priv.pem

#
# Disable ACM
#
Ice.ACM.Client=0
I get the following message
Code:
./client: Network.cpp:669: Ice::ConnectionRefusedException:
connection refused: Connection refused
And when i use the java client with the following config.client
Code:
Throughput.Throughput=throughput:tcp -h CAOS_NOTEBOOK -p 10000
Throughput.Endpoints=tcp -h CAOS_NOTEBOOK -p 10000

Ice.ACM.Client=0
Ice.ACM.Server=0
I get the following error
Code:
[ Network: trying to establish tcp connection to 192.168.1.101:10000 ]
[ Network: trying to establish tcp connection to 192.168.1.101:10000 ]
Client: Ice.ConnectionRefusedException
    error = 0
Ice.ConnectionRefusedException
    error = 0
        at IceInternal.Network.doConnect(Network.java:284)
        at IceInternal.TcpConnector.connect(TcpConnector.java:25)
        at IceInternal.OutgoingConnectionFactory.create(OutgoingConnectionFactory.java:308)
        at IceInternal.RoutableReference.createConnection(RoutableReference.java:379)
        at IceInternal.DirectReference.getConnection(DirectReference.java:192)
        at Ice._ObjectDelM.setup(_ObjectDelM.java:258)
        at Ice.ObjectPrxHelperBase.__getDelegate(ObjectPrxHelperBase.java:905)
        at Ice.ObjectPrxHelperBase.ice_isA(ObjectPrxHelperBase.java:73)
        at Ice.ObjectPrxHelperBase.ice_isA(ObjectPrxHelperBase.java:61)
        at Demo.ThroughputPrxHelper.checkedCast(ThroughputPrxHelper.java:418)
        at Client.run(Client.java:51)
        at Ice.Application.main(Application.java:114)
        at Ice.Application.main(Application.java:57)
        at Client.main(Client.java:412)
Caused by: java.net.ConnectException: Connection refused
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:521)
        at IceInternal.Network.doConnect(Network.java:259)
what could it be?
I ping CAOS_NOTEBOOK without problems, and it worked in the previously mentioned combinations, so it can't be a port blocking problem.

Thanks again, and sorry for so many newbie questions.
Reply With Quote
  #4 (permalink)  
Old 06-06-2007
michi's Avatar
michi michi is offline
ZeroC Staff
 
Name: Michi Henning
Organization: ZeroC
Project: Ice
 
Join Date: Feb 2003
Location: Brisbane, Australia
Posts: 912
If you get a ConnectionRefusedException, that means that no process is listening at the port the client connects to. Your trace shows that the client tries to connect to 192.168.1.101:10000. Are you certain that your server is actually running on that host and port?

What happens if you start the server and then do:

telnet 192.168.1.101 10000

You should be able to connect with telnet. If not, the server is defintely not running where the client things its running.

You can run the server with --Ice.Trace.Network=2 to see what endpoints the server listens at.

Cheers,

Michi.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Throughput Performance in Java jae Help Center 2 12-05-2006 02:47 PM
pure virtual method called causes SIGABRT at throughput demo syseeker Help Center 7 07-05-2006 04:46 AM
IceStorm throughput tvedt Help Center 1 03-08-2005 04:41 PM
Server-side throughput performance measures? SteveWampler Help Center 3 08-31-2004 07:53 PM
Making C++ throughput demo oneway? SteveWampler Help Center 4 09-02-2003 06:14 PM


All times are GMT -4. The time now is 02:13 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.