getdnsapi / stubby

Stubby is the name given to a mode of using getdns which enables it to act as a local DNS Privacy stub resolver (using DNS-over-TLS).
https://dnsprivacy.org/dns_privacy_daemon_-_stubby/
BSD 3-Clause "New" or "Revised" License
1.19k stars 99 forks source link

Error parsing config file: Generic error #312

Closed tristanbay closed 1 year ago

tristanbay commented 2 years ago

Running stubby -i to update my DNS server list gives me a parsing error: Error parsing config file "/etc/stubby/stubby.yml": Generic error WARNING: No Stubby config file found... using minimal default config (Opportunistic Usage)

I know that this is probably a syntax/formatting error of the config file but I don't know where it is. I know about issue #175 and compared the original to the corrected config file and the errors are pretty obvious after reading the final reply. But this seems to be much more subtle. Please help (Here is my config file)

saradickinson commented 2 years ago

Sorry for slow response - the problem is the comment lines: comment: "rgnet-iad.anycast.censurfridns.dk ECDSA" which isn't supported in the getdns syntax.

Use standard yaml comment syntax if you need to annotate the file: # rgnet-iad.anycast.censurfridns.dk ECDSA

tristanbay commented 2 years ago

Sorry for slow response - the problem is the comment lines: comment: "rgnet-iad.anycast.censurfridns.dk ECDSA" which isn't supported in the getdns syntax.

Use standard yaml comment syntax if you need to annotate the file: # rgnet-iad.anycast.censurfridns.dk ECDSA

This issue with the comment lines seems to be in the stubby.yml.example file. Lines 255, 258, 261, etc, all have comment: in them, so when the first pound sign is removed from them with the other lines in that section, the syntax is no longer correct.

For example, line 255 should be changed from: # comment: "deic-ore.anycast.censurfridns.dk RSA" to: # # "deic-ore.anycast.censurfridns.dk RSA"

I'm having another problem now that might have to do with my network/connection management program not cooperating with Stubby. I'll open another issue here in a little bit about it.

saradickinson commented 2 years ago

Ah -sorry, I see the issue now and have modified the text in those entries so that when the leading # is removed they will still be actual comments and the file will parse. IIRC those comments were added by the maintainer of the servers but I can see how this caused you trouble :-(

https://github.com/getdnsapi/stubby/commit/9775c863ba3d698b365edecf8be8693457ea76f8

saradickinson commented 1 year ago

Closed as fixed in 0.4.1