mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-08-02 10:38:41 -04:00
name.com IP update sent creates a duplicate entry and does not update the current entry : name.com creating record: bad request sent: Parameter Value Error - Duplicate Record #402
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @CaptainBuzzable on GitHub (May 17, 2024).
TLDR: Failure (creating record: bad request sent: Parameter Value Error - Duplicate Record) name.com
Is this urgent: Yes
DNS provider(s) you use: name.com
Program version:
qmcgaw/ddns-updater:2.6.0What are you using to run the container: docker-compose
Extra information (optional)
qmcgaw/ddns-updater:2.6.0
Logs:
Configuration file (remove your credentials!):
Host OS: Ubuntu Docker
@qdm12 commented on GitHub (May 23, 2024):
That's kind of strange. The logic is to:
A) and the host (i.e.@)I would guess the problem lies in step 1.
Can you please check what you get from accessing
https://username:token@api.name.com/v4/domains/yourdomain.com/recordsfrom your browser (and replaceusername,tokenandyourdomain.com?I expect it to be similar to:
Let me know if this matches or if there is a mismatch?
You can also further debug it for me by using
LOG_LEVEL=debugwhich logs out every http request and responses.@CaptainBuzzable commented on GitHub (May 24, 2024):
Thanks so much for a quick response; i have added all the output in a word doc for simplicity let me know if you need it plain txt.. really like your software and its saves me creating something similar in golang myself. :)
duplicate record.docx
attached a word doc with the username and api key removed and also some screen shots.. Thanks Mark
@CaptainBuzzable commented on GitHub (May 24, 2024):
here is the curl works perfectly see my word doc for more information.. no issues with credentials ;)
@CaptainBuzzable commented on GitHub (May 24, 2024):
@CaptainBuzzable commented on GitHub (May 24, 2024):
When i delete the old duplicate entry its works no update needed.
@CaptainBuzzable commented on GitHub (May 28, 2024):
Just check if i delete the a record before the update in name.com it works perfectly.
@CaptainBuzzable commented on GitHub (Jun 11, 2024):
*************** This curl works ??
@CaptainBuzzable commented on GitHub (Jun 11, 2024):
The API has changed..
Now expects this
@qdm12 commented on GitHub (Jun 13, 2024):
I believe I found the problem, which is fixed with
c1bf7a49c1- can you try pulling the latest image and see if it works now?For details, name.com responds with the "host" field absent for the root host (
@), so comparing""with"@"would fail and so the record would not be found. This is now fixed by overriding""with"@"when going through listed records, before doing the comparison.@CaptainBuzzable commented on GitHub (Jun 14, 2024):
Thanks so much Quentin Wow!!! , i was just about to spin up go-lang and
write one myself!!
I will pull the image and give it a go!
Simply thank you!!
On Thu, 13 Jun 2024 at 20:18, Quentin McGaw @.***>
wrote:
@CaptainBuzzable commented on GitHub (Jun 16, 2024):
OK just pulled image: qmcgaw/ddns-updater:latest 16th June,
Now i get this..
now delete a record from name.com.
completely (no A record at all) in DNS
restart
Notes
@qdm12 commented on GitHub (Jun 16, 2024):
Are you sure your
"host"field is"@"and not"@.marklucas.co.uk"? 🤔On the name.com's API UpdateRecord documentation (here), it states:
And for now this is what's done using
"@"d3b689d0ef/internal/provider/providers/namecom/updaterecord.go (L30-L40)The same is also done to create a record, and it seems to work which is quite strange:
d3b689d0ef/internal/provider/providers/namecom/createrecord.go (L30-L40)Anyway, I pushed
012a6dddcdto force the host field to be""instead of"@"when updating a record, since this may be the problem 🤔 Let me know if this resolves it 😉 Also curious about wildcards if you can check it works fine that would be great too!@CaptainBuzzable commented on GitHub (Jun 16, 2024):
Hello Quentin,
This now works 100% thank you so much for all your amazing help!! -
9:31Z INFO [healthcheck server] health http server listening on
127.0.0.1:9999
nameddns.notinproduction | 2024-06-16T08:59:31Z INFO [http server] http
server listening on [::]:80
nameddns.notinproduction | 2024-06-16T08:59:31Z INFO [backup] disabled
nameddns.notinproduction | 2024-06-16T08:59:31Z INFO ipv4 address of
marklucas.co.uk is 195.166.29.89 and your ipv4 address is 95.166.29.89
nameddns.notinproduction | 2024-06-16T08:59:31Z INFO Updating record
[domain: marklucas.co.uk | host: @ | provider: name.com | ip: ipv4] to use
95.166.29.89
No Errors!!! name.com + ddns-updater 10/10 :)
marklucas.co.uk @ Name.com https://name.com/ ipv4 Success (changed to
95.166.29.89), 3m43s ago 95.166.29.89 https://ipinfo.io/95.166.29.89
195.166.29.89
On Sun, 16 Jun 2024 at 09:36, Quentin McGaw @.***>
wrote:
@CaptainBuzzable commented on GitHub (Jun 16, 2024):
A little payment coming your way for a coffee!!
@CaptainBuzzable commented on GitHub (Jun 16, 2024):
Done!!
@qdm12 commented on GitHub (Jun 16, 2024):
Awesome, thanks for the little 💸 👍 enjoy!