Installing ddns-scripts: Parse error (invalid command)?

Hi,

installing ddns-scripts (and ddns-scripts_no-ip_com) get the following error:

root@LEDE:~# opkg install --noaction ddns-scripts ddns-scripts_no-ip_com
Installing ddns-scripts (2.7.6-13) to root...
Downloading http://downloads.lede-project.org/releases/17.01.4/packages/mips_24kc/packages/ddns-scripts_2.7.6-13_all.ipk
Installing ddns-scripts_no-ip_com (2.7.6-13) to root...
Downloading http://downloads.lede-project.org/releases/17.01.4/packages/mips_24kc/packages/ddns-scripts_no-ip_com_2.7.6-13_all.ipk
Installing ddns-scripts (2.7.6-13) to root...

root@LEDE:~# opkg install ddns-scripts ddns-scripts_no-ip_com
Installing ddns-scripts (2.7.6-13) to root...
Downloading http://downloads.lede-project.org/releases/17.01.4/packages/mips_24kc/packages/ddns-scripts_2.7.6-13_all.ipk
Installing ddns-scripts_no-ip_com (2.7.6-13) to root...
Downloading http://downloads.lede-project.org/releases/17.01.4/packages/mips_24kc/packages/ddns-scripts_no-ip_com_2.7.6-13_all.ipk
Configuring ddns-scripts.
uci: Parse error (invalid command) at line 37, byte 0
Configuring ddns-scripts_no-ip_com.
 223025  WARN : Service section disabled! - TERMINATE
 223025  WARN : Service section disabled! - TERMINATE
uci: Parse error (invalid command) at line 37, byte 0

Any ideas how to fix this? [SOLVED] "uci: Parse error" package installing seems to be a different problem.

Thx!

Edit: Sry, my OpenWRT/LEDE version is Reboot (17.01.4, r3560-79f57e422d).

I tried again to install the packages one by one. This time the configuration error is reported for ddny-scripts (not like in my last post for Configuring ddns-scripts_no-ip_com.):

root@LEDE:~# opkg install ddns-scripts
Installing ddns-scripts (2.7.6-13) to root...
Downloading http://downloads.lede-project.org/releases/17.01.4/packages/mips_24kc/packages/ddns-scripts_2.7.6-13_all.ipk
Configuring ddns-scripts.
uci: Parse error (invalid command) at line 37, byte 0
 131435  WARN : Service section disabled! - TERMINATE
 131435  WARN : Service section disabled! - TERMINATE

Anyone? :confused:

Edit: noticed, that luci-app-ddns seems to have some problem as well:

Installing luci-app-ddns (2.4.8-3) to root...
 153547  WARN : Service section disabled! - TERMINATE
 153547  WARN : Service section disabled! - TERMINATE
Downloading http://downloads.lede-project.org/releases/17.01.4/packages/mips_24kc/luci/luci-app-ddns_2.4.8-3_all.ipk
Installing ddns-scripts (2.7.6-13) to root...
Downloading http://downloads.lede-project.org/releases/17.01.4/packages/mips_24kc/packages/ddns-scripts_2.7.6-13_all.ipk
Configuring ddns-scripts.
Configuring luci-app-ddns.

I don't think this is really a 'problem' per se. The parse error provides the detail that the service section is disabled and that it is terminating the process. This is probably because the scripts install along with a default (disabled) configuration. You need to go in and edit the config file to have a valid and enabled account. You can do this via text editors or UCI, or via LuCI with luci-app-ddns (services > dynamic dns).

Thx @psherman but when I want to provide the settings for a no-ip.com account LuCI says:

/usr/lib/lua/luci/dispatcher.lua:460: Failed to execute cbi dispatcher target for entry '/admin/services/ddns/detail/myddns_ipv4'.
The called action terminated with an exception:
/usr/lib/lua/luci/model/cbi/ddns/detail.lua:108: attempt to concatenate local '_arg' (a nil value)
stack traceback:
	[C]: in function 'assert'
	/usr/lib/lua/luci/dispatcher.lua:460: in function 'dispatch'
	/usr/lib/lua/luci/dispatcher.lua:141: in function </usr/lib/lua/luci/dispatcher.lua:140>

You probably have an illegal character in your config somewhere.

Okay, I've tried again and provided/selected the following settings for a no-ip.com account copy-pasting from a plaintext editor:

Lookup Hostname: MySubdomain.ddns.net
IP address version: IPv4-Address
DDNS Service provider [IPv4]: no-ip.com
Domain: MySubdomain.ddns.net
Username: MyNoIPAccount
Password: MyNoIPAccountPassword (something like bc9d0faad5a84989a896aj72da2f4763)

...and still get the error (my current ISP router uses the credentials without problems).

But honestly I don't understand the "Lookup Hostname" field. I don't get what https://wiki.openwrt.org/doc/howto/ddns.client wants me to provide here. Chapter "Configuration" -> "Basics" says:

Host/Domain: your FQDN you want to update (used by ddns-scripts using nslookup to check if update has happen)

and

Lookup Host: ONE of your defined FQDN you want to update (used by ddns-scripts using nslookup to check if update has happen)

The example text in LuCI (myhost.example.com) suggests (in my perspective) to provide the dynamic DNS domain here, so MySubdomain.ddns.net. Is this right? Doesn't make sense somehow.

Post your ddns config. Obviously redact your username, password, and personal domain info.

the file can be found here: /etc/config/ddns

Thx, I tried again via command line and set:

root@LEDE:/# cat /etc/config/ddns 

config ddns 'global'
        option ddns_dateformat '%F %R'
        option ddns_loglines '250'
        option upd_privateip '0'

config service 'myddns_ipv4'
        option lookup_host 'MySubdomain.ddns.net'
        option domain 'MySubdomain.ddns.net'
        option username 'MyNoIPaccount'
        option password 'MyNoIPaccountPassword'
        option interface 'wan'
        option ip_source 'network'
        option ip_network 'wan'
        option enabled '1'
        option service_name 'no-ip.com'

#config service 'myddns_ipv4'
#        option lookup_host 'yourhost.example.com'
#        option domain 'yourhost.example.com'
#        option username 'your_username'
#        option password 'your_password'
#        option interface 'wan'
#        option ip_source 'network'
#        option ip_network 'wan'
#        option service_name 'dyn.com'

#config service 'myddns_ipv6'
#        option update_url 'http://[USERNAME]:[PASSWORD]@your.provider.net/nic/update?hostname=[DOMAIN]&myip=[IP]'
#        option lookup_host 'yourhost.example.com'
#        option domain 'yourhost.example.com'
#        option username 'your_username'
#        option password 'your_password'
#        option use_ipv6 '1'
#        option interface 'wan6'
#        option ip_source 'network'
#        option ip_network 'wan6'

...followed by /etc/init.d/ddns enable.

Now LuCI lists a working setup (means the listed IP is correct). :confused:

If I may ask: According to...

ddns-scripts are designed to update one host per configuration/section. To update multiple hosts or providers or IPv4 and IPv6 for the same host you need to define separate configurations/sections.

...I have to provide a whole configuration block if I want to update a second subdomain of the same NoIP account? Like this?

config service 'myddns_ipv4'
        option lookup_host 'MySecondSubdomain.ddns.net'
        option domain 'MySecondSubdomain.ddns.net'
        option username 'MyNoIPaccount'
        option password 'MyNoIPaccountPassword'
        option interface 'wan'
        option ip_source 'network'
        option ip_network 'wan'
        option enabled '1'
        option service_name 'no-ip.com'

Glad it is working. And yes, it is another config service block in the file to add a second domain name, including, if desired, additional services (say no-ip.com, changeip.com, etc.).

LuCI doesn't like characters like a regular dash (-), but is okay with underscores (_)... that is one possible reason you were having issues before. But now that it is working, you should be good.

Hm, but there isn't any special character in my whole config...

anyway, thank you very much for your support!

Do you know what your file looked like before you did the command line adjustments?

As far as I remember everything was on default, except with

        option enabled '1'
        option service_name 'no-ip.com'

provided.

hmmm... not sure what would have cause the problem. But both the no-ip.com based ddns is working and the luci-app-ddns front end is functioning properly, right?

Yes.

Maybe I did some mistake I didn't recognize after some hours configuring OpenWRT... let's see if someone else stumbles about this problem. If it was just me it was my mistake.

Do you know what your file looked like before you did the command line adjustments?

I was to curious to reproduce the problem. I've reset the settings of /etc/config/ddns to default and provided the settings as mentioned. Same error (/usr/lib/lua/luci/dispatcher.lua:460: Failed to execute cbi dispatcher target for entry ...).

Command line says:

root@LEDE:/# cat /etc/config/ddns 

config ddns 'global'
        option ddns_dateformat '%F %R'
        option ddns_loglines '250'
        option upd_privateip '0'

config service 'myddns_ipv4'
        option lookup_host 'yourhost.example.com'
        option domain 'yourhost.example.com'
        option username 'your_username'
        option password 'your_password'
        option interface 'wan'
        option ip_source 'network'
        option ip_network 'wan'

config service 'myddns_ipv6'
        option update_url 'http://[USERNAME]:[PASSWORD]@your.provider.net/nic/update?hostname=[DOMAIN]&myip=[IP]'
        option lookup_host 'yourhost.example.com'
        option domain 'yourhost.example.com'
        option username 'your_username'
        option password 'your_password'
        option use_ipv6 '1'
        option interface 'wan6'
        option ip_source 'network'
        option ip_network 'wan6'

So nothing changed.

It's odd... On a spare router, I tried installing the same stuff and I have no such issues. I get the same warning on installation (which makes sense), but I am not getting the LuCI based errors that you're seeing after installation, despite using default config file (which was identical except for one line relative to your last post), and even copy/pasting the config you posted. I can't explain why you are seeing those errors. Maybe someone else can figure it out.

1 Like

Well, thank you so much for trying... we will see if someone else stumbles over this problem, thank you!