2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

コンテナ内でfluentd実行したら"unexpected error error_class=Errno::EADDRINUSE"でエラッた話

Posted at

はじめに

書いた記事の続き?にあたるもの
https://qiita.com/arata-honda/items/03d6da7c9f84f67466a9

エラー内容


2020-02-17 11:21:26 +0900 [error]: #0 suppressed same stacktrace
2020-02-17 11:21:26 +0900 [info]: Worker 0 finished unexpectedly with status 1
2020-02-17 11:21:26 +0900 [info]: adding match in @mainstream pattern="docker.**" type="file"
2020-02-17 11:21:26 +0900 [warn]: #0 [output_docker1] 'time_format' specified without 'time_key', will be ignored
2020-02-17 11:21:26 +0900 [info]: adding match in @mainstream pattern="**" type="file"
2020-02-17 11:21:26 +0900 [warn]: #0 [output1] 'time_format' specified without 'time_key', will be ignored
2020-02-17 11:21:26 +0900 [info]: adding filter pattern="**" type="stdout"
2020-02-17 11:21:26 +0900 [info]: adding source type="forward"
2020-02-17 11:21:26 +0900 [warn]: #0 define <match fluent.**> to capture fluentd logs in top level is deprecated. Use <label @FLUENT_LOG> instead
2020-02-17 11:21:26 +0900 [info]: #0 starting fluentd worker pid=204 ppid=34 worker=0
2020-02-17 11:21:26 +0900 [info]: #0 [input1] listening port port=24224 bind="0.0.0.0"
2020-02-17 11:21:26 +0900 [error]: #0 unexpected error error_class=Errno::EADDRINUSE error="Address in use - bind(2) for 0.0.0.0:24224"
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/lib/ruby/2.5.0/socket.rb:201:in `bind'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/lib/ruby/2.5.0/socket.rb:201:in `listen'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/lib/ruby/gems/2.5.0/gems/fluentd-1.9.2/lib/fluent/plugin_helper/server.rb:355:in `server_create_tcp_socket'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/lib/ruby/gems/2.5.0/gems/fluentd-1.9.2/lib/fluent/plugin_helper/server.rb:212:in `server_create_for_tcp_connection'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/lib/ruby/gems/2.5.0/gems/fluentd-1.9.2/lib/fluent/plugin_helper/server.rb:92:in `server_create_connection'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/lib/ruby/gems/2.5.0/gems/fluentd-1.9.2/lib/fluent/plugin/in_forward.rb:172:in `start'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/lib/ruby/gems/2.5.0/gems/fluentd-1.9.2/lib/fluent/root_agent.rb:200:in `block in start'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/lib/ruby/gems/2.5.0/gems/fluentd-1.9.2/lib/fluent/root_agent.rb:189:in `block (2 levels) in lifecycle'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/lib/ruby/gems/2.5.0/gems/fluentd-1.9.2/lib/fluent/root_agent.rb:188:in `each'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/lib/ruby/gems/2.5.0/gems/fluentd-1.9.2/lib/fluent/root_agent.rb:188:in `block in lifecycle'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/lib/ruby/gems/2.5.0/gems/fluentd-1.9.2/lib/fluent/root_agent.rb:175:in `each'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/lib/ruby/gems/2.5.0/gems/fluentd-1.9.2/lib/fluent/root_agent.rb:175:in `lifecycle'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/lib/ruby/gems/2.5.0/gems/fluentd-1.9.2/lib/fluent/root_agent.rb:199:in `start'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/lib/ruby/gems/2.5.0/gems/fluentd-1.9.2/lib/fluent/engine.rb:248:in `start'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/lib/ruby/gems/2.5.0/gems/fluentd-1.9.2/lib/fluent/engine.rb:147:in `run'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/lib/ruby/gems/2.5.0/gems/fluentd-1.9.2/lib/fluent/supervisor.rb:592:in `block in run_worker'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/lib/ruby/gems/2.5.0/gems/fluentd-1.9.2/lib/fluent/supervisor.rb:823:in `main_process'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/lib/ruby/gems/2.5.0/gems/fluentd-1.9.2/lib/fluent/supervisor.rb:586:in `run_worker'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/lib/ruby/gems/2.5.0/gems/fluentd-1.9.2/lib/fluent/command/fluentd.rb:338:in `<top (required)>'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/lib/ruby/gems/2.5.0/gems/fluentd-1.9.2/bin/fluentd:8:in `<top (required)>'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/bin/fluentd:23:in `load'
  2020-02-17 11:21:26 +0900 [error]: #0 /usr/bin/fluentd:23:in `<main>'
2020-02-17 11:21:26 +0900 [error]: #0 unexpected error error_class=Errno::EADDRINUSE error="Address in use - bind(2) for 0.0.0.0:24224"

エラー原因

ここら辺に近しい
psすると

/ # ps
PID   USER     TIME  COMMAND
    1 root      0:00 tini -- /bin/entrypoint.sh fluentd
    6 root      0:00 {fluentd} /usr/bin/ruby /usr/bin/fluentd -c /fluentd/etc/fluent.conf -p /fluentd/plugins
   20 root      0:00 /usr/bin/ruby -Eascii-8bit:ascii-8bit /usr/bin/fluentd -c /fluentd/etc/fluent.conf -p /fluentd/pl
   29 root      0:00 /bin/sh
  288 root      0:00 ps

すでにfluentdのプロセスがexecした時に起動されていてポート24224が使用されていたため

unexpected error error_class=Errno::EADDRINUSE error="Address in use - bind(2) for 0.0.0.0:24224"
のエラーがいっぱいでました。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?