Home Help Center

IPv6 localhost endpoints

SamboNBSamboNB Member Jo SimonsOrganization: SpeakUpProject: Monitoring applications with IceBox
L.S.,

Of the two lines , the upper one works, the next not. I seem not to be able to figure out what the problem is. This is in C++. Someone? (I'm not using them together)

adapter_ = communicator->createObjectAdapterWithEndpoints("","tcp -h 127.0.0.1 -p 10000");

adapter_ = communicator->createObjectAdapterWithEndpoints("","tcp -h ::1 -p 10000");

Many thanks in advance

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    You need to enclose the IPv6 address ::1 within quotes in the endpoint:
    adapter_ = communicator->createObjectAdapterWithEndpoints("","tcp -h \"::1\" -p 10000");
    

    If this isn't the problem, please copy/paste the exception or error messages that you get when calling this method.

    Cheers,
    Benoit.
  • SamboNBSamboNB Member Jo SimonsOrganization: SpeakUpProject: Monitoring applications with IceBox
    benoit wrote: »
    Hi,

    You need to enclose the IPv6 address ::1 within quotes in the endpoint:
    adapter_ = communicator->createObjectAdapterWithEndpoints("","tcp -h \"::1\" -p 10000");
    

    If this isn't the problem, please copy/paste the exception or error messages that you get when calling this method.

    Cheers,
    Benoit.

    Hi Benoit,

    The strangest thing happened. I put in the quotes and got another error.
    Then I copied the line from your post and inserted it(looked the same as mine) and it worked.
    Guess that you must use the right quotes.
    Thanks for your help, tomorrow I will look into the quotes thing for now I stop because its 23:00 here.

    Regards
    SamboNB
  • SamboNBSamboNB Member Jo SimonsOrganization: SpeakUpProject: Monitoring applications with IceBox
    benoit wrote: »
    Hi,

    You need to enclose the IPv6 address ::1 within quotes in the endpoint:
    adapter_ = communicator->createObjectAdapterWithEndpoints("","tcp -h \"::1\" -p 10000");
    

    If this isn't the problem, please copy/paste the exception or error messages that you get when calling this method.

    Cheers,
    Benoit.

    Any idea how it should work in combination of a config file.
    Client.Proxy=Server:tcp -h ::1 -p 10000
    nor
    Client.Proxy=Server:tcp -h \"::1\" -p 10000
    works here

    Regards
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    You need to escape the quotes in C++ or your code won't compile. You don't need however to escape the quotes in Ice configuration files, so you can just use:
    Client.Proxy=Server:tcp -h "::1" -p 10000
    

    Cheers,
    Benoit.
  • SamboNBSamboNB Member Jo SimonsOrganization: SpeakUpProject: Monitoring applications with IceBox
    benoit wrote: »
    Hi,

    You need to escape the quotes in C++ or your code won't compile. You don't need however to escape the quotes in Ice configuration files, so you can just use:
    Client.Proxy=Server:tcp -h "::1" -p 10000
    

    Cheers,
    Benoit.

    Ok, I'm getting somewhere.
    Last obstacle: DNS error: Address family for hostname not supported host: ::1

    Some setting but where?

    Regards
    SamboNB
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    Did you set Ice.IPv6=1 to enable IPv6 support? The proxy and endpoint syntax is described here in the Ice manual.

    If you still get an exception after enabling IPv6 support, please copy/paste the full exception message.

    Cheers,
    Benoit.
  • SamboNBSamboNB Member Jo SimonsOrganization: SpeakUpProject: Monitoring applications with IceBox
    Thanks

    Thanks it works, I just didn't know were to put the Ice.Ipv6=1

    Regards

    SamboNB
Sign In or Register to comment.