美文网首页
LogStash 错误:Logstash could not b

LogStash 错误:Logstash could not b

作者: tingshuo123 | 来源:发表于2018-11-20 14:37 被阅读1012次
    $ ./bin/logstash -f ./temp/std_std.conf 
    

    错误提示:

    Sending Logstash logs to /usr/local/logstash/logstash-6.5.0/logs which is now configured via log4j2.properties
    [2018-11-20T12:23:45,931][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
    [2018-11-20T12:23:46,088][FATAL][logstash.runner          ] Logstash could not be started because there is already another instance using the configured data directory.  If you wish to run multiple instances, you must change the "path.data" setting.
    [2018-11-20T12:23:46,130][ERROR][org.logstash.Logstash    ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
    
    

    原因:之前运行的instance有缓冲,保存在path.data里面有.lock文件,删除掉就可以。
    解决办法:

    • 在 logstash.yml 文件中找到 Data path 的路径(默认在安装目录的data目录下)
    # ------------ Data path ------------------
    #
    # Which directory should be used by logstash and its plugins
    # for any persistent needs. Defaults to LOGSTASH_HOME/data
    #
    path.data: 
    
    • 查看是否存在 .lock 文件,如果存在把它删除
    data$ ls -alh
    总用量 20K
    drwxr-sr-x  4 tingshuo staff 4.0K 11月 20 11:42 .
    drwxr-sr-x 14 tingshuo staff 4.0K 11月 20 11:42 ..
    drwxr-sr-x  2 tingshuo staff 4.0K 11月 20 11:42 dead_letter_queue
    -rw-r--r--  1 tingshuo staff    0 11月 20 11:42 .lock
    drwxr-sr-x  2 tingshuo staff 4.0K 11月 20 11:42 queue
    -rw-r--r--  1 tingshuo staff   36 11月 20 11:42 uuid
    
    • 删除
    data$ rm .lock
    

    相关文章

      网友评论

          本文标题:LogStash 错误:Logstash could not b

          本文链接:https://www.haomeiwen.com/subject/icxxqqtx.html