Results 1 to 11 of 11

Thread: Endpoint Specifications

  1. #1
    steveo06360 is offline Registered User
    Name: Steve Owens
    Organization: Integrity Integrators LLC
    Project: Just learning
    Join Date
    Mar 2009
    Posts
    6

    Unhappy Endpoint Specifications

    I have just gotten started with ICE but I have read quite alot of the documentation available already and built the tutorials. ICE professes to be an easy replacement for CORBA and from the looks of it that seems to be the case.

    However, there is one thing that seems to be conspicuously absent from the examples and documentation. That is a good treatment of endpoint strings.

    All the samples I have seen so far show endpoint strings of the form:

    "default -p 10000"

    This is all well and good if all you ever want to do is use your ICE solution locally on one machine, but RPC is about distributed computing.

    How the heck do you specify that you want an ICE component to listen on something like 203.202.121.44:1000 versus 0.0.0.0:1000 so you can actually see two machines communicating over the internet?

  2. #2
    xdm's Avatar
    xdm
    xdm is offline ZeroC Staff
    Name: Jose Gutierrez de la Concha
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Sep 2003
    Location
    La Coruña, Spain
    Posts
    588
    Hi Steve,

    Welcome to our forums

    How the heck do you specify that you want an ICE component to listen on something like 203.202.121.44:1000 versus 0.0.0.0:1000 so you can actually see two machines communicating over the internet?
    you should use -h option

    Code:
    tcp -h 203.202.121.44 -p 1000
    See section 32.4.6 Endpoints for detailed documentation about adapter endpoints
    http://www.zeroc.com/doc/Ice-3.3.0-I...rver.33.4.html

    For a complete reference of endpoints options see
    http://www.zeroc.com/doc/Ice-3.3.0-I...tRef.51.2.html

    Regards,
    José

  3. #3
    steveo06360 is offline Registered User
    Name: Steve Owens
    Organization: Integrity Integrators LLC
    Project: Just learning
    Join Date
    Mar 2009
    Posts
    6

    Endpoints Documentation

    I tried that using the following:

    -- Relevant client side code in C# ----
    ic = Ice.Util.initialize(ref args);
    Ice.ObjectPrx obj = ic.stringToProxy("SimplePrinter:tcp -h integrityintegrators.net -p 10000");

    PrinterPrx printer = PrinterPrxHelper.checkedCast(obj);
    if (printer == null)
    throw new ApplicationException("Invalid proxy");

    printer.printString("Hello World!");
    ----------- End client side code

    -- Relevant server side code in C++ -------
    ic = Ice::initialize(argc, argv);
    Ice::ObjectAdapterPtr adapter
    = ic->createObjectAdapterWithEndpoints(
    "SimplePrinterAdapter", "tcp -h integrityintegrators.net -p 10000
    ----------- End Server side code

    When I run the client, I get the following exception:


    Ice.ConnectionRefusedException
    error = 0
    at IceInternal.ProxyFactory.checkRetryAfterException( LocalException ex, Refer
    ence ref, OutgoingAsync outAsync, Int32& cnt) in d:\builds\distbuilds\release\Ic
    e-3.3.0\cs\src\Ice\ProxyFactory.cs:line 196
    at Ice.ObjectPrxHelperBase.handleException__(ObjectDe l_ delegate, LocalExcept
    ion ex, OutgoingAsync outAsync, Int32& cnt) in d:\builds\distbuilds\release\Ice-
    3.3.0\cs\src\Ice\Proxy.cs:line 880
    at Ice.ObjectPrxHelperBase.ice_isA(String id__, Dictionary`2 context__, Boole
    an explicitContext__) in d:\builds\distbuilds\release\Ice-3.3.0\cs\src\Ice\Proxy
    .cs:line 170
    at Ice.ObjectPrxHelperBase.ice_isA(String id__) in d:\builds\distbuilds\relea
    se\Ice-3.3.0\cs\src\Ice\Proxy.cs:line 139
    at Demo.PrinterPrxHelper.checkedCast(ObjectPrx b) in C:\Documents and Setting
    s\X042530\My Documents\Visual Studio 2005\Projects\MSC\demoClient\demoClient\Pri
    nter.cs:line 107
    at demoClient.Program.Main(String[] args) in C:\Documents and Settings\X04253
    0\My Documents\Visual Studio 2005\Projects\MSC\demoClient\demoClient\Program.cs :
    line 18
    Caused by: System.Net.Sockets.SocketException: No connection could be made becau
    se the target machine actively refused it
    at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
    at IceInternal.Network.doEndConnectAsync(IAsyncResult result) in d:\builds\di
    stbuilds\release\Ice-3.3.0\cs\src\Ice\Network.cs:line 684

  4. #4
    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
    Looks like a firewall issue. Is the port accessible? Did you try telnet integrityintegrators.net 10000 and see if you get a connection? You can enable the configuration property Ice.Trace.Network=1 (or 2 or 3 if you want more information) to get debugging information in your applications.

    See http://www.zeroc.com/faq/connectionR...Exception.html for more information.

  5. #5
    steveo06360 is offline Registered User
    Name: Steve Owens
    Organization: Integrity Integrators LLC
    Project: Just learning
    Join Date
    Mar 2009
    Posts
    6

    Endpoints

    I am not sure what is going on, will try testing from different place. I even tried configuring it to listen on port 80 which is known to be accessible, when the web server is up, and still no luck.

    Telneting in with putty produces connection refused when accessing the ICE thinglet (can't remember your word for it at the moment but I want to call it a cube as in ice cube, kind of like java bean).

  6. #6
    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
    If you use Ice.Trace.Network you can find out what IP & port the service is actually listening on. If its listening on the correct IP & port, and its inaccessible then you know it must be a firewall issue.

  7. #7
    steveo06360 is offline Registered User
    Name: Steve Owens
    Organization: Integrity Integrators LLC
    Project: Just learning
    Join Date
    Mar 2009
    Posts
    6

    Smile Ice.Trace.Network

    Apparently it was a firewall issue, because when I tried from a location not behind the firewall, the application worked like a charm.

    Now I guess I need to get my head around glacier so that things can work as expected even behind a firewall.

    By the way, I have to say that Ice is cool!

  8. #8
    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
    Note that Glacier2 isn't required to traverse firewalls, however, if you have many objects behind the firewall it makes your life much simpler. I recommend reading Michi's article on Glacier2 in Issue 22 of Connections. http://www.zeroc.com/newsletter/issue22.pdf

  9. #9
    steveo06360 is offline Registered User
    Name: Steve Owens
    Organization: Integrity Integrators LLC
    Project: Just learning
    Join Date
    Mar 2009
    Posts
    6

    Traversing firewalls

    If glacier is not needed for traversing firewalls, then what would be the simplest path to solving this problem. I would like to just do some prototyping and not get bogged down in unneeded complexity for the moment.

    Also what is your policy toward allowing others to write articles on your technology, I figure that since I am a pretty good writer, and would like to get my name out there more, if you have a need for more tutorials and articles, maybe we can work something out.

  10. #10
    xdm's Avatar
    xdm
    xdm is offline ZeroC Staff
    Name: Jose Gutierrez de la Concha
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Sep 2003
    Location
    La Coruña, Spain
    Posts
    588
    If glacier is not needed for traversing firewalls, then what would be the simplest path to solving this problem.
    The simplest is to configure your firewall to allow connections to the server address and port

    You would also need to do this even if using Glacier2.

    To know more about Glacier2 read http://www.zeroc.com/doc/Ice-3.3.0/m...ier2.40.2.html

    Let us know if you need more help with that.

    Regards,
    José

  11. #11
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    Hi Steve,

    Let me try to clarify. Say you have one client and one server on separate networks, with one or more firewalls in between. To go through this (these) firewall, there are two possibilities:

    - Your client and server talk directly to each other, through an open port on your server-side firewall. If this firewall is not on the same machine as your server, then you will need some extra configuration if your server creates proxies and pass them to the client. See http://www.zeroc.com/faq/configurationForNAT.html

    - You install an intermediate server (the "Glacier2 router") between your client and your server. Since the Glacier2 router is an Ice server, it's similar to the situation above: you client will talk to the Glacier2 router "through" the firewall, and the Glacier2 router will forward the request to your server. With this setup, you only need to open one port on your firewall for any number of servers behind the firewall; and Glacier2 also provides additional features such as session management, authentication, etc.

    Also what is your policy toward allowing others to write articles on your technology, I figure that since I am a pretty good writer, and would like to get my name out there more, if you have a need for more tutorials and articles, maybe we can work something out.
    We welcome all articles, tutorials etc. about Ice: please go ahead!

    Thanks,
    Bernard
    Bernard Normier
    ZeroC, Inc.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Endpoint format
    By acbell in forum Help Center
    Replies: 3
    Last Post: 03-03-2009, 04:27 PM
  2. Endpoint Selection After Timeout
    By kalaxy in forum Help Center
    Replies: 2
    Last Post: 08-01-2008, 03:53 PM
  3. Using ICE without an endpoint
    By jgaa in forum Help Center
    Replies: 1
    Last Post: 07-05-2007, 03:06 AM
  4. SSL Proxy Endpoint and -s
    By gsalazar in forum Help Center
    Replies: 11
    Last Post: 06-22-2005, 01:57 PM
  5. Endpoint merge
    By ganzuoni in forum Help Center
    Replies: 1
    Last Post: 06-25-2003, 08:52 AM

Posting Permissions

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