![]() debug( "Sleeping for " + str( secToSleep) + " seconds") SecToSleep = positiveSecUntilExpire( curDict) #how long it will sleep ZoneIdentifier = getFirstExpiringZoneId( zIDict) #take the first zone id to expire based on its expireDate fieldĬfActions = CloudflareApiActions( CloudflareApi( curDict), zoneIdentifier) Here 'now' is used because the zone hasn't been updated yet. #expireDate is the expire date/time to update this zone's fields. With open( configurationFilePath, "w") as configFile:Ĭonfig = ![]() error( "Configuration file " + configurationFilePath + " not found! Creating an empty one.") basicConfig( filename = loggingFilePath, encoding = 'utf-8', level = logging. excepthook = handle_exception #Log exceptions even if not caught LoggingFilePath = "cloudflare-ddns-updater.log" total_seconds() *( timeDiff > timedelta( seconds = 0))ĬonfigurationFilePath = "cloudflare-ddns-updater.ini" """Returns the difference in seconds between expireDate and now, only if it is positive. """Returns a datetime object containing now time + seconds""" min #start from the lowest valueĬurTimeDelta = now - zoneIdDict """Returns the zone identifier with the nearest expiration time, if given a zoneIdDict type list (see below code).""" error( "Uncaught exception: ", exc_info =( exc_type, exc_value, exc_traceback)) _excepthook_( exc_type, exc_value, exc_traceback) If issubclass( exc_type, KeyboardInterrupt): #don't log KeyboardInterrupt. error( "Error while recovering the " + recordType + " wan ip address: " + str( wan_ip))ĭef handle_exception( exc_type, exc_value, exc_traceback): ip_address( wan_ip) #fails if the ip address is invalid #Getting external ip address using the opendns service """Wan ip source has returned an invalid response""" This is just a reaching out to give some context on something I found out today, and just wanted to make your team aware.From cloudflare_api_interface import * #module in this folderįrom datetime import timedelta as timedelta I am not sure if this is due to the updater web server /nic/update?system=dyndns&hostname= &myip= HTTP/1.0 or the ddclient itself. I went and updated my password and removed all special characters except for one, and it seemed to work. After looking through a number of discussions, this thread mentioned that a client (I assumed the OpenDNS updater cannot handle special character, but they require your password to have them :shrug:). Looking at the client request to the server, it seems that it the Authorization: Basic **** header wasn't being honered. ![]() Oct 8 14 : 17 : 50 timex ddclient : WARNING : last updated but last attempt on Sun Oct 8 14 : 17 : 47 2017 failed. 1 401 Unauthorized Oct 8 14 : 17 : 47 timex ddclient : FAILED : Server : nginx Oct 8 14 : 17 : 47 timex ddclient : FAILED : Date : Sun, 18 : 17 : 47 GMT Oct 8 14 : 17 : 47 timex ddclient : FAILED : Content-Type : text / html charset = UTF-8 Oct 8 14 : 17 : 47 timex ddclient : FAILED : Content-Length : 7 Oct 8 14 : 17 : 47 timex ddclient : FAILED : Connection : close Oct 8 14 : 17 : 47 timex ddclient : FAILED : cache, line 4 : Invalid Value for keyword 'ip' = '' Oct 8 14 : 17 : 50 timex ddclient : WARNING : skipping update of *********** from to **.***.***.**. Oct 8 14 : 17 : 47 timex ddclient : FAILED : updating ***********: authorization failed ( HTTP / 1.
0 Comments
Leave a Reply. |