IceE on Blackfin: DNSException in Ice::initialize

aronnaxaronnax Member Leo SingerOrganization: University of MarylandProject: Autonomous underwater vehicle AI
I am trying to deploy an IceE application on a Blackfin, a DSP/microcontroller made by Analog Devices. I have had little trouble building IceE and building my application for the target platform, but when I run the application on the target platform I get the following error message when I call Ice::initialize:
Network.cpp:770: Ice::DNSException:
DNS error: Servname not supported for ai_socktype

Any ideas?

Comments

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

    It looks like your platform has limited support for the getaddrinfo system call (see also comment #14 on this thread).

    Can you try replacing line 748 in cppe/src/IceE/Network.cpp:
                rs = getaddrinfo(0, "1", &hints, &info); // Get the address of the loopback interface
    

    with:
                rs = getaddrinfo(0, 0, &hints, &info); // Get the address of the loopback interface
    

    Then, re-compile Ice-E and try again to see if the problem is fixed.

    Cheers,
    Benoit.
  • aronnaxaronnax Member Leo SingerOrganization: University of MarylandProject: Autonomous underwater vehicle AI
    benoit wrote: »
    Hi,

    Can you try replacing line 748 in cppe/src/IceE/Network.cpp:
                rs = getaddrinfo(0, "1", &hints, &info); // Get the address of the loopback interface
    

    with:
                rs = getaddrinfo(0, 0, &hints, &info); // Get the address of the loopback interface
    

    With the suggested change, I am now getting the following error message:
    Network.cpp:770: Ice::DNSException:
    DNS error: Name or service not known
    
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Ok, could you try the following options then?
     rs = getaddrinfo(0, "", &hints, &info); // Get the address of the loopback interface
    

    Or
     rs = getaddrinfo(0, "tcpmux", &hints, &info); // Get the address of the loopback interface
    

    Let me know which one works or not.

    Cheers,
    Benoit.
  • aronnaxaronnax Member Leo SingerOrganization: University of MarylandProject: Autonomous underwater vehicle AI
    I have not yet tried those two suggestions, but I tried something else that seems to work. In Network.cpp, on line 702, there is a snippet of code that looks like this:
    #ifdef GUMSTIX                                                                 
        //                                                                           
        // Gumstix does not support calling getaddrinfo with empty host.             
        //                                                                           
        if(host.empty())
        {
            addr.sin_family = AF_INET;
            addr.sin_port = htons(port);
            if(server)
            {
                addr.sin_addr.s_addr = htonl(INADDR_ANY);
            }
            else
            {
                addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
            }
            result.push_back(addr);
            return result;
        }
    #endif                                                                         
    

    I removed the #ifdef and #endif to turn on compilation of this code, and now IceE seems to be working. I am about to test your suggestion.
  • aronnaxaronnax Member Leo SingerOrganization: University of MarylandProject: Autonomous underwater vehicle AI
    benoit wrote: »
     rs = getaddrinfo(0, "tcpmux", &hints, &info); // Get the address of the loopback interface
    

    I tried that already because I had seen that in reference to Red Hat. That didn't work.
  • aronnaxaronnax Member Leo SingerOrganization: University of MarylandProject: Autonomous underwater vehicle AI
    benoit wrote: »
    Ok, could you try the following options then?
     rs = getaddrinfo(0, "", &hints, &info); // Get the address of the loopback interface
    

    That one works! Awesome!
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Ok, thanks. We'll look into fixing this for the next release!

    Cheers,
    Benoit.
Sign In or Register to comment.