2016-06-09 2 views
0

Fluentd + ElasticSearch + Kibana 이온 작업 중입니다. td-agent.log는 stdout을 사용합니다. td-agent를 시작하면 td-agent 로그에 오류가 표시됩니다.예기치 않은 오류 error_class = Errno :: EADDRINUSE 오류 = "주소가 이미 사용 중입니다."0.0.0.0 "포트에 대해 bind (2) 포트 24233"

2016-06-09 12:21:36 +0530 [info]: Worker 0 finished unexpectedly with status 1 
2016-06-09 12:21:37 +0530 [info]: reading config file path="/etc/td-agent/td-agent.conf" 
2016-06-09 12:21:37 +0530 [info]: starting fluentd-0.14.0 without supervision 
2016-06-09 12:21:37 +0530 [info]: gem 'fluent-mixin-config-placeholders' version '0.4.0' 
2016-06-09 12:21:37 +0530 [info]: gem 'fluent-mixin-config-placeholders' version '0.3.1' 
2016-06-09 12:21:37 +0530 [info]: gem 'fluent-mixin-plaintextformatter' version '0.2.6' 
2016-06-09 12:21:37 +0530 [info]: gem 'fluent-plugin-elasticsearch' version '1.5.0' 
2016-06-09 12:21:37 +0530 [info]: gem 'fluent-plugin-grok-parser' version '0.3.1' 
2016-06-09 12:21:37 +0530 [info]: gem 'fluent-plugin-mongo' version '0.7.13' 
2016-06-09 12:21:37 +0530 [info]: gem 'fluent-plugin-mongo' version '0.7.12' 
2016-06-09 12:21:37 +0530 [info]: gem 'fluent-plugin-mysql' version '0.1.3' 
2016-06-09 12:21:37 +0530 [info]: gem 'fluent-plugin-mysql-query' version '0.3.0' 
2016-06-09 12:21:37 +0530 [info]: gem 'fluent-plugin-mysql-replicator' version '0.5.2' 
2016-06-09 12:21:37 +0530 [info]: gem 'fluent-plugin-rewrite-tag-filter' version '1.5.5' 
2016-06-09 12:21:37 +0530 [info]: gem 'fluent-plugin-s3' version '0.6.8' 
2016-06-09 12:21:37 +0530 [info]: gem 'fluent-plugin-s3' version '0.6.5' 
2016-06-09 12:21:37 +0530 [info]: gem 'fluent-plugin-scribe' version '0.10.14' 
2016-06-09 12:21:37 +0530 [info]: gem 'fluent-plugin-secure-forward' version '0.4.1' 
2016-06-09 12:21:37 +0530 [info]: gem 'fluent-plugin-snmp' version '0.0.8' 
2016-06-09 12:21:37 +0530 [info]: gem 'fluent-plugin-tail-ex' version '0.1.1' 
2016-06-09 12:21:37 +0530 [info]: gem 'fluent-plugin-td' version '0.10.28' 
2016-06-09 12:21:37 +0530 [info]: gem 'fluent-plugin-td-monitoring' version '0.2.2' 
2016-06-09 12:21:37 +0530 [info]: gem 'fluent-plugin-webhdfs' version '0.4.1' 
2016-06-09 12:21:37 +0530 [info]: gem 'fluentd' version '0.14.0' 
2016-06-09 12:21:37 +0530 [info]: gem 'fluentd' version '0.12.20' 
2016-06-09 12:21:37 +0530 [warn]: 'type' is deprecated parameter name. use '@type' instead. 
2016-06-09 12:21:37 +0530 [info]: adding match pattern="replicator.*" type="stdout" 
2016-06-09 12:21:37 +0530 [warn]: 'type' is deprecated parameter name. use '@type' instead. 
2016-06-09 12:21:37 +0530 [info]: adding source type="forward" 
2016-06-09 12:21:37 +0530 [warn]: 'type' is deprecated parameter name. use '@type' instead. 
2016-06-09 12:21:37 +0530 [info]: adding source type="http" 
2016-06-09 12:21:37 +0530 [warn]: 'type' is deprecated parameter name. use '@type' instead. 
2016-06-09 12:21:37 +0530 [info]: adding source type="debug_agent" 
2016-06-09 12:21:37 +0530 [warn]: 'type' is deprecated parameter name. use '@type' instead. 
2016-06-09 12:21:37 +0530 [info]: adding source type="mysql_replicator" 
2016-06-09 12:21:37 +0530 [info]: adding mysql_replicator worker. :tag=>replicator.livechat.chat_chennaibox.${event}.${primary_key} :query=>SELECT chat_name FROM chat_chennaibox; :prepared_query=> :interval=>10sec :enable_delete=>true 
2016-06-09 12:21:37 +0530 [info]: using configuration file: <ROOT> 
    <source> 
    type forward 
    </source> 
    <source> 
    type http 
    port 8888 
    </source> 
    <source> 
    type debug_agent 
    bind "0.0.0.0" 
    port 24233 
    </source> 
    <source> 
    type mysql_replicator 
    host "localhost" 
    username "root" 
    password xxxxxx 
    database "livechat" 
    query "SELECT chat_name FROM chat_chennaibox;" 
    primary_key "chat_id" 
    interval "10s" 
    enable_delete yes 
    tag "replicator.livechat.chat_chennaibox.${event}.${primary_key}" 
    </source> 
    <match replicator.*> 
    type stdout 
    </match> 
</ROOT> 
2016-06-09 12:21:37 +0530 [warn]: super was not called in #start: called it forcedly plugin=Fluent::MysqlReplicatorInput 
2016-06-09 12:21:37 +0530 [info]: listening dRuby uri="druby://0.0.0.0:24233" object="Engine" 
2016-06-09 12:21:37 +0530 [error]: unexpected error error_class=Errno::EADDRINUSE error="Address already in use - bind(2) for \"0.0.0.0\" port 24233" 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/2.1.0/drb/drb.rb:879:in `initialize' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/2.1.0/drb/drb.rb:879:in `open' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/2.1.0/drb/drb.rb:879:in `open_server' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/2.1.0/drb/drb.rb:764:in `block in open_server' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/2.1.0/drb/drb.rb:762:in `each' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/2.1.0/drb/drb.rb:762:in `open_server' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/2.1.0/drb/drb.rb:1373:in `initialize' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.0/lib/fluent/plugin/in_debug_agent.rb:55:in `new' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.0/lib/fluent/plugin/in_debug_agent.rb:55:in `start' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.0/lib/fluent/compat/call_super_mixin.rb:42:in `start' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.0/lib/fluent/root_agent.rb:138:in `block in start' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.0/lib/fluent/root_agent.rb:127:in `block (2 levels) in lifecycle' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.0/lib/fluent/root_agent.rb:126:in `each' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.0/lib/fluent/root_agent.rb:126:in `block in lifecycle' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.0/lib/fluent/root_agent.rb:113:in `each' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.0/lib/fluent/root_agent.rb:113:in `lifecycle' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.0/lib/fluent/root_agent.rb:137:in `start' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.0/lib/fluent/engine.rb:211:in `start' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.0/lib/fluent/engine.rb:175:in `run' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.0/lib/fluent/supervisor.rb:580:in `run_engine' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.0/lib/fluent/supervisor.rb:382:in `block in run_worker' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.0/lib/fluent/supervisor.rb:509:in `call' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.0/lib/fluent/supervisor.rb:509:in `main_process' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.0/lib/fluent/supervisor.rb:378:in `run_worker' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.0/lib/fluent/command/fluentd.rb:266:in `<top (required)>' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:69:in `require' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:69:in `require' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/lib/ruby/gems/2.1.0/gems/fluentd-0.14.0/bin/fluentd:5:in `<top (required)>' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/bin/fluentd:23:in `load' 
    2016-06-09 12:21:37 +0530 [error]: /opt/td-agent/embedded/bin/fluentd:23:in `<top (required)>' 
    2016-06-09 12:21:37 +0530 [error]: /usr/sbin/td-agent:7:in `load' 
    2016-06-09 12:21:37 +0530 [error]: /usr/sbin/td-agent:7:in `<main>' 
2016-06-09 12:21:37 +0530 [error]: unexpected error error="Address already in use - bind(2) for \"0.0.0.0\" port 24233" 
    2016-06-09 12:21:37 +0530 [error]: suppressed same stacktrace 

이 내 구성 파일입니다 :

#### 
## Output descriptions: 
## 

# Treasure Data (http://www.treasure-data.com/) provides cloud based data 
# analytics platform, which easily stores and processes data from td-agent. 
# FREE plan is also provided. 
# @see http://docs.fluentd.org/articles/http-to-td 
# 
# This section matches events whose tag is td.DATABASE.TABLE 
#<match td.*.*> 
# type tdlog 
# apikey YOUR_API_KEY 

# auto_create_table 
# buffer_type file 
# buffer_path /var/log/td-agent/buffer/td 

# <secondary> 
# type file 
# path /var/log/td-agent/failed_records 
# </secondary> 
#</match> 

## match tag=debug.** and dump to console 
#<match debug.**> 
# type stdout 
#</match> 

#### 
## Source descriptions: 
## 

## built-in TCP input 
## @see http://docs.fluentd.org/articles/in_forward 
<source> 
    type forward 
</source> 

## built-in UNIX socket input 
#<source> 
# type unix 
#</source> 

# HTTP input 
# POST http://localhost:8888/<tag>?json=<json> 
# POST http://localhost:8888/td.myapp.login?json={"user"%3A"me"} 
# @see http://docs.fluentd.org/articles/in_http 
<source> 
    type http 
    port 8888 
</source> 

## live debugging agent 
<source> 
    type debug_agent 
    bind 0.0.0.0 
    #port 24230 
    port 24233 
</source> 

#### 
## Examples: 
## 

## File input 
## read apache logs continuously and tags td.apache.access 
#<source> 
# type tail 
# format apache 
# path /var/log/httpdaccess.log 
# tag td.apache.access 
#</source> 

## File output 
## match tag=local.** and write to file 
#<match local.**> 
# type file 
# path /var/log/td-agent/apache.log 
#</match> 

## Forwarding 
## match tag=system.** and forward to another td-agent server 
#<match system.**> 
# type forward 
# host 192.168.0.11 
# # secondary host is optional 
# <secondary> 
# host 192.168.0.12 
# </secondary> 
#</match> 

## Multiple output 
## match tag=td.*.* and output to Treasure Data AND file 
#<match td.*.*> 
# type copy 
# <store> 
# type tdlog 
# apikey API_KEY 
# auto_create_table 
# buffer_type file 
# buffer_path /var/log/td-agent/buffer/td 
# </store> 
# <store> 
# type file 
# path /var/log/td-agent/td-%Y-%m-%d/%H.log 
# </store> 
#</match> 
#<source> 
# @type tail 
# format apache 
# tag apache.access 
# path /var/log/td-agent/apache_log/ssl_access_log.1 
# read_from_head true 
# pos_file /var/log/httpd/access_log.pos 
#</source> 
#<match apache.access*> 
# type stdout 
#</match> 

#<source> 
# @type tail 
# format magento_system 
# tag magento.access 
# path /var/log/td-agent/Magento_log/system.log 
# pos_file /tmp/fluentd_magento_system.pos 
# read_from_head true 
#</source> 

#<match apache.access 
# type stdout 
#</match> 
#<source> 
# @type http 
# port 8080 
# bind localhost 
# body_size_limit 32m 
# keepalive_timeout 10s 
#</source> 
#<match magento.access*> 
# type stdout 
#</match> 
#<match magento.access*> 
# @type elasticsearch 
# logstash_format true 
# host localhost 
# port 9200 
#</match> 
<source> 
    type mysql_replicator 
    host localhost 
    username root 
    password gworks.mobi2 
    database livechat 
    query SELECT chat_name FROM chat_chennaibox; 
    #query SELECT t2.firstname,t2.lastname, t1.* FROM status t1 INNER JOIN student_detail t2 ON t1.number = t2.number; 
    primary_key chat_id # specify unique key (default: id) 
    interval 10s # execute query interval (default: 1m) 
    enable_delete yes 
    tag replicator.livechat.chat_chennaibox.${event}.${primary_key} 
</source> 
<match replicator.*> 
type stdout 
</match> 

은 내가 잘못 나 제안

이 내 오류가? 어떻게이 문제를 해결할 수 있습니까?

답변

1

내 문제가 해결되었습니다. 내 문제는 여러 PID를 실행하는 루비입니다. 모든 루비 실행 포트 다음 명령 show 위

ps aux | grep ruby 

모든 프로세스를 종료 :

그래서, 루비 PID의이 명령을 사용하여 실행 알아보십시오. 그런 다음 td-agent를 실행하십시오. 나를 위해 일합니다.

1

게시물 제목에 이유가 나와 있습니다 : 주소가 이미 포트 24233에 사용 중입니다. lsof 명령이나 다른 명령으로 포트 24233을 사용하는 프로세스를 검색 한 다음 종료하십시오.

+0

네, 프로세스를 죽이지 만 동일한 프로세스가 다른 포트에서 실행됩니다. –

+0

@Satoshi Tagomori를 지원해 주셔서 감사합니다. 이제 제 문제를 해결합니다. –