[英]Jhipster-Logstash does not start correctly
I use the command docker-compose up to deploy all in docker machine. 我使用命令docker-compose up来部署所有的docker机器。 That s works fine, but when i stop all the instance of docker and restart manually, i have an issue with logstash:
这很好,但是当我停止所有docker实例并手动重启时,我遇到了logstash的问题:
{:timestamp=>"2016-07-12T08:06:11.710000+0000", :message=>"Pipeline main started"}
{:timestamp=>"2016-07-12T08:06:11.815000+0000", :message=>"Pipeline main has been shutdown"}
{:timestamp=>"2016-07-12T08:06:14.723000+0000", :message=>"stopping pipeline", :id=>"main"}
{:timestamp=>"2016-07-12T08:07:47.582000+0000", :message=>"Pipeline main started"}
{:timestamp=>"2016-07-12T08:07:47.692000+0000", :message=>"Pipeline main has been shutdown"}
{:timestamp=>"2016-07-12T08:07:50.585000+0000", :message=>"stopping pipeline", :id=>"main"}
So i have the same issue when i deploy in kubernetes and can t use docker-compose. 所以当我在kubernetes中部署并且不能使用docker-compose时,我有同样的问题。
I've just faced with similar problem. 我刚遇到类似的问题。
Without -ti
没有
-ti
# docker run --rm logstash:2.3.4 logstash --debug --verbose -e 'input { stdin { } } output { stdout { } }'
{:timestamp=>"2016-08-03T03:24:48.618000+0000", :message=>"starting agent", :level=>:info}
{:timestamp=>"2016-08-03T03:24:48.629000+0000", :message=>"starting pipeline", :id=>"main", :level=>:info}
{:timestamp=>"2016-08-03T03:24:48.816000+0000", :message=>"Starting pipeline", :id=>"main", :pipeline_workers=>1, :batch_size=>125, :batch_delay=>5, :max_inflight=>125, :level=>:info}
{:timestamp=>"2016-08-03T03:24:48.827000+0000", :message=>"Pipeline main started"}
{:timestamp=>"2016-08-03T03:24:48.848000+0000", :message=>"Input plugins stopped! Will shutdown filter/output workers.", :level=>:info}
{:timestamp=>"2016-08-03T03:24:48.953000+0000", :message=>"Pipeline main has been shutdown"}
{:timestamp=>"2016-08-03T03:24:51.834000+0000", :message=>"stopping pipeline", :id=>"main"}
{:timestamp=>"2016-08-03T03:24:51.843000+0000", :message=>"Closing inputs", :level=>:info}
{:timestamp=>"2016-08-03T03:24:51.844000+0000", :message=>"Closed inputs", :level=>:info}
With -ti
随着
-ti
# docker run -ti --rm logstash:2.3.4 logstash --debug --verbose -e 'input { stdin { } } output { stdout { } }'
starting agent {:level=>:info}
starting pipeline {:id=>"main", :level=>:info}
Settings: Default pipeline workers: 1
Starting pipeline {:id=>"main", :pipeline_workers=>1, :batch_size=>125, :batch_delay=>5, :max_inflight=>125, :level=>:info}
Pipeline main started
^CSIGINT received. Shutting down the agent. {:level=>:warn}
stopping pipeline {:id=>"main"}
Closing inputs {:level=>:info}
Closed inputs {:level=>:info}
^CSIGINT received. Terminating immediately.. {:level=>:fatal}
Looks like you don't have any configured inputs other then stdin
. 看起来除了
stdin
你没有任何已配置的输入。
So if you start it using composer you have to set tty: true
因此,如果你使用composer启动它,你必须设置
tty: true
# cat docker-compose.yml
version: '2'
services:
logstash:
image: logstash:2.3.4
command: logstash --verbose --debug
tty: true
Result will be 结果将是
# docker logs -f sync_logstash_1
starting agent {:level=>:info}
starting pipeline {:id=>"main", :level=>:info}
Settings: Default pipeline workers: 1
Starting pipeline {:id=>"main", :pipeline_workers=>1, :batch_size=>125, :batch_delay=>5, :max_inflight=>125, :level=>:info}
Pipeline main started
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.