Skip to content

DNS server lookup problem #148

@sbhunia

Description

@sbhunia

I am trying to use GNS server to serve DNS queries. In the GNS configuration file, I specified "DNS_SERVER_NODES=all". Thus, all the servers will also serve as DNS server on port 53. I found two bugs in the source code that is preventing the service. Please have a look at these:

  • In the "GNSApp.java", inside the startDNS() function, for the last else condition, line no. 909, the udpDnsServer is called with a static IP address of "0.0.0.0". Although it may work on some environment, on some occasions, it fails to start a server in this address (I am using Ubuntu 16.04 and it fails). As a solution, I changed the parameter with "this.nodeAddress.getAddress()" and the solution is working fine.

  • In file LookupTask.java, for the case GNSGLOBAL, it calls a function with parameters: NameResolution.lookupGnsServer(null, query, handler);. Now, if we look at the code for lookupGNSServer, we can see that the 'null' parameter creates throws an exception when trying to call 'lookupGuidField(addr.getHostAddress().toString(), query.getHeader().getID(), domain name, null, fields, handler)'. I believe this function is defined for the case when the server is only serving as DNS server and it gets the GNS server address as the parameter. When calling this function, we need to specify a valid IP address. As a quick solution, I am using a local address for the GNS case and it seems to work. I feel the generalized setup should be corrected by someone with knowledge of the codebase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions