Open fajabird opened 1 year ago
To me it seems like you are neither supplying a zone name nor a zone ID. Furthermore, it seems like you are not setting a record name (e.g. @
, *
). Therefore the JSON generated may be wrong.
The last line means that the Hetzner API rejected your request since there is information missing in the request, but the request is not malformed. See the MDN page here.
I had the same problem. You must use the JQ V1.6. I simply replaced the binary in my environment with the current JQ: https://stedolan.github.io/jq/download/
I can also confirm that. It is a little weird to replace the original 22kb file with a 4MB file, but it worked like tho22 described.
Running ./dyndns.sh
without any arguments will always fail. It needs a zone and a record to be specified. Zones may be specified with either ID or name, while records may be specified with either or both.
Perhaps this still would not have worked if you had passed the correct arguments, but the given example would not have worked anyway. I'm also confused as to why the issue is titled referencing 'duplicate A records' but you don't mention anything about that in the issue itself. Maybe this has since been fixed by #30?
I'm running the script on a ubuntu server LTS 18.04 which only has jq version 1.5-1-a5b5cbe.
root@server1:/usr/local/bin# ./dyndns.sh Info: Record_Name: server1 : Zone_ID:
Info: Record_Name: server1 : Zone_Name:
Info: Record_Name: server1 : Using IPv4, because A was set as record type.
Info: Record_Name: server1 : Current public IP address:
jq - commandline JSON processor [version 1.5-1-a5b5cbe]
Usage: jq [options] [file...]
Info: Record_Name: : Record_ID:
DNS record "" does not exists - will be created.
{"record":{"id":"","type":"","name":"","value":"","zone_id":"","created":"","modified":""},"error":{"message":"422 Unprocessable Entity: taken: ; ","code":422}}
I guess the last line means that some part of the input cannot be processed by that jq version? Is there a workaround that will work with this version?