DNS referral / delegation: which DNS is responsible; How to delegate the right way?

77

Firstly, may I congratulate you on what I think is a well-written, clear, and well-researched question, and for not redacting the domain name; that last is hugely helpful in answering.

Let me address the substantive issue, if I may: the whois points to a different set of nameservers than those which you have set up to be authoritative:

[me@risby ~]$ whois earechnung.at
[Querying whois.nic.at]
[...]
domain:         earechnung.at
registrant:     MAT8777331-NICAT
admin-c:        AT8777330-NICAT
tech-c:         MH536567-NICAT
nserver:        ns1.your-server.de
nserver:        ns3.second-ns.de
nserver:        ns.second-ns.com
changed:        20121004 15:29:23
source:         AT-DOM

Note the three listed servers. I freely concede that you have those servers set up to serve NS records that point the query elsewhere - but you also have them set up with data to respond to the authoritative request, and their server believes itself to be authoritative for the zone and can therefore lawfully return authoritative negative responses for RRs it doesn't know about. The right thing to do in this case is go back to the registrar, which I think is Hetzner in this case, and change the nameserver records not in their DNS server, but in their registration server - the device that populates the whois for .at. - to return your two new servers ns5.kasserver.com. and ns6.kasserver.com.

The business of serving a set of NS records to delegate a subzone works perfectly when it's used to do that: delegate a subzone of the one which was followed to the current set of nameservers. Using them more like an HTTP 301 redirect is unusual, and - as you have found - may not work perfectly.

As to best practice, it's completely normal to use one provider for registration and another for DNS provision. That said, the two tasks are often so closely welded that some registrars can't cope with having a registered zone on any DNS servers but their own. If Hetzner is one such, you will need to move the domain registration to a different registrar.

Share:
77

Related videos on Youtube

NoneTaken
Author by

NoneTaken

Updated on September 18, 2022

Comments

  • NoneTaken
    NoneTaken almost 2 years

    Method:

        public Auction getAuction(UUID id) {
            System.out.println("count: " + auctions.size());
            if (!doesAuctionExist(id))
                return null;
            UUID owner = UUID.fromString(Main.getAuctionsFile().getConfiguration().getString("auctions."+id.toString()+".owner"));
            Bukkit.getPlayer("NoneTaken").sendMessage("owner "+owner);
            long price = Main.getAuctionsFile().getConfiguration().getLong("auctions." + id.toString() + ".price");
            boolean useTokens = Main.getAuctionsFile().getConfiguration().getBoolean("auctions." + id.toString() + ".useTokens");
            long timeCreated = Main.getAuctionsFile().getConfiguration().getLong("auctions." + id.toString() + ".timeCreated");
            ItemStack item = (ItemStack) Main.getAuctionsFile().getConfiguration().get("auctions." + id.toString() + ".item");
            Bukkit.getPlayer("NoneTaken").sendMessage("null: " + (owner == null));
            return new Auction(
                    owner,
                    item,
                    price,
                    useTokens,
                    id,
                    timeCreated);
        }
    

    Constructor:

        public Auction(UUID owner, ItemStack item, long price, boolean useTokens, UUID identifier, long timeCreated) {
            this.owner = owner;
            this.item = item;
            this.price = price;
            this.useTokens = useTokens;
            this.identifier = identifier;
            this.timeCreated = timeCreated;
            Main.getAuctionManager().registerAuction(this);
        }
    

    Error:

    18.10 17:12:12 [Server] ERROR Error occurred while enabling BanditAH v1.0 (Is it up to date?)
    18.10 17:12:12 [Server] INFO java.lang.NullPointerException
    18.10 17:12:12 [Server] INFO at me.nonetaken.banditah.managers.Auction.<init>(Auction.java:28) ~[?:?]
    18.10 17:12:12 [Server] INFO at me.nonetaken.banditah.managers.AuctionManager.getAuction(AuctionManager.java:86) ~[?:?]
    18.10 17:12:12 [Server] INFO at me.nonetaken.banditah.managers.AuctionManager.<init>(AuctionManager.java:28) ~[?:?]
    

    Line 86 in AuctionManager.java is the owner, line in the constructor in the first block of code. The message sending "null: true/false" always returns false, thus the object can't be null but an NPE is being thrown in the error on that line.

    Any help is appreciated :)

    • Abion47
      Abion47 over 4 years
      What is line 28 in Auction.java?
    • Bohemian
      Bohemian over 4 years
      The last line of your Auction constructor is a code smell because you are letting this escape - see this question for an explanation. Fixing that may fix your problem. I don't think it's possible for the code posted to generate the error. Is it possible the code you are executing is not the source you have posted? Try a complete rebuild of your code.
    • Andrew Koster
      Andrew Koster over 4 years
      Can't really follow your stack trace when we don't have the line numbers. You didn't post the whole file, so we can't even count.
    • Erwin Bolwidt
      Erwin Bolwidt over 4 years
      Main.getAictionManager() returned null; that's the only option.
    • Andreas
      Andreas over 4 years
      You have a recursive dependency, i.e. the AuctionManager constructor calls the Auction constructor, which in turn calls Main.getAuctionManager(), but since the AuctionManager constructor hasn't returned yet, there is no manager registered with Main, so getAuctionManager() returns null. Fix your dependencies.
  • Andrew B
    Andrew B over 10 years
    To add further clarity: the NS records at the top of the zone cannot be used for delegation. Not should not, cannot. By design, DNS does not allow you to perform a blanket re-delegation. You can delegate subtrees of what has been delegated to you, but can't just say "nope, go to these other servers for everything". (stub zone black magic aside)
  • Andreas
    Andreas over 4 years
    If registerAuction() threw the NPE, then it would be in the stacktrace. Since it is not, that cannot be the case.
  • NoneTaken
    NoneTaken over 4 years