Home Help Center

Proxy to 127.0.0.1

Nis BaggesenNis Baggesen Member ✭✭✭
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

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    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.
  • Nis BaggesenNis Baggesen Member ✭✭✭
    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
  • michimichi Member Michi HenningOrganization: Triodia TechnologiesProject: I have a passing interest in Ice :-) ✭✭✭
    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.
Sign In or Register to comment.