joshuaavalon/SynologyCloudflareDDNS

Daily DDNS update fails but manual update works

Closed this issue · 4 comments

Since last week, I have a Synology NAS reports DDNS service failed to register IP address everyday.
The notification shows Unknown Error. But the DSM DDNS webui shows Failed to connect server.
The /var/log/cloudflareddns.log shows
cloudflaredns.sh (7): Updating with x.x.x.x...
cloudflaredns.sh (7): RESPONSE==
cloudflaredns.sh (7): Status:

But when I click 'Update' button, the DDNS entry returns 'Normal' after couple seconds loading. And shows the next update is the following day.
In this case, the /var/log/cloudflareddns.log shows
cloudflaredns.sh (7): Updating with x.x.x.x...
cloudflaredns.sh (7): Status: good

I have two DDNS entries, one is Cloudflare DDNS using this script, the other one is Synology DDNS without issue. The Synology NAS is in China mainland. The Internet IP address has not been changed since the issue observed. I have reason to suspect that it is really network related issue. The ISP might be interfering the communication to Cloudflare. However I do not understand why it only impacts the auto daily DDNS update. Is there any difference between the schedule update and manual update. Do they have the different timeout value if the Internet quality is not ideal? Or do they use different reporting URLs which might be blocked?

Any clue helps the investigation will be appreciated. Thanks for this wonderful script.

I rebooted the NAS box. And this time I observed one failed DDNS update even thru 'Update Now' button. But the rest tries are all good. So probably it is the network connectivity issue.
I also rebooted the router to get a different public IP. It automatically got the new IP updated. Let see how's going tomorrow.
Just one recommendation to the script, is it possible to add the update response result for server not reachable or timeout? Right now, the response just empty.

@florid2 Please share your log file at /var/log/cloudflareddns.log

@joshuaavalon please find my log. i hide the IP addresses for privacy concern. Hope this helps the investigation.
cloudflareddns.log.zip

@florid2 If the __RESPONSE__= empty, curl probably return nothing. If you hit the invalid API, there will still be a json response from CloudFlare. My best guess is the connection timeout.