mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-08-02 18:48:49 -04:00
Porkbun Unable to Update IP - HTTP Error Code 400 #384
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 @NaturalCarr on GitHub (Apr 5, 2024).
Greetings gdm12, I've run into the same problem that another user had on issue 536: https://github.com/qdm12/ddns-updater/issues/536
Here's a copy of that info for context (my issue is exactly the same)
I am using porkbun as my domain registrar.
I'm trying to add two subdomains, one is working, one is not.
The one that is not working "throws" a "Failure (HTTP status is not valid: 400: {"status":"ERROR","message":"Edit error: We were unable to edit the DNS record."}), 3s ago" in the webui.
Any ideas what could be wrong?
When i delete the domain via porkbun, the first registration works, but when trying to update, the error occurs.
I tried to put my docker into log-level debug to give logs with this, but I recieve this error when I do
2024-04-05T06:52:58-04:00 ERROR /updater/data/updates.json validation error: host is empty: for record 10 of 10 with domain my.site@NaturalCarr commented on GitHub (Apr 5, 2024):
IT would appear I spoke to soon on the 2nd error, I deleted the updates.json so the error logging isn't an issue. Here's my logs with the sensitive stuff redacted
They mention "no-cache" which i believe may be a setting I enabled on nginx, I'll check my configs and see.
@NaturalCarr commented on GitHub (Apr 5, 2024):
I've done a bit of testing, changing my cache settings to default didn't resolve the issue. I did notice that the first host in my subdomain list will always work properly, it's every domain after that does not. I imagine"*" would work, but I want to have any requests to an improper url blocked.
@NaturalCarr commented on GitHub (Apr 5, 2024):
Confirming, using wildcard works perfectly, it's multiple subdomains that causes this error
@qdm12 commented on GitHub (Apr 29, 2024):
⚠️ careful you are exposing your keys in the debug logs above, please change the values (unless they are changed already) renew your keys on Porkbun.
There seems to be discrepancy in your errors, one from your logs says
ERROR creating record: HTTP status is not valid: 400: Create error: We were unable to create the DNS record.and the original one isEdit error: We were unable to edit the DNS record.so which one is the one you are having a problem with?Now, regarding the URL it's hitting
https://porkbun.com/api/json/v3/dns/retrieveByNameType/my.site/A/%20requestthis seems rather odd, what are your subdomains? It's meant to be of the formhttps://porkbun.com/api/json/v3/dns/retrieveByNameType/domain/recordType/hostif the host is not@.So the
%20requestI have no idea where it's from. Are you sure you don't have a space in your subdomain field value?From the looks of it, it tries to list records for domain
my.site, typeAand subdomain%20request, to which Porkbun responds with no record found. So the program then tries to create domainmy.sitewhich fails, likely because it already exists.Also, please provide necessary details such as program version, what are you using the run the program.
@qdm12 commented on GitHub (Apr 29, 2024):
I think changing
"host": "[subdomain1], [subdomain2], ... [subdomain7]",to"host": "[subdomain1],[subdomain2],...,[subdomain7]" would fix it, because%20` is the url escaped value for space.I've added code in
ae4ab39421to trim spaces for each host, to prevent such issue to re-occur as well.@NaturalCarr commented on GitHub (May 4, 2024):
Thank you! I thought I removed those references to the key, its been changed on Porkbun. I tried both of these,
Swapping to "host": "[subdomain1],[subdomain2],...[subdomain7]"
worked perfectly!
For some extra context, I was running this as a docker on Unraid
@devanteweary commented on GitHub (Oct 12, 2024):
Hey just curious, I've been having the exact same issue for months and just never got around to fixing it.
How exactly are you putting your settings? Could you show me like with a fake domain or something?
Here's mine:
{
"provider": "porkbun",
"domain": "devantedomain.com",
"api_key": "0123456789",
"secret_api_key": "0123456789",
"ip_version": "ipv4"
},
I also tried just an asterisk as domain and I get the 400 error on both.
edit:
So what I did that seemed to have fixed it:
Go to Porkbun > Domain Management > Your Domain > DNS > Delete the A Records > Restart DDNS-Updater.