What's new

Inadyn with custom config — errors every 2 minutes

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

kyphos

Occasional Visitor
I’ve recently purchased an RT-AC86, and installed Merlin v386.4.
I’m upgrading from an old RT-N66U running Shibby builds of Tomato.

I’ve encountered a speed bump with updates to my DDNS record at easyDNS (which Tomato has been doing reliably for years).
Since easyDNS isn’t one of the DDNS providers supported in the webgui, I’ve attempted to concoct a custom configuration for inadyn, using the recipe on the asuswrt-merlin wiki, here:

Following the inadyn format, I created the appropriate config file** for my easydns account and put it in /jffs.
Also added the specified ddns-start script to /jffs/scripts.

When activated, the webgui page announces “Registration successful", and inadyn appears to update the ddns record at easyDNS properly.
I verified the update with an nslookup.
Here is the startup procedure reported in syslog, (with personal information redacted):

Code:
Mar  3 09:34:27 rc_service: httpd 1774:notify_rc restart_ddns
Mar  3 09:34:27 start_ddns: update CUSTOM , wan_unit 0
Mar  3 09:34:27 start_ddns: Clear ddns cache.
Mar  3 09:34:27 custom_script: Running /jffs/scripts/ddns-start (args: 76.71.x.x)
Mar  3 09:34:27 inadyn[31241]: In-a-dyn version 2.9.1 -- Dynamic DNS update client.
Mar  3 09:34:28 inadyn[31241]: Update forced for alias x.x.com, new IP# 76.71.x.x
Mar  3 09:34:31 inadyn[31241]: Updating cache for x.x.com
Mar  3 09:34:31 ddns: Completed custom ddns update
Mar  3 09:34:39 watchdog: start ddns.
Mar  3 09:34:39 rc_service: watchdog 1784:notify_rc restart_ddns watchdog
Mar  3 09:34:39 start_ddns: update CUSTOM , wan_unit 0
Mar  3 09:34:39 start_ddns: Clear ddns cache.
Mar  3 09:34:39 custom_script: Running /jffs/scripts/ddns-start (args: 76.71.x.x)
Mar  3 09:34:39 inadyn[31290]: In-a-dyn version 2.9.1 -- Dynamic DNS update client.
Mar  3 09:34:39 inadyn[31290]: Update forced for alias x.x.com, new IP# 76.71.x.x
Mar  3 09:34:40 inadyn[31290]: Fatal error in DDNS server response:
Mar  3 09:34:40 inadyn[31290]: [200 OK] TOOSOON Increase your time between updates for x.x.com to 600 seconds or more.
Mar  3 09:34:40 inadyn[31290]: Error response from DDNS server, ignoring ...

However, the syslog reveals that inadyn then attempts to update the ddns record every two minutes, endlessly.
The easyDNS ddns server responds with error messages advising that the inadyn client is attempting to update the ddns record too soon.

Code:
Mar  3 09:36:42 inadyn[31290]: Update forced for alias x.x.com, new IP# 76.71.x.x
Mar  3 09:36:42 inadyn[31290]: Fatal error in DDNS server response:
Mar  3 09:36:42 inadyn[31290]: [200 OK] TOOSOON Increase your time between updates for x.x.com to 600 seconds or more.
Mar  3 09:36:42 inadyn[31290]: Error response from DDNS server, ignoring ...

The above sequence of 4 error messages is logged every two minutes. Apparently, there’s something in the inadyn setup (or perhaps a cron job?) that is triggering the update process to run every two minutes, regardless of whether my IP has changed or not. I’ve asked Ms. Google but have been unable to figure out how to back off the repetitive updates. It’s my understanding from past experience with ddns (on Tomato firmware) that updates should only be submitted when the public IP changes. Or perhaps every 20 days or so. But certainly not every 120 seconds.

My ISP provides my public IP over PPPoE. Testing for proper operation of the ddns update process is difficult, as there’s no easy way to force a change of the public IP. (Disconnecting then reconnecting the PPPoE session usually results in the same IP address getting assigned).

For the time being, I have disabled DDNS updating on the router, as I suspect easyDNS may blacklist my account if I continue to hammer it with updates every two minutes.
Any ideas how to change the retry interval?

Thanks.
——————

** While troubleshooting, I observed an error in the DDNS recipe provided in the asuswrt-merlin Wiki. It states:
If you wish to use your local WAN IP instead of relying on the DDNS service's remote check method, you can insert the following line within your custom or provider block:
checkip-command = "/usr/sbin/nvram get wan0_ipaddr"

The /usr/sbin path to the nvram command is incorrect. In v364.4, I found the nvram command is stored in /bin. I corrected my inadyn.conf file accordingly, but it made no difference.
 
Might have been easier (no pun intended) if you had instead configured the router to update dnsomatic.com, and dnsomatic.com to update easyDNS. Most ppl are just going to find that easier than dealing w/ user scripts.
 
It's retrying because the previous attempt failed.
 
It's retrying because the previous attempt failed.
Thanks for the quick reply!

I'm not sure that's the explanation. The first update attempt (sent immediately after I enabled DDNS via the webgui at 09:34:28) was successful. Inadyn sent the update to the easyDNS server, and my ddns record there was updated correctly. I confirmed that by examining the record that was captured at easyDNS, and also with an nslookup. But then at 09:34:39 , inadyn was initated a second time, and it sent another update. In response, easyDNS returned a message telling the inadyn client not to send updates so quickly.

Note that the return code sent back from easyDNS at 09:34:40 was a [200 OK], not an error code. Regardless, inadyn seems to have interpreted the [200 OK] as an error, backed off for 2 minutes, and then tried again. And again...
Seems to me that handling the [200 OK] as an error is a flaw in inadyn logic. Likewise, sending the second update (at 09:34:39) when the first update was successful also seems to be another glitch.
 
Might have been easier (no pun intended) if you had instead configured the router to update dnsomatic.com, and dnsomatic.com to update easyDNS.
@eibgard
Thanks for the suggestion.
I took a look at dnsomatic, but found that I'd need to divulge my easyDNS account credentials to dnsomatic/Cisco. That's not going to happen (not that I don't trust Cisco...).

If I can't figure out the custom ddns setup on asuswrt-merlin, I might set up an account at one of the ddns providers supported by the webgui, let the router update the dns record there, and then define a CNAME record at easyDNS to link the two.
 
Last edited:
For others that might come across this thread while puzzling over custom inadyn configurations, I've made a little progress figuring out what's going on. I made a few changes to my inadyn.config file, and enabled ddns on the webgui.
The syslog shows this:
Code:
Mar  3 21:35:05 start_ddns: update CUSTOM , wan_unit 0
Mar  3 21:35:05 start_ddns: Clear ddns cache.
Mar  3 21:35:05 custom_script: Running /jffs/scripts/ddns-start (args: 174.88.x.x)
Mar  3 21:35:05 inadyn[24742]: In-a-dyn version 2.9.1 -- Dynamic DNS update client.
Mar  3 21:35:06 inadyn[24742]: Update forced for alias x.x.com, new IP# 174.88.x.x
Mar  3 21:35:06 inadyn[24742]: Fatal error in DDNS server response:
Mar  3 21:35:06 inadyn[24742]: [200 OK] NOERROR no update required for x.x.com to 174.88.x.x
Mar  3 21:35:06 inadyn[24742]: Error response from DDNS server, ignoring ...

After launching, inadyn sends an IP update off to the easyDNS ddns server.
easyDNS server replies "[200 OK] NOERROR..."
Yet inadyn treats this as a fatal error.

Two minutes later, it tries again (incorrectly thinking there was an error with the previous transaction).
easyDNS then replies "[200 OK] TOOSOON..."
Inadyn treats that as an error as well, and backs off for another two minutes.
It continues to retry every two minutes.

My guess is that inadyn is incorrectly parsing the response string that is sent back from the easyDNS server. Perhaps it doesn't like the [ ] surrounding the 200 OK return code. Or is unhappy about the text string describing the status. In any event, not much I can do to fix it.
 
Inadyn upstream issue:

@dave14305
Thanks for responding, and the link to the github page. Based on the discussion there, it looks like a fix to better handle the return codes from easyDNS will be in the next release of inadyn (2.9.2). No doubt, it will then get picked up by Merlin.

A patched version of the inadyn plug-in for easyDNS is already committed on github, and found here:
 
Can you add
Code:
ddns-response = { "no update required" }
to your custom config?
I'll try that.
Do you have a reference that describes all the config options for inadyn 2.9.1 (the version that's in the merlin firmware)?
I looked around on the inadyn github pages and didn't find any info. But I'm a neophyte when it comes to github.
Thanks.
 
I'll try that.
Do you have a reference that describes all the config options for inadyn 2.9.1 (the version that's in the merlin firmware)?
I looked around on the inadyn github pages and didn't find any info. But I'm a neophyte when it comes to github.
Thanks.
I’ve never used it but there are examples in the readme In Merlin’s github.

 
** While troubleshooting, I observed an error in the DDNS recipe provided in the asuswrt-merlin Wiki. It states:

The /usr/sbin path to the nvram command is incorrect. In v364.4, I found the nvram command is stored in /bin. I corrected my inadyn.conf file accordingly, but it made no difference.

Clarification re the DDNS recipe published in the asus-merlin Wiki:
In v386.3.2, nvram is located at /usr/sbin, as per the Wiki.

Things seem to have moved around after v386.3. Be cautious when creating a inadyn.conf file.
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top