Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 #724

Open
CaptainBuzzable opened this issue May 17, 2024 · 6 comments

Comments

@CaptainBuzzable
Copy link

TLDR: Failure (creating record: bad request sent: Parameter Value Error - Duplicate Record) name.com

  1. Is this urgent: Yes

  2. DNS provider(s) you use: name.com

  3. Program version:

    qmcgaw/ddns-updater:2.6.0

  4. What are you using to run the container: docker-compose

  5. Extra information (optional)

  6. qmcgaw/ddns-updater:2.6.0

Logs:

Failure (creating record: bad request sent: Parameter Value Error - Duplicate Record) name.com
xxxxxx.xxxx  | 2024-05-16T15:05:56Z ERROR creating record: bad request sent: Parameter Value Error - Duplicate Record

Configuration file (remove your credentials!):

   {
      "provider": "name.com",
      "domain": "xxxxxx.com",
      "host": "@",
      "username": "xxxxxx",
      "token": "xxxxxxxxxxxxxxxx",
      "ttl": 300,
      "ip_version": "ipv4",
      "ipv6_suffix": ""
   }

Host OS: Ubuntu Docker

@qdm12
Copy link
Owner

qdm12 commented May 23, 2024

That's kind of strange. The logic is to:

  1. Get all records for the domain and search for the record matching the record type (A) and the host (i.e. @)
  2. If not found, send a request to create it
  3. If found, update it

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/records from your browser (and replace username, token and yourdomain.com?

I expect it to be similar to:

{
    "records": [
        {
            "id": 12345,
            "domainName": "yourdomain.com",
            "host": "@",
            "fqdn": "yourdomain.com",
            "type": "A",
            "answer": "1.2.3.4",
            "ttl": 300
        }
    ]
}		

Let me know if this matches or if there is a mismatch?

You can also further debug it for me by using LOG_LEVEL=debug which logs out every http request and responses.

@CaptainBuzzable
Copy link
Author

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
Copy link
Author

here is the curl works perfectly see my word doc for more information.. no issues with credentials ;) curl https://xxxxxx:xxxxx@api.name.com/v4/domains/firtreecottage.com/records
{"records":[{"id":244555916,"domainName":"firtreecottage.com","fqdn":"firtreecottage.com.","type":"A","answer":"185.254.149.99","ttl":300},{"id":244555918,"domainName":"firtreecottage.com","host":"www","fqdn":"www.firtreecottage.com.","type":"CNAME","answer":"firtreecottage.com","ttl":300},{"id":244835513,"domainName":"firtreecottage.com","host":"wireguard","fqdn":"wireguard.firtreecottage.com.","type":"CNAME","answer":"firtreecottage.com","ttl":300},{"id":244880045,"domainName":"firtreecottage.com","host":"cornwallipsec","fqdn":"cornwallipsec.firtreecottage.com.","type":"CNAME","answer":"firtreecottage.com","ttl":300},{"id":244943868,"domainName":"firtreecottage.com","fqdn":"firtreecottage.com.","type":"TXT","answer":"google-site-verification=xxxxxxxxxx,"ttl":3600},{"id":245176542,"domainName":"firtreecottage.com","fqdn":"firtreecottage.com.","type":"A","answer":"185.254.149.145","ttl":300}]}

@CaptainBuzzable
Copy link
Author

2024-05-24T06:43:13Z DEBUG config read: {
nameddns.firtreecottage | "settings": [
nameddns.firtreecottage | {
nameddns.firtreecottage | "provider": "name.com",
nameddns.firtreecottage | "domain": "firtreecottage.com",
nameddns.firtreecottage | "host": "@",
nameddns.firtreecottage | "username": ",
nameddns.firtreecottage | "token": "xxx",
nameddns.firtreecottage | "ttl": 300,
nameddns.firtreecottage | "ip_version": "ipv4",
nameddns.firtreecottage | "ipv6_suffix": ""
nameddns.firtreecottage | }
nameddns.firtreecottage | ]
nameddns.firtreecottage | }

@CaptainBuzzable
Copy link
Author

When i delete the old duplicate entry its works no update needed.2024-05-24T06:43:13Z INFO Found single setting to update record
2024-05-24T06:43:13Z INFO Reading history from database: domain firtreecottage.com host @ ipv4
2024-05-24T06:43:13Z DEBUG configured to fetch IP: v4 or v6: false, v4: true, v6: false
2024-05-24T06:43:13Z INFO [backup] disabled
2024-05-24T06:43:13Z INFO [http server] listening on :80
2024-05-24T06:43:13Z INFO [healthcheck server] listening on 127.0.0.1:9999
2024-05-24T06:43:13Z DEBUG your public IP address are: v4 or v6: invalid IP, v4: 185.254.149.145, v6: invalid IP
2024-05-24T06:43:13Z DEBUG ipv4 address of firtreecottage.com is 185.254.149.145 and your ipv4 address is 185.254.149.145, skipping update

@CaptainBuzzable
Copy link
Author

Just check if i delete the a record before the update in name.com it works perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants