Results 1 to 5 of 5

Thread: Connection Refused

  1. #1
    susannesch is offline Registered User
    Name: Susanne Schilling
    Organization: Hydrometer
    Project: accessing an OSGI Framework from C++
    Join Date
    May 2009
    Posts
    33

    Connection Refused

    Hello,

    when I try to get a connection, I get the following Error-Message:

    Ice::ConnectionRefusedException: connection refused: error: 10061

    What does this Error-Code mean?

    Thanks for your help,
    Susanne

  2. #2
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    You should always specify your platform and Ice version when asking specific questions like this.

    In this case, the error code is WSAECONNREFUSED, meaning connection refused.

    Windows Sockets Error Codes (Windows)

    It means that the server is not listening on the port you are attempting to connect with.

  3. #3
    susannesch is offline Registered User
    Name: Susanne Schilling
    Organization: Hydrometer
    Project: accessing an OSGI Framework from C++
    Join Date
    May 2009
    Posts
    33
    Thanks, but the Ports on both sides are correct and both, the client and the server-part are running on one machine (windows XP). The problem doesn't occur if I use Ice for Client and Server or Ice for the Server-Part and IceE for the Client-Part. But running the Server with IceE is the Problem. I use IceE for Java 1.2 with the IBM J9 (Java Micro Edition CLDC 1.1 with MIDP 2.0, IBM WebSphere Everyplace Micro Environment 5.7.1 for Palm OS). the development platform for the server is Eclipse Equinox.
    Can you give me an advice?

    Here the server-side code:

    ic = Ice.Util.initialize(args);
    Ice.ObjectAdapter adapterAppLayer =
    ic.createObjectAdapterWithEndpoints(
    "ApplicationLayerAdapter", "default -p 10000");
    Ice.Object object = new ApplicationLayerFunctionsI();
    adapterAppLayer.add(object, ic.stringToIdentity("ApplicationLayer"));
    adapterAppLayer.activate();
    ic.waitForShutdown();

    And the client-side code:

    try {

    ic = Ice::initialize(argc, (char**)args);
    Ice::ObjectPrx base =
    ic->stringToProxy("ApplicationLayer:default -p 10000");
    finder = ApplicationLayerFunctionsPrx::checkedCast(base);
    if (!finder) {
    throw "Invalid proxy";
    }
    } catch (const Ice::Exception& ex) {
    cerr << ex << endl;
    status = 1;
    } catch (const char* msg) {
    cerr << msg << endl;
    status = 1;
    }

    Thanks,
    Susanne
    Last edited by susannesch; 06-25-2009 at 10:37 AM.

  4. #4
    dwayne's Avatar
    dwayne is offline ZeroC Staff
    Name: Dwayne Boone
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Jan 2005
    Location
    St. John's, Newfoundland
    Posts
    397
    You may need to explicitly set hosts in your endpoint strings using the -h parameter. For example
    Code:
    "tcp -h 127.0.0.1 -p 10000"
    for the loopback interface, or use whatever host name/ip that fits your needs.

  5. #5
    susannesch is offline Registered User
    Name: Susanne Schilling
    Organization: Hydrometer
    Project: accessing an OSGI Framework from C++
    Join Date
    May 2009
    Posts
    33
    Great! That's it! Thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Ice Connection Refused Exception
    By aswani in forum Help Center
    Replies: 9
    Last Post: 08-12-2009, 02:27 AM
  2. Connection refused (ICE)
    By perkunas in forum Help Center
    Replies: 4
    Last Post: 08-10-2009, 07:09 AM
  3. ICE-E in MFC connection refused
    By Maestro Arohtar in forum Help Center
    Replies: 7
    Last Post: 06-03-2007, 05:08 AM
  4. Connection Refused Exception with Redhat Linux
    By mwilson in forum Help Center
    Replies: 6
    Last Post: 07-12-2005, 12:09 PM
  5. IceBox Conection refused
    By xdm in forum Help Center
    Replies: 5
    Last Post: 12-11-2003, 01:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •