clempaul / dreamhost-dynamic-dns

A Dynamic DNS updater for use with the Dreamhost API
Other
91 stars 39 forks source link

deleting the record without re-adding #3

Closed ktonini closed 5 years ago

ktonini commented 9 years ago

I've been using this flawlessly for a couple years now but just recently the script has started throwing an error and not re-adding the A record.

First, when the A record is initially deleted by the script -

success record_removederror invalid_value too shortFATAL ERROR: Failed to add new record

And then subsequently

error no_valueUnable to delete existing record error invalid_value too shortFATAL ERROR: Failed to add new record

Manually adding the A record back produces the first error again. Any ideas?

Thanks!

clempaul commented 9 years ago

This sounds like the new IP address isn't being found correctly (possibly because dig isn't returning the correct data).

1) Please can you confirm that the output coming from dig is correct when you run it manually, and also confirm the return code (the first of these commands should show your public IP address, and the second should be 0:

$ dig +short myip.opendns.com @resolver1.opendns.com
$ echo $?

2) Does the script work if you pass the IP address on the command line (i.e. using -i 1.2.3.4 where 1.2.3.4 is your IP address)?

Impulse0022 commented 8 years ago

I was having the same problem and ended up changing the command.

From: IP=$(eval "dig +short myip.opendns.com @resolver1.opendns.com")

To: IP=$(eval "wget http://ipecho.net/plain -O- -q")

clempaul commented 8 years ago

@Impulse0022 Can you run

$ dig +short myip.opendns.com @resolver1.opendns.com
$ echo $?

and report the output? It would be useful to get this to try and figure out why this is failing. Thanks!

clempaul commented 5 years ago

I'm going to close this issue as there's not really enough information to help debug this. If anyone does still have this issue, please follow my suggestions above to give more debugging information. Thanks!