stubby icon indicating copy to clipboard operation
stubby copied to clipboard

Error parsing config file: Generic error

Open tristanbay opened this issue 2 years ago • 3 comments

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)

tristanbay avatar May 01 '22 08:05 tristanbay

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

saradickinson avatar May 06 '22 11:05 saradickinson

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.

tristanbay avatar May 07 '22 23:05 tristanbay

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 avatar May 11 '22 10:05 saradickinson

Closed as fixed in 0.4.1

saradickinson avatar Jan 10 '23 14:01 saradickinson