简体   繁体   English

第2行第1列(字节2)中的#,输入,过滤,输出中的一个:Logstash

[英]Expected one of #, input, filter, output at line 2, column 1 (byte 2): Logstash

I've been getting this weird error for some time now: 我已经有一段时间没有得到这个奇怪的错误了:

Error: Expected one of #, input, filter, output at line 2, column 1 (byte 2) after 错误:在第2行,第1列(第2列)之后的#,输入,过滤器,输出中的一个

Configuration: 组态:

input {
    stdin {}
    udp {
        type => "udp"
        port => "5959"
    }
    file {
        type => "syslog"
        path => "/var/log/messages"
    }
}
output {
    elasticsearch {
        host => localhost
    }
}

Command: 命令:

bin/logstash -f logstash.conf

Thanks in Advance :) 提前致谢 :)

Probably you have some unsupported non-printed character in the original file. 可能在原始文件中有一些不受支持的非打印字符。 Incorrect EOL or whatever. 不正确的EOL或其他。

This example works fine with my logstash. 这个例子适用于我的logstash。 Try to copy and paste this config (from your post) to a new file and try it again. 尝试将此配置(从您的帖子)复制并粘贴到新文件并再次尝试。

Good luck. 祝好运。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM