Closed wwray closed 3 years ago
Hi @wwray,
Could you please share how you setup a yaml file?
Try the following configuration:
domains:
domain.com:
- type: "A"
name: "home"
Hi I created it in notepad++ and moved it to the server. I just checked and made sure it's in unix encoding.
That's the configuration I have .
domains: wraynet.com:
# https://developers.digitalocean.com/documentation/v2/#create-a-new-domain-record
Thanks for looking into this for me!
On Sat, Jun 26, 2021 at 11:54 PM Sergey Kibish @.***> wrote:
Hi @wwray https://github.com/wwray,
Could you please share how you setup a yaml file?
Try the following configuration:
domains: domain.com:
- type: "A" name: "home"
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/skibish/ddns/issues/28#issuecomment-869096041, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL3XXDUJYJEZQQGUSIPTYN3TU2OJDANCNFSM47L7IBKQ .
Hi @wwray ,
Thanks!
But unfortunately, this is not the full yaml file. May I ask you to share full yaml file (without secrets, better via GitHub to preserve spacing and highlighting)?
In first message error says that error is on line 33. My assumption is that maybe some spacing is broken. I want to see what is on line 33 and around.
For an experiment you can replace your current file with the following configuration and see if it works:
token: "<your Digital Ocean token>"
domains:
wraynet.com:
- type: "A"
name: "home"
Here you go! sorry I misunderstood, thanks again for your help.
when I use the config provided I get a different error
time="2021-06-27T13:24:10Z" level=fatal msg="yaml: unmarshal errors:
line 8: cannot unmarshal !!map into []string"
I've found the following issues:
data
key had space in front and this led to error on line 31priority
, port
etc. will be parsed incorrectly (commas in the end of lines--- a/ddns.original.yml
+++ b/ddns.fixed.yml
@@ -28,15 +28,10 @@ domains:
# Supports Go template engine.
# Additional keys can be set in "params" block below.
- data: "107.179.128.81"
+ data: "107.179.128.81"
# By default, 1800 seconds (5 minutes).
ttl: "1800"
- "priority": null,
- "port": null,
- "weight": null,
- "flags": null,
- "tag": null
# By default, params is empty.
params:
I've adjusted the file (see attached) and seems like it's working now as expected.
I downloaded your file, and pasted in my token in but am still getting an error
time="2021-06-27T20:32:24Z" level=fatal msg="yaml: unmarshal errors: line 22: cannot unmarshal !!map into []string"
Please check what you have on line 22
attached file. There's 3 spaces before the domain, thanks for helping out.
Ok so I finally got it to validate on a .yaml validator and I'm still having the unmarshal error on the 1st domain entry. I understand yaml a lot better than I did this morning. Pretty neat! ddns.yml.txt
time="2021-06-28T15:10:50Z" level=fatal msg="yaml: unmarshal errors: line 4: cannot unmarshal !!map into []string"
Happy to hear that!
What version of ddns are you using?
ddns -v
in old one and ddns -ver
in new one
I can't get it to start because of the error so can't tell ya. I am using this docker https://hub.docker.com/r/ronnieroller/ddns
Seems like you are using a fork :)
Try this one: https://hub.docker.com/r/skibish/ddns
My deepest apologies @skibish ! I didn't realize I was using a fork. I would have been very sad if it had just worked, but now I'm getting the error below when starting the docker using the config file I provided above.
time="2021-06-28T16:01:54Z" level=fatal msg="failed to read configuration file: While parsing config: yaml: control characters are not allowed"
Remove dashes on the first line, I think this should help
On Mon, Jun 28, 2021, 19:04 wwray @.***> wrote:
My deepest apologies @skibish https://github.com/skibish ! I didn't realize I was using a fork. I would have been very sad if it had just worked, but now I'm getting the error below when starting the docker using the config file I provided above.
time="2021-06-28T16:01:54Z" level=fatal msg="failed to read configuration file: While parsing config: yaml: control characters are not allowed"
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/skibish/ddns/issues/28#issuecomment-869810439, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJZWK2KF4UI2KC2W55STFDTVCMRTANCNFSM47L7IBKQ .
Ok well, I can't get the container that I'm using to even register the existence of the .ddns.yml file. If I delete it I get the exact same error. I loaded it up using docker run command in your help docs and I got:
Status: Downloaded newer image for skibish/ddns:latest time="2021-06-28T17:29:52Z" level=debug msg="using the following configuration file: /config/.ddns.yml" time="2021-06-28T17:29:52Z" level=debug msg="initializing ip" time="2021-06-28T17:29:53Z" level=info msg="current ip is <deleted>" time="2021-06-28T17:29:53Z" level=debug msg="syncing dns records" failed to sync dns records: failed to create a record for the domain wraynet.com: unexpected response with status code 422
Which is probably what is supposed to happen, but even if I get the container working I'll then have to deal with the DO error. I'm gonna sit on it and see if I want to try some other way. You can close this ticket since I suspect it's not a problem with your software, thanks for all your help!
Yep, it's a good sign that configuration file is valid and application was able to read it.
I think the issue is now that you specify multiple arrays which all are invalid.
-
type: A
-
name: home
-
data: "{{.IP}}"
-
ttl: "1800"
Each dash means a new array element and in the end they are all wrong because first one has only type: A
which is not enough to create a record, second one a name: home
which is also not enough because it waits for type
, etc.
I should be like this:
domains:
wraynet.com:
- type: A
name: home
data: "{{.IP}}"
ttl: "1800"
Hi there, I'm trying to use your docker implementation in unraid and I'm receiving an error when I try to start it.
time="2021-06-27T03:39:09Z" level=fatal msg="yaml: line 33: did not find expected key"
It is definitely seeing the .yaml file. I've tried putting my public ip in the data: field to no avail. I'm trying to add a subdomain home.domain.com
I have created an api key and put it in the ddns.yml file.
Any help would be appreciated, thanks!