Archived

This forum has been archived. Please start a new discussion on GitHub.

Network is unreachable

Hi,

I don't understand :confused: why I have this message when I launch an Ice program, even with demos include with ICE.

[root@easyg5 minimal]# ./client
Network.cpp:699: Ice::ConnectFailedException:
connect failed: Network is unreachable

Thank you.

Comments

  • Hi,

    Please update your signature. See http://www.zeroc.com/vbulletin/showthread.php?t=1697 for information on our support policy which describes which information should appear in your signature.

    Cheers,
    Brent
  • signature updated

    My signature is updated, I hope you have an answer for my question.

    Cheers
    Mykael
  • benoit
    benoit Rennes, France
    Hi Mikael,

    As indicated by the exception, it appears that the client can't reach the server because its network is unreachable. The best way to figure out this kind of problem is to enable network tracing to see to which IP address and port number the client is trying to connect to, try running your client with the following:
      $ ./client --Ice.Trace.Network=2
    

    Unless you modified the demo configuration files, the client is supposed to connect to the IP address associated with the hostname of the machine where you run the client (as returned by the 'hostname' command).

    If for some reasons this IP address is not reachable, you can override the default host used by Ice with for example:
      $ ./client --Ice.Default.Host=127.0.0.1
    

    Or you could also specify explicitly to which IP address to connect to by modifying the proxy in demo/Ice/minimal/Client.cpp (or in the configuration files for other demos), for example, use "hello:tcp -h 127.0.0.1 -p 10000" instead of "hello:tcp -p 1000".

    Btw, which Ice version do you use?

    Cheers,
    Benoit.
  • Network unreachable -> OK

    Thank you very much.
    I am using Ice-3.0.1.

    Cheers.
    Mykael.
  • benoit
    benoit Rennes, France
    Hi Mikael,

    I'm glad you got it work!

    Note that with the upcoming Ice 3.1, we've improved the Ice runtime to try to connect to all the local interfaces available on the machine if no host is specified in the proxy.

    Cheers,
    Benoit.
  • benoit wrote:
    Note that with the upcoming Ice 3.1, we've improved the Ice runtime to try to connect to all the local interfaces available on the machine if no host is specified in the proxy.

    Cheers,
    Benoit.

    really? that's the best news. not only for this feature, i'm waiting for C# language uses IceSSL feature.
  • matthew
    matthew NL, Canada
    That's also in 3.1 (although only for .NET 2.0).
  • matthew wrote:
    That's also in 3.1 (although only for .NET 2.0).

    3ks so much. .net2.0 is enough for us.