gpt4 book ai didi

Docker Compose - Logstash - 启动后以代码 0 退出

转载 作者:行者123 更新时间:2023-12-02 18:41:03 25 4
gpt4 key购买 nike

我正在尝试将 Logstash 与 Docker Compose 结合使用,.yml 文件如下所示:

user-service:
image: images/user-service
ports:
- "2222:2222"
links:
- logstash

logstash:
image: images/logstash
command: logstash -e 'input{} output{}'
ports:
- "5045:5045"

logstash 开始和结束,如控制台所示:

logstash_1          | Sending Logstash's logs to /var/log/logstash which is now configured via log4j2.properties
logstash_1 | 01:51:30.164 [[main]-pipeline-manager] INFO logstash.pipeline - Starting pipeline {"id"=>"main", "pipeline.workers"=>2, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>250}
logstash_1 | 01:51:30.246 [[main]-pipeline-manager] INFO logstash.pipeline - Pipeline main started
logstash_1 | 01:51:30.860 [Api Webserver] INFO logstash.agent - Successfully started Logstash API endpoint {:port=>9600}
logstash_1 | 01:51:33.318 [LogStash::Runner] WARN logstash.agent - stopping pipeline {:id=>"main"}
docker_logstash_1 exited with code 0

可能是什么问题?

最佳答案

我通过更改过滤器的输入解决了这个问题:

input{ tcp{
port=> 9600
host=>localhost
}
}

关于Docker Compose - Logstash - 启动后以代码 0 退出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41112740/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com