Skip to content

Instantly share code, notes, and snippets.

@ton-katsu
Created November 6, 2012 06:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ton-katsu/4023148 to your computer and use it in GitHub Desktop.
Save ton-katsu/4023148 to your computer and use it in GitHub Desktop.
fluentd IPv6 test

ruby version

# ruby --version
ruby 1.9.2p320 (2012-04-20 revision 35421) [x86_64-linux]

td-agent version

# rpm -qa | grep td-agent
td-agent-1.1.9-0.x86_64

td-agent Server settings

config

<source>
  type forward
  port 24224
  bind ::
  tag apache.access
</source>

server listen check

# netstat -lnpt | grep ruby
tcp        0      0 :::8888                     :::*                        LISTEN      26602/ruby
tcp        0      0 :::24224                    :::*                        LISTEN      26602/ruby

client telnet test

# telnet fd00:ca:0:10:5054:feff:fe38:27f6 24224
Trying fd00:ca:0:10:5054:feff:fe38:27f6...
Connected to fd00:ca:0:10:5054:feff:fe38:27f6.
Escape character is '^]'.
^]
telnet> quit
Connection closed.

td-agent Clinet settings

IPv4 -> OK

config

<server>
  host xxx.xxx.xxx.xxx
  port 24224
  weight 60
</server>

td-agent starting log

2012-11-05 17:16:41 +0900: fluent/supervisor.rb:153:supervise: starting fluentd-0.10.25
2012-11-05 17:16:41 +0900: fluent/supervisor.rb:235:read_config: reading config file path="/etc/td-agent/td-agent.conf"
2012-11-05 17:16:41 +0900: fluent/engine.rb:63:block in configure: adding source type="tail"
2012-11-05 17:16:41 +0900: plugin/in_tail.rb:49:configure: 'pos_file PATH' parameter is not set to a 'tail' source.
2012-11-05 17:16:41 +0900: plugin/in_tail.rb:50:configure: this parameter is highly recommended to save the position to resume tailing.
2012-11-05 17:16:41 +0900: fluent/engine.rb:79:block in configure: adding match pattern="apache.access" type="forward"
2012-11-05 17:16:41 +0900: plugin/out_forward.rb:79:block in configure: adding forwarding server 'xxxxxxx' host="xxx.xxx.xxx.xxx" port=24224 weight=60
2012-11-05 17:16:41 +0900: plugin/out_forward.rb:152:rebuild_weight_array: rebuilding weight array lost_weight=0
2012-11-05 17:16:41 +0900: plugin/in_tail.rb:262:initialize: following tail of /usr/local/apache/logs/access_log

IPv6 -> NG

test 1 config

<server>
  host fd00:ca:0:10:5054:feff:fe38:27f6
  port 24224
  weight 60
</server>

test 1 result , td-agent log

2012-11-05 17:17:57 +0900: fluent/supervisor.rb:153:supervise: starting fluentd-0.10.25
2012-11-05 17:17:57 +0900: fluent/supervisor.rb:235:read_config: reading config file path="/etc/td-agent/td-agent.conf"
2012-11-05 17:17:57 +0900: fluent/engine.rb:63:block in configure: adding source type="tail"
2012-11-05 17:17:57 +0900: plugin/in_tail.rb:49:configure: 'pos_file PATH' parameter is not set to a 'tail' source.
2012-11-05 17:17:57 +0900: plugin/in_tail.rb:50:configure: this parameter is highly recommended to save the position to resume tailing.
2012-11-05 17:17:57 +0900: fluent/engine.rb:79:block in configure: adding match pattern="apache.access" type="forward"
2012-11-05 17:17:57 +0900: plugin/out_forward.rb:79:block in configure: adding forwarding server 'xxxxxxx' host="fd00:ca:0:10:5054:feff:fe38:27f6" port=24224 weight=60
2012-11-05 17:17:57 +0900: plugin/out_forward.rb:152:rebuild_weight_array: rebuilding weight array lost_weight=0
2012-11-05 17:17:57 +0900: plugin/in_tail.rb:262:initialize: following tail of /usr/local/apache/logs/access_log
2012-11-05 17:17:58 +0900: plugin/out_forward.rb:246:rescue in block in on_timer: failed to send heartbeat packet to fd00:ca:0:10:5054:feff:fe38:27f6:24224 error="Address family not supported by protocol - send(2)"
2012-11-05 17:17:59 +0900: plugin/out_forward.rb:246:rescue in block in on_timer: failed to send heartbeat packet to fd00:ca:0:10:5054:feff:fe38:27f6:24224 error="Address family not supported by protocol - send(2)"
2012-11-05 17:18:00 +0900: plugin/out_forward.rb:246:rescue in block in on_timer: failed to send heartbeat packet to fd00:ca:0:10:5054:feff:fe38:27f6:24224 error="Address family not supported by protocol - send(2)"
2012-11-05 17:18:01 +0900: plugin/out_forward.rb:246:rescue in block in on_timer: failed to send heartbeat packet to fd00:ca:0:10:5054:feff:fe38:27f6:24224 error="Address family not supported by protocol - send(2)"
2012-11-05 17:18:02 +0900: plugin/out_forward.rb:246:rescue in block in on_timer: failed to send heartbeat packet to fd00:ca:0:10:5054:feff:fe38:27f6:24224 error="Address family not supported by protocol - send(2)"
2012-11-05 17:18:03 +0900: plugin/out_forward.rb:246:rescue in block in on_timer: failed to send heartbeat packet to fd00:ca:0:10:5054:feff:fe38:27f6:24224 error="Address family not supported by protocol - send(2)"

test 2 config

<server>
  host [fd00:ca:0:10:5054:feff:fe38:27f6]
  port 24224
  weight 60
</server>

test2 result , td-agent starting log

# /etc/init.d/td-agent start
Starting td-agent: 2012-11-05 17:20:26 +0900: fluent/supervisor.rb:196:rescue in main_process: unexpected error error="getaddrinfo: Name or service not known"
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/plugin/out_forward.rb:75:in `pack_sockaddr_in'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/plugin/out_forward.rb:75:in `block in configure'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/plugin/out_forward.rb:57:in `each'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/plugin/out_forward.rb:57:in `configure'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/engine.rb:82:in `block in configure'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/engine.rb:71:in `each'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/engine.rb:71:in `configure'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/engine.rb:49:in `parse_config'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/supervisor.rb:247:in `run_configure'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/supervisor.rb:88:in `block in start'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/supervisor.rb:180:in `call'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/supervisor.rb:180:in `main_process'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/supervisor.rb:155:in `block in supervise'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/supervisor.rb:154:in `fork'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/supervisor.rb:154:in `supervise'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/supervisor.rb:83:in `start'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/command/fluentd.rb:128:in `<top (required)>'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/bin/fluentd:6:in `<top (required)>'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/bin/fluentd:23:in `load'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/lib64/fluent/ruby/bin/fluentd:23:in `<top (required)>'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/sbin/td-agent:5:in `load'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:197:rescue in main_process: /usr/sbin/td-agent:5:in `<main>'
                                                           [失敗]

td-agent log

2012-11-05 17:20:26 +0900: fluent/supervisor.rb:153:supervise: starting fluentd-0.10.25
2012-11-05 17:20:26 +0900: fluent/supervisor.rb:235:read_config: reading config file path="/etc/td-agent/td-agent.conf"
2012-11-05 17:20:26 +0900: fluent/engine.rb:63:block in configure: adding source type="tail"
2012-11-05 17:20:26 +0900: plugin/in_tail.rb:49:configure: 'pos_file PATH' parameter is not set to a 'tail' source.
2012-11-05 17:20:26 +0900: plugin/in_tail.rb:50:configure: this parameter is highly recommended to save the position to resume tailing.
2012-11-05 17:20:26 +0900: fluent/engine.rb:79:block in configure: adding match pattern="apache.access" type="forward"
2012-11-05 17:20:26 +0900: fluent/supervisor.rb:192:rescue in main_process: unexpected error error="getaddrinfo: Name or service not known"
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/plugin/out_forward.rb:75:in `pack_sockaddr_in'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/plugin/out_forward.rb:75:in `block in configure'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/plugin/out_forward.rb:57:in `each'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/plugin/out_forward.rb:57:in `configure'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/engine.rb:82:in `block in configure'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/engine.rb:71:in `each'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/engine.rb:71:in `configure'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/engine.rb:49:in `parse_config'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/supervisor.rb:247:in `run_configure'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/supervisor.rb:88:in `block in start'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/supervisor.rb:180:in `call'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/supervisor.rb:180:in `main_process'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/supervisor.rb:155:in `block in supervise'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/supervisor.rb:154:in `fork'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/supervisor.rb:154:in `supervise'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/supervisor.rb:83:in `start'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/lib/fluent/command/fluentd.rb:128:in `<top (required)>'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.25/bin/fluentd:6:in `<top (required)>'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/lib64/fluent/ruby/bin/fluentd:23:in `load'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/lib64/fluent/ruby/bin/fluentd:23:in `<top (required)>'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/sbin/td-agent:5:in `load'
  2012-11-05 17:20:26 +0900: fluent/supervisor.rb:193:rescue in main_process: /usr/sbin/td-agent:5:in `<main>'
2012-11-05 17:20:26 +0900: fluent/supervisor.rb:170:supervise: process finished code=256
2012-11-05 17:20:26 +0900: fluent/supervisor.rb:173:supervise: process died within 1 second. exit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment