ICE without DNS Server

wgwolfwgwolf Member WolfgangOrganization: Uni Erlangen - GermanyProject: .
Hi,

we have a tiny own linux distribution without any DNS Server realized. We just operate with IP addresses.
This is a problem for an ICE server as it seems to be that it wants to resolve the local hostname to its IP address.
The error message is:
DNSException: exception ::Ice::DNSException
{
error = -5
host = entity_4
}

Is there any possibility to run ICE without any DNS functionality?

Thanks!
Wolfgang

Comments

  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    Please see this thread regarding our support policy here on these forums:

    http://www.zeroc.com/vbulletin/showthread.php?t=1697
  • wgwolfwgwolf Member WolfgangOrganization: Uni Erlangen - GermanyProject: .
    Signature and profile is set.
    Thank you for your help.
    Wolfgang

    marc wrote:
    Please see this thread regarding our support policy here on these forums:

    http://www.zeroc.com/vbulletin/showthread.php?t=1697
  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    Is this with Ice for C++? Do you get the problem also if you explicitly set the -h option for your endpoint? You can also try to set Ice.Default.Host.
  • wgwolfwgwolf Member WolfgangOrganization: Uni Erlangen - GermanyProject: .
    It is Ice for Python. But the -h option doesn't seem to take any effect in the following line:
    adapter = self.communicator().createObjectAdapterWithEndpoints("Machine", "default -h Ice.Default.Host -p 10000")
    Independent of what is set up with -h, neither any hostname nor an ip address, ice only wants always to resolve the name of the local machine.

    Wolfgang

    marc wrote:
    Is this with Ice for C++? Do you get the problem also if you explicitly set the -h option for your endpoint? You can also try to set Ice.Default.Host.
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Ice.Default.Host is a configuration property (see the manual for more information). You should try to set it with the IP address of your machine and not specify the -h option in the endpoints of your object adapters (they will use the default set in Ice.Default.Host).

    For example, with the IcePy hello demo, you can use the following to make sure it will use 192.168.0.3 as the default host:

    $ python Server.py --Ice.Default.Host=192.168.0.3 --Ice.Trace.Network

    Can you try this? Also, if you have the stack trace of the exception, it would be helpful to include it, this might give some hints...

    Benoit.
  • wgwolfwgwolf Member WolfgangOrganization: Uni Erlangen - GermanyProject: .
    It works fine! Thank you!
    Another question: how can I bind the server to several ip addresses?
    with Ice.Default.Host you can just set one ip address.

    Wolfgang

    benoit wrote:
    Ice.Default.Host is a configuration property (see the manual for more information). You should try to set it with the IP address of your machine and not specify the -h option in the endpoints of your object adapters (they will use the default set in Ice.Default.Host).

    For example, with the IcePy hello demo, you can use the following to make sure it will use 192.168.0.3 as the default host:

    $ python Server.py --Ice.Default.Host=192.168.0.3 --Ice.Trace.Network

    Can you try this? Also, if you have the stack trace of the exception, it would be helpful to include it, this might give some hints...

    Benoit.
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Yes, it's not the purpose of the Ice.Default.Host property to define the endpoints of object adapters (and therefore the interfaces the object adapter will listen to). See the description of this property in the Appendix C.7 of the Ice manual for more information.

    If you use the createObjectAdapterWithEndpoints method to create the object adapter, you have to specify the object adapter endpoints directly in the code, for example:
       Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("Machine", "tcp -p 10000 -h 192.168.0.3:tcp -p 10000 -h 1.1.0.3");
    

    If you create the object adapter with the createObjectAdapter method, you can set the endpoints with configuration properties. For example, if you create the adapter with the following code:
       Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("Machine");
    

    You can set the object adapter endpoints with the Machine.Endpoints property in a configuration file, for example:
      Machine.Endpoints=tcp -p 10000 -h 192.168.0.3:tcp -p 10000 -h 1.1.0.3
    

    You can turn on the network tracing (--Ice.Trace.Network=1) to make sure your server will listen on the endpoints specified either in the code or the configuration.

    Benoit.
  • dwaynedwayne St. John's, NewfoundlandMember Dwayne BooneOrganization: ZeroC, Inc.Project: Internet Communications Engine
    Just a note that in the next release of Ice if you do not specify a -h parameter in the endpoint configuration and Ice.Default.Host is not set then Ice will listen on all local interfaces.

    Regards,
    Dwayne
Sign In or Register to comment.