Jump to content

WHOIS lookup Error: 101 on new TLDs


Isaac Asher

Recommended Posts

When using the domain availability checker built in to WHMCS, I'm getting some strange results. If I search for a domain I know to be available with a .com or .net TLD, it says that it IS available for purchase.   If I search for the same domain with any of the newer TLDs such as .rocks, .attorney, .cars, etc, the WHMCS WHOIS lookup log entry shows "Error: 101 - Network is unreachable" and "There was a problem connecting to the domain registry. Please check port 43 is open in your servers firewall."  

I checked with my hosting company and confirmed port 43 IS INDEED open on my server.  

Any other suggestions? I wouldn't think it could actually be a port issue since the search goes through on the more traditional TLDs.  

Link to comment
Share on other sites

i'd agree with @redit on this - entries for those TLDs will be missing from (or wrong in) the default dist.whois.json file.... rocks & attorney are wrong (even in the latest v7.6RC file) and .cars is missing entirely.... if memory serves, rocks & attorney were both Rightside TLDs, but they got bought by Donuts... so in a custom whois.json file, you would use socket://whois.donuts.co for both instead.

the two golden rules to follow when adding a TLD to domain pricing are:

  1. if using a lookup provider, ensure that it offers that TLD for sale - otherwise any search will likely fail.
  2. if using standard_whois, ensure that there is a relevant entry in dist.whois.json - if there isn't, add it to a custom whois.json file by following the documentation link that @redit gave above.
Link to comment
Share on other sites

Thanks so much to everyone who chimed in.  From the answers, it seems I need to clarify my question. 

@WHMCS ChrisD I am using out of the box WHMCS functionality.  I have tried both the eNom lookup provider as well as the standard WHOIS and got the same results. 

@redit and @brian! I have not checked any JSON files or anything.... I am not crafting my own domain lookup tool, but was hoping to use the functionality provided.  Trying to keep my processes as simple as possible. Also, I have already confirmed that eNom does indeed have these new TLDs (and specific domains) for sale as the domain lookup on their site says that the domain IS available, but the lookup on my site says that it's not.  I am not familiar with "dist.whois.json", what that is, where to find it, or how I would edit it.  That piece is above my current technical knowledge.... I'm still just getting started in the web hosting industry although I've been a tech nerd for years. 

Hope that helps

Thanks again for everyone's help

 

Link to comment
Share on other sites

@Isaac Asher checking and or adding to the whois.json file is not making your own WHOIS lookup it is simply informing WHMCS WHOIS where it should look when doing the check for the domain TLDs.

For example the TLD '.blog' is not in the dist.whois.json file and if you try looking up a domain with this extension it will not know how to handle the reply (it it gets one).

By adding the extension to the 'whois.json' file with the server and reply details you are then allowing WHMCS to display the correct details to your customers.

I do offer the .blog TLD and I have had to add the following code block into my 'whois.json' file:

[
        {
                "extensions" : ".blog",
                "uri" : "socket://whois.nic.blog",
                "available" : "This domain name has not been registered."
        }
]

These details can be found by using the IANA link I gave in my reply before but you will then need to find out what text is returned when a domain is available. Just remember that this can be just a section of what is returned as it will do part matching of the returned string just make sure that what you enter is not going to be matched to a domain the is already registered.

The file you are looking to add these details in should be located in [WHMCS folder]/resources/domains/

Link to comment
Share on other sites

Hi Issac,

11 hours ago, Isaac Asher said:

I am not crafting my own domain lookup tool, but was hoping to use the functionality provided.  Trying to keep my processes as simple as possible.

the problem is, if you're using Standard Whois, you'll have to keep it updated yourself... WHMCS will update these files with each release, but if a whois server changes an hour after that release, it's going to be weeks/months before WHMCS release another update.

11 hours ago, Isaac Asher said:

Also, I have already confirmed that eNom does indeed have these new TLDs (and specific domains) for sale as the domain lookup on their site says that the domain IS available, but the lookup on my site says that it's not.

well that's only an issue if you're using eNom as a lookup provider and Chris' answer is helpful in that circumstance... if using eNom and standard whois, the json files are the key - regardless if eNom sell a TLD or not, if it's not in the file, you're going nowhere!

11 hours ago, Isaac Asher said:

I am not familiar with "dist.whois.json", what that is, where to find it, or how I would edit it. 

details about it are provided in the link above by @redit

Quote
  • The WHOIS Server definitions shipped with WHMCS by default can be found in /resources/domains/dist.whois.json. This file should not be edited.
  • To add or edit whois server definitions, begin by creating a custom whois.json file located at /resources/domains/whois.json
  • Inside it, define the whois servers you wish to use.
  • Below is a sample custom whois.json file defining the whois servers for .rocks, .attorney and .cars
[
    {
        "extensions": ".attorney,.rocks",
        "uri": "socket://whois.donuts.co",
        "available": "Domain not found"
    },
    {
        "extensions": ".cars",
        "uri": "socket://whois.nic.cars",
        "available": "is available for registration"
    }
]

 

Link to comment
Share on other sites

Thanks to everyone again!  I feel like I'm making progress on this issue, and I'm very appreciative. 

I read up on the WHMCS docs about editing the dist.whois.json file.  Accordingly, I added the following entry:

    {
        "extensions": ".rocks",
        "uri": "socket://whois.nic.rocks",
        "available": "Domain not found."
    }

I tried this because:   https://www.iana.org/domains/root/db/rocks.html shows the WHOIS server as "whois.nic.rocks".  After making this update, I went back to my page and tried a few domain searches.  The desired one did not show as available, and the WHOIS lookup log again was hollering about port 43.  Again, I was able to look up a domain name I know to be available, and my site once again showed it as available.  I tried using the desired domain with .info TLD and it showed unavailable... but when I looked in the whois lookup log, it showed "This domain is already registered" and provided the whois info.  

 

So this means.....

After adding the entry to the JSON file, I can get an "available" response accurately, I can get an "already registered" response accurately, but I can't get any response from .rocks.   In light of the above responses, I would like to leave the domain checker on eNom instead of the standard whois so I know I will be getting responses from my domain provider. Any other ideas?

 

Thanks much. 

 

 

Link to comment
Share on other sites

11 hours ago, Isaac Asher said:

{ "extensions": ".rocks", "uri": "socket://whois.donuts.co", "available": "Domain not found." }

I think the problem here is that you have put the '.' at the end of your available statement.

Try removing that and all should be good if you try again.

 

Link to comment
Share on other sites

13 hours ago, Isaac Asher said:

I read up on the WHMCS docs about editing the dist.whois.json file.

I trust you mean about NOT editing the dist.whois.json file - you do not edit that file because it will be overwritten during a WHMCS update and you would lose all your custom entries... please tell me you haven't been editing that file!

13 hours ago, Isaac Asher said:

I tried this because:   https://www.iana.org/domains/root/db/rocks.html shows the WHOIS server as "whois.nic.rocks".

I had hoped you might have realised that the above whois.json content was custom written for you and not taken from the docs - you literally just needed to copy and paste the above code into a whois.json file and it would work.

whois.nic.rocks is the correct whois server for .rocks, but it basically just redirects to whois.donuts.co (because it's a Donuts TLD) and so what the whois.json file usually does is to consolidate them into just one long entry when possible... otherwise, seeing as Donuts have 200+ TLDs, you'd have to have 200+ separate entries all using individual whois servers (nic.rocks, nic.attorney etc) and that would make the file huge.

13 hours ago, Isaac Asher said:

I would like to leave the domain checker on eNom instead of the standard whois so I know I will be getting responses from my domain provider. Any other ideas?

one other thing to add is that there are whois lookup limits with Donuts, and some other, TLDs - so if you lookup too many domains too quickly, or too many over a set period of time (which you can easily do when testing), then your server IP will be temporary (possibly eventually permanently) blocked from making more whois searches for that TLD and WHMCS may start to misinterpret the whois responses.... if you're using eNom as a lookup provider, then those lookup limits shouldn't apply... though unlike using standard whois, you're effectively only able to offer the TLDs to your customers that eNom sell.

2 hours ago, redit said:

I think the problem here is that you have put the '.' at the end of your available statement. 

Try removing that and all should be good if you try again.

it should work with or without the . - though as a rule, I generally leave out closing punctuation in availability strings (unless necessary) just to avoid issues in the future if Donuts ever remove them.... because if you haven't added the . to the whois.json file, it makes no difference if Donuts remove it from the response in the future... but as I said previously, you literally just had to copy & paste the code into whois.json  🙄

Link to comment
Share on other sites

I only mentioned the '.' as after checking my whois.json config nothing has a '.' in the available check as I think the domain checker function would need to do some form of regex matching.

This would then mean that any special characters would need to be escaped (I'm only guessing but that would be the way I would have done it if I wrote the function script).

 

Link to comment
Share on other sites

48 minutes ago, redit said:

I only mentioned the '.' as after checking my whois.json config nothing has a '.' in the available check

no criticism was meant - just that in this case, either would work.

48 minutes ago, redit said:

as I think the domain checker function would need to do some form of regex matching. 

ideally, you're just trying to find a unique, and shortest, availability string you can - in some circumstances, that's going to include hyphens/tabs at the start, and maybe colons, full-stops(periods) etc at the end...

as an example, the default entry for .buzz in the v7.6RC file contains a colon...

    {
        "extensions": ".buzz",
        "uri": "socket://whois.nic.buzz",
        "available": "Not found:"
    },

if the above entry was accurate, removing the end colon shouldn't make any difference... however, the availability string is now wrong anyway and should be...

    {
        "extensions": ".buzz",
        "uri": "socket://whois.nic.buzz",
        "available": "No Data Found"
    },
48 minutes ago, redit said:

This would then mean that any special characters would need to be escaped (I'm only guessing but that would be the way I would have done it if I wrote the function script).

it's extraordinarily rare that you'd get special characters in a response - tabs can be a pain to detect, but other than that, what you see is what you use.

Link to comment
Share on other sites

12 hours ago, redit said:

Try removing that and all should be good if you try again.

Same results. 

 

11 hours ago, brian! said:

I trust you mean about NOT editing the dist.whois.json file

On 7/26/2018 at 5:10 AM, redit said:

The file you are looking to add these details in should be located in [WHMCS folder]/resources/domains/

I have exactly three files in whmcs/resources/domains.  They are:

dist.additionalfields.php

dist.whois.json (which apparently I am NOT supposed to edit)

index.php

 

 

So which file should I be editing??

 

Link to comment
Share on other sites

12 hours ago, Isaac Asher said:

So which file should I be editing??

none of them! naughty.gif

you just need to create a new file, whois.json, in that same directory and paste the above code into it... and add any other whois server changes you need to make to it.

and if you have been editing dist.whois.json, then i'd suggest replacing it with the default file from the full download .zip of your installed WHMCS version - because you may have corrupted the entries that are in there with your changes.

Link to comment
Share on other sites

5 hours ago, brian! said:

and if you have been editing dist.whois.json....

I only inserted 1 entry which has now been removed.

 

Seems we're halfway there. 

5 hours ago, brian! said:

you just need to create a new file, whois.json, in that same directory and paste the above code into it

Done.  Now when I use the WHOIS Lookup tool in the Utilities menu, it tells me the .rocks domain is available.  When I go to the public facing homepage of my site and use the domain lookup tool, it says the same .rocks name is already taken.  I can see it's available, but it's still not available for my customer to purchase. 

Link to comment
Share on other sites

17 hours ago, Isaac Asher said:

Now when I use the WHOIS Lookup tool in the Utilities menu, it tells me the .rocks domain is available.  When I go to the public facing homepage of my site and use the domain lookup tool, it says the same .rocks name is already taken.  I can see it's available, but it's still not available for my customer to purchase. 

are you still using eNom as a lookup provider in Domain Pricing - or have you switched it back to Standard Whois ?

the admin whois lookup will use the whois file, whereas the client orderform will use whichever method you've set in Domain Pricing.

Link to comment
Share on other sites

21 hours ago, Isaac Asher said:

It's still set to eNom as the lookup provider. 

Can you go into Utilities > Logs > Module Debug Log

Enable this log

Go back into your front end

Check for a .rocks domain

Check the module debug log for the request and response especially errors in the response

Link to comment
Share on other sites

38 minutes ago, WHMCS ChrisD said:

Could you paste the full request and response in here for review please?

Maybe I'm not looking in the right place, but there's literally nothing to copy or paste. It simply says "No records found" in the log. It's like it didn't even see that I made the request on the front end. 

I tested this using another domain that I know to be available with a .net TLD and still no records in the system module debug log. Am I looking in the right place?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated