-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows paths in List Format result in: "found unknown escape character. Exiting." or "found unexpected ':'. Exiting." #1495
Comments
@urso Is this actually a bug or just a YAML problem? |
I think you can avoid this problem by using a forward slash in your Windows paths (Golang does the right thing and converts them IIRC) or instead of using double quotes, use single quotes. |
@andrewkroh - this is confirmed that single quotes with forward slashes in arrays is accepted:
|
I propose we resolve this issue by adding a special note to Windows users in our docs describing the options for specifying paths in YAML files. I was thinking to put it into the "Configuring *beat" section of the Getting Started guide for each beat, like this page for Filebeat. Or maybe an FAQ topic? It would probably easiest to recommend using single quotes around any Windows path. That addresses any issue caused by the colon in absolute paths and avoids the need to escape any back-slashes. // cc: @dedemorton |
@andrewkroh It wouldn't hurt to mention this in a few places: in the config section of each GS and where we mention specifying a path. An FAQ topic is also a good idea, especially if "found unknown escape character" generally means that you've specified a Windows path that uses backslashes. I'll assign this item to myself and play it by ear (don't want to repeat this a bazillion times, but wan to make sure that users don't overlook it). |
I'm advocating use of single-quotes for paths and regular expressions for quite some time now. Windows path with All this behaviour is by (YAML) design/specification. For as long as we're using YAML, the best solution is to use single-quotes consistently. |
The
certificate_authorities
line in this configuration is invalid:Causes:
As is this:
Causes:
The only way to get it to load is by escaping the backslashes, which seems inconsistent being that the only difference is that
certificate_authorities
requires a list format.Related: http://stackoverflow.com/questions/34513913/unable-to-start-filebeat-due-to-yaml-config-issue
The text was updated successfully, but these errors were encountered: