Comments (24)
Heya! This bug is really hard to track down, but I highly suspect that maybe the issue arises when the script failed to get a valid response at the getting dns_records
step.
Am I sure about that? Hell no! At most cases, the credentials used in the script should hardly change, unless someone rotated their passwords or else.
However, there are instances where Cloudflare API servers are having a hard time both in June & July, which will cause API request to be dropped, or failed. But at that time frame, they said only Russia users are affected sooo....... yeah, weird.
Sorry for the essay like comment, but anyways!
Try editing the script's code from line 49, original code looks like
logger "DDNS Updater: Check Initiated"
record=$(curl -s -X GET "https://api.cloudflare.com/client/v4/zones/$zone_identifier/dns_records?type=A&name=$record_name" \
-H "X-Auth-Email: $auth_email" \
-H "$auth_header $auth_key" \
-H "Content-Type: application/json")
Change it to this
logger "DDNS Updater: Check Initiated"
record=$(curl --write-out "%{http_code}" -s -X GET "https://api.cloudflare.com/client/v4/zones/$zone_identifier/dns_records?type=A&name=$record_name" \
-H "X-Auth-Email: $auth_email" \
-H "$auth_header $auth_key" \
-H "Content-Type: application/json")
record_status=$(echo $record | tail -c 4)
if (( $record_status >= 400 && $record_status <= 530 )); then
logger -s "DDNS Updater: Error while checking record identifier!"
exit 1
fi
Since I have no idea when Cloudflare server suffers outages, will it still manage to return a JSON response so we can match it with case
in "\"success\":false"
. So I just changed it to match a range of HTTP Status Code from 400 to 530.
I'm not making a PR for now, because I still don't know if the problem is exactly it or not.
So please, go and change the code, and see if that really fixed the issue.
Thank you for reading the news-alike comment.
from cloudflare-ddns-updater.
Thanks for the fast response! I hope this can help a lot of people thanks a lot! 你太棒了!
from cloudflare-ddns-updater.
So far this fix is looking good @Sailboat265 but its only been running for 3 days, time will tell if it has the same issue. Regardless good fix and hopefully gets pulled into the next release. 👍
from cloudflare-ddns-updater.
@Nevah5 Have you applied this fix? It has worked for mine.
#44 (comment)
from cloudflare-ddns-updater.
from cloudflare-ddns-updater.
I'm currently away, in the mean time @AgingOrange will you be able to help take a look?
from cloudflare-ddns-updater.
Same problem here! Any update on this issue?
from cloudflare-ddns-updater.
Same issue. Maybe it could be related to my ISP, but I think this would have been detected by the script.
Very weird. I will try to debug, maybe I'll find something.
from cloudflare-ddns-updater.
@Nevah5 Have you applied this fix? It has worked for mine.
Whoops, I thought I did it, but I might have forgotten to save it. Still weird behaviour though, because it seems like it didn't log anything since a few days ago.
from cloudflare-ddns-updater.
@Sailboat265
Issue has come back and is still reporting the same IP address.
from cloudflare-ddns-updater.
try this https://github.com/timothymiller/cloudflare-ddns
from cloudflare-ddns-updater.
@harukodi
I don't think they even support Discord webhooks which is why I stuck with this option. The false positives aren't a deal breaker but should be still be considered a bug. Thanks anyway.
from cloudflare-ddns-updater.
Uhhh damn... It's not the problem of dns_records then...?
@rossiscool123 Can you copy and paste your running script here? (Rmb to remove the sensitive credentials info).
from cloudflare-ddns-updater.
DDNS.txt
Ignore my terrible exiting for the Discord response. 😅
@Sailboat265
from cloudflare-ddns-updater.
Hi, sorry for the late response, uni stuff's catching up a bit...
nahhh, your exiting is alright.
Sorry for asking silly questions but how did you know that the new IP is same as old IP?
from cloudflare-ddns-updater.
Hi, sorry for the late response, uni stuff's catching up a bit...
nahhh, your exiting is alright. Sorry for asking silly questions but how did you know that the new IP is same as old IP?
Not quire sure what you mean by "how did you know that the new IP is same as old IP?" Here's a screenshot of my issue.
from cloudflare-ddns-updater.
The issue that's happening is I'm being pinged about my IP changing when it has in fact not changed at all, I can only assume others are experiencing this and just haven't reported it.
from cloudflare-ddns-updater.
from cloudflare-ddns-updater.
@rossiscool123 Thanks for re-explaining it again! I think I need some sleep lmao, been very forgetful about things.
The issue that's happening is I'm being pinged about my IP changing when it has in fact not changed at all, I can only assume others are experiencing this and just haven't reported it.
Hmmm strange, I've not got any notice of this potential bug even though the script has been running on my raspi for months ady
from cloudflare-ddns-updater.
@rossiscool123 Uhhh sorry, can you go try sudo cat /var/log/syslog | grep DDNS
Then, make sure to find the line, that matches exactly the date, and time where the duplicate ping was triggered.
Maybe that could shred some light on what's actually going on...
from cloudflare-ddns-updater.
Hope you don't mind I censored the last bit of my IP and the domains its resolving to. I couldn't get any data further than this and trying to get more data ended up killing my SSH connection.
from cloudflare-ddns-updater.
from cloudflare-ddns-updater.
@rossiscool123 Thanks so much for the screenshot.
Can you send a screenshot of discord message as well? Between Dec 18 00:39 to 00:51.
Ohhh and pls mark the duplicated message again like you did, since only you can see the full IP.
from cloudflare-ddns-updater.
Fix for now.
#50
from cloudflare-ddns-updater.
Related Issues (20)
- TTL=auto HOT 3
- TXT spf1 updater HOT 1
- Cloudflare ip not updating HOT 2
- Add cron designations HOT 1
- [Question] HOT 3
- Support for multiple records [Reference @jeidnx comment on 24th Jan] HOT 10
- [Discussion] remove the ttl and proxy variables HOT 4
- DDNS Updater: Failed to find a valid IP HOT 4
- Could not route to /client/v4/zones/XXXX/dns_records, perhaps your object identifier is invalid?" HOT 1
- it opens my admin router?? HOT 1
- where to find the url used for updating my dynamic ip HOT 1
- What am i doing wrong?? [Clouldflare's API does not support domains with a .cf, .ga, .gq, .ml, or .tk] HOT 2
- Script does nothing HOT 1
- I would like to add a Telegram Notification HOT 1
- Can't use 2 record names at the same time. HOT 1
- Automatically updated ip address (subdomain) differes from the ip of the main domain
- Possibility to take IP from another gateway
- Works on Raspberry Pi, but not on Mac
- Ensure Cloudflare is returning a valid IP address before comparing old_ip to current IP HOT 2
- Hope there will be IPv6 support HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudflare-ddns-updater.