Archived

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

Proxy to 127.0.0.1

It seems that if I create a proxy with a default endpoint such as

TestObject.Endpoint=default -p 10000

Then the proxy I get for this object points to 127.0.0.1:10000 - that is the local host. So when I give this proxy to a remote machine, it naturally can't find the requested service. This only seems to happen when such a proxy is created on our (Redhat) Linux machines. Similar proxies created on our windows machines seem to work just fine.

Naturally I can work around the problem by explicitly specifying a host for the endpoint, but that makes it a bit problematic to move the server between machines.

Comments

  • benoit
    benoit Rennes, France
    By default, it your endpoint doesn't specify the hostname and if Ice.Default.Host isn't specified, Ice will use the IP address of the default host name configured for your host (the one returned by the gethostname() system call).

    Can you check the value returned by the "hostname" command on your Linux machine? I suspect it's "localhost".

    Benoit.
  • Right you are. I must admit I'm not that wise in the ways of linux, so I was just a bit puzzled. Thanks for clearing that up

    mvh

    Nis
  • BTW, if you get "localhost" back from hostname, your DNS is misconfigured. gethostbyname() should return the real host name, not "localhost". Check /etc/hosts and your DNS config for incorrect entries.

    Cheers,

    Michi.