Giter VIP home page Giter VIP logo

Comments (24)

Sailboat265 avatar Sailboat265 commented on May 19, 2024 1

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.

harukodi avatar harukodi commented on May 19, 2024 1

Thanks for the fast response! I hope this can help a lot of people thanks a lot! 你太棒了!

from cloudflare-ddns-updater.

rossiscool123 avatar rossiscool123 commented on May 19, 2024 1

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.

rossiscool123 avatar rossiscool123 commented on May 19, 2024 1

@Nevah5 Have you applied this fix? It has worked for mine.
#44 (comment)

from cloudflare-ddns-updater.

rossiscool123 avatar rossiscool123 commented on May 19, 2024

@K0p1-Git

from cloudflare-ddns-updater.

K0p1-Git avatar K0p1-Git commented on May 19, 2024

I'm currently away, in the mean time @AgingOrange will you be able to help take a look?

from cloudflare-ddns-updater.

harukodi avatar harukodi commented on May 19, 2024

Same problem here! Any update on this issue?

from cloudflare-ddns-updater.

Nevah5 avatar Nevah5 commented on May 19, 2024

image

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 avatar Nevah5 commented on May 19, 2024

@Nevah5 Have you applied this fix? It has worked for mine.

#44 (comment)

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.

rossiscool123 avatar rossiscool123 commented on May 19, 2024

@Sailboat265
Issue has come back and is still reporting the same IP address.
20221215201620

from cloudflare-ddns-updater.

harukodi avatar harukodi commented on May 19, 2024

try this https://github.com/timothymiller/cloudflare-ddns

from cloudflare-ddns-updater.

rossiscool123 avatar rossiscool123 commented on May 19, 2024

@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.

Sailboat265 avatar Sailboat265 commented on May 19, 2024

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.

rossiscool123 avatar rossiscool123 commented on May 19, 2024

DDNS.txt
Ignore my terrible exiting for the Discord response. 😅
@Sailboat265

from cloudflare-ddns-updater.

Sailboat265 avatar Sailboat265 commented on May 19, 2024

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.

rossiscool123 avatar rossiscool123 commented on May 19, 2024

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.
20221220033005

from cloudflare-ddns-updater.

rossiscool123 avatar rossiscool123 commented on May 19, 2024

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.

rossiscool123 avatar rossiscool123 commented on May 19, 2024

@Sailboat265

from cloudflare-ddns-updater.

Sailboat265 avatar Sailboat265 commented on May 19, 2024

@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.

Sailboat265 avatar Sailboat265 commented on May 19, 2024

@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.

rossiscool123 avatar rossiscool123 commented on May 19, 2024

image

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.

rossiscool123 avatar rossiscool123 commented on May 19, 2024

@Sailboat265

from cloudflare-ddns-updater.

Sailboat265 avatar Sailboat265 commented on May 19, 2024

@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.

rossiscool123 avatar rossiscool123 commented on May 19, 2024

Fix for now.
#50

from cloudflare-ddns-updater.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.