OpenWrt Forum Archive

Topic: ddns-scripts don't seem to fire

The content of this topic has been archived on 4 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I'm having some trouble with my ddns-scripts in my build of OpenWRT. 

I recently cut a build from trunk (labelled as KAMIKAZE (bleeding edge, r25133)) and now my ddns-scripts don't seem to be working. 

I ran the tests in the wiki:

http://wiki.openwrt.org/doc/howto/ddns

and I see to remember that I would see an entry for "updating DDNS" when I execute the "ifup wan" command but I'm not seeing that happen.  I also see nothing when I issue the "ACTION=ifup INTERFACE=wan /sbin/hotplug-call iface" command.

How can I check if this is installed correctly?  What should I see when I execute the above commands?

Thanks for the help. 

(BTW, I'm on an WNDR3700 if that matters).

Check 'logread'.

Ok, so I updated to a recent build that I cut from trunk (bleeding edge, r25368) and I still can't seem to get the DDNS scripts to fire. 

I can see the daemon running when I do a ps:

11341 root      1460 S    /bin/sh /usr/lib/ddns/dynamic_dns_updater.sh myddns

but they never fire.  Keep in mind, this was working perfectly before I updated and I am using an identical configuration file so I'm not sure what's different.

This is what I see when I run the commands mentioned in the wiki:

. /etc/profile
ifup wan

ifup wan
udhcpc (v1.17.3) started
Sending discover...
Sending discover...
Sending select for <IP>...
Lease of <IP> obtained, lease time 7200
udhcpc: ifconfig eth1 <IP>netmask 255.255.252.0 broadcast +
udhcpc: setting default routers: <IP>
udhcpc: setting dns servers: <DNS>
0.openwrt.pool.ntp.org: Unknown host
1.openwrt.pool.ntp.org: Unknown host
2.openwrt.pool.ntp.org: Unknown host
3.openwrt.pool.ntp.org: Unknown host

I checked logread after executing the command and I don't see anything in there either.  Is anyone else having this problem?  Any ideas on what I can do to diagnose?

I'm using backfire 10.03-rc4 and I'm having exactly the same problem.
Have you already found a solution?

Nope, and I'm not sure how to diagnose. There's nothing in logread. I can see that there were a few changes to the scripts in svn but I don't see anything that would cause a problem (from what i can tell).

I've just asked the brains on the irc. And they told me this:

try `. /usr/lib/ddns/dynamic_dns_functions.sh && start_daemon_for_all_ddns_sections'

And it works!

Ok, I see the service running but when I executed the above command there was nothing output to the screen.  Should there be?  I seem to remember the script outputting that it was updating when i ran that in past builds. 

Regardless, I let it run for over 72 hours and it never did a force update.  How can I diagnose?  Anyone else seeing this in trunk?

janvos, where would you put that line exactly?

hvkls wrote:

janvos, where would you put that line exactly?

You type it in on the command line.

I'm experiencing here (ar71xx, 10.03.1-rc4, r24045) what I thought was the OP's (your smile problem: ddns-scripts doesn't seem to detect when your external IP address changes, which makes it pretty useless for me. Currently, I've resorted to a cron job that checks my WAN IP address every 5 minutes, and runs ez-ipupdate when needed, but that's pretty dumb.

confirm problem on r25443, 

~# opkg list-installed | grep ddns
ddns-scripts - 1.0.0-12
luci-app-ddns - 0.10+svn6892-1

hope problem will be fixed in near future

opkg list_installed "*ddns*"

I have the same.  Anyone else able to confirm this?  Perhaps a bug needs to be filed:

root@DRADIS:~# opkg list_installed "*ddns*"
ddns-scripts - 1.0.0-12
luci-app-ddns - 0.10+svn6841-1

You can try "yaddns" as drop-in replacement, it uses the same configuration file and is compatible to luci-app-ddns.

opkg --force-overwrite install yaddns

Ok, I filed an issue.

It's number 8875.

Jow, I'll try your workaround later this week. Thanks for the suggestion.

hmm, can't seem to install that:

root@DRADIS:~# opkg update
Downloading http://downloads.openwrt.org/backfire/10.03.1-rc4/ar71xx/packages/Packages.gz.
Inflating http://downloads.openwrt.org/backfire/10.03.1-rc4/ar71xx/packages/Packages.gz.
Updated list of available packages in /var/opkg-lists/packages.
root@DRADIS:~# opkg --force-overwrite install yaddns
Unknown package 'yaddns'.
Collected errors:
 * opkg_install_cmd: Cannot install package yaddns.
root@DRADIS:~#

ok, update my opkg to the snapshots repository and it worked.  Now, how do I start it?

Alright, I managed to get it started by looking at the hotplug.d script.  It turns out that there was an error in my cfg file.  Basically, my service name was dyndns.org where it SHOULD have been just dyndns.

I'm not sure when things changed because I've been restoring my cfg file for quite some time.  But it looks like a change must have been made.

Regardless, I have it working now.  I'll have to update the bug tomorrow.

i receive this

root@OpenWrt:~# yaddns
Segmentation fault

root@OpenWrt:~# ACTION=ifup INTERFACE=wan /sbin/hotplug-call iface
Segmentation fault
root@OpenWrt:~#

Same problem, no ddns with r26494 sad

Comitizer wrote:

Alright, I managed to get it started by looking at the hotplug.d script.  It turns out that there was an error in my cfg file.  Basically, my service name was dyndns.org where it SHOULD have been just dyndns.

I'm not sure when things changed because I've been restoring my cfg file for quite some time.  But it looks like a change must have been made.
Regardless, I have it working now.  I'll have to update the bug tomorrow.

To follow up on Comitizer's remark, I was able to fix the ddns-scripts on my (self-compiled) copy of backfire rc4 r25206 by changing this line in /etc/config/ddns:

    option 'service_name' 'dyndns.org'

to this:

    option 'service_name' 'dyndns'

I'm guessing it is luci-app-ddns which is generating the wrong config value for DynDNS.org?

http://patchwork.ozo.com/patch/368/

OR

modify the following two functions in

/usr/lib/ddns/dynamic_dns_functions.sh



verbose_echo()
{
if [ "$verbose_mode" = 1 ]
then
logger -t ddns-scripts $1
fi
}

start_daemon_for_all_ddns_sections()
{
SECTIONS=""
config_cb()
{
SECTIONS="$SECTIONS $2"
}
config_load "ddns"

for section in $SECTIONS
do
/usr/lib/ddns/dynamic_dns_updater.sh $section 1 > /dev/null 2>&1 &
done
}

Try with Backfire 10.03.1-rc5!
It works for me.

I had the same problem, I have 2 routers, my second router has openwrt and is not directly connected to the net.

In luci gui  service/dyndns
source of IP=network
network= wan

It wouldnt update at dyndns.org until i changed the config file in ect/config/ddns (i use winscp)

This is just part of my config file.

config 'service' 'myddns'
    option 'interface' 'lan'  (<-------here you need to change 'wan' to 'lan')
    option 'service_name' 'dyndns.org'
    option 'force_interval' '72'

Then i rebooted router and works every time.

The discussion might have continued from here.