DDNS update fails

Hi all,

Unfortunately, the DDNS service is not updating anymore. In DietPi-DDNS there are the following logs:

Nov 16 16:20:07 DietPi CRON[101840]: pam_unix(cron:session): session closed for user dietpi-ddns
Nov 16 16:20:07 DietPi dietpi-ddns[101847]: curl: (23) Failure writing output to destination

Any idea?
Thanks a lot!

did you tried open dietpi-ddns to check and verify your setiings? Usually it should display a status.

yes, the logs are actually shown in dietpi-ddns. I can apply my settings and the test succeeds. But as soon as CRON tries to update the ddns status, it fails.

Could you have a look on this pls.

Please the output of:

cat /var/lib/dietpi/dietpi-ddns/update.sh

Remove/mask your credentials.

Here is the result:

curl -6or4 -sSfL -u '0\:none' 'https://dynv6.com/api/update?token=XXXXXXXXXXXXXXXXXXX&ipv4=auto&ipv6=auto&hostname=XXXXXXXXXXXXXX' 2>&1 > /dev/null | logger -t dietpi-ddns -p 3

What’s very strange, Dynv6 is showing me regular updates on their website/dashboard. Somehow, dietpi-ddns is still connecting to their server. But as soon my ip adress changes, I loose connection to my dietpi nas from outside. I have to manually refresh my ip adress on dynv6’s website.

what happen if you try to run following manually

curl -sSfL -u '0\:none' 'https://dynv6.com/api/update?token=XXXXXXXXXXXXXXXXXXX&ipv4=auto&ipv6=auto&hostname=XXXXXXXXXXXXXX'

First of all, you’re affected by this bug: Cannot had more than one No-Ip domains · Issue #5830 · MichaIng/DietPi · GitHub
However, the actual DDNS update should still succeed, only writing the response to a file fails (which is not intended and fails, luckily, due to insufficient permissions of the service user). However, to fix the file:

sed -i 's/^curl -6or4/curl/' /var/lib/dietpi/dietpi-ddns/update.sh

I’ll add this patch for the upcoming DietPi update latest today.

1 Like

Thanks all for your help. After your fix @MichaIng I get this logs in dietpi-ddns:

Nov 20 11:00:14 DietPi CRON[9518]: pam_unix(cron:session): session closed for user dietpi-ddns
Nov 20 11:00:01 DietPi CRON[9521]: (dietpi-ddns) CMD (/var/lib/dietpi/dietpi-ddns/update.sh)

I also updated to the new DietPi v8.11

Means it is working again?

Yes, so far it seems to work. Thanks all!