Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

プラグインの設定を入れると、「process finished code=6」で落ちます #3

Closed
m-masaki opened this issue May 2, 2013 · 9 comments
Assignees

Comments

@m-masaki
Copy link

m-masaki commented May 2, 2013

お忙しいところ失礼します。
m-masakiと申します。

CentOS6.4にてtd-agentをインストールして、fluentdを使用しています。
通常は起動できるのですが、

このプラグインを試してみようと思い、以下の設定を入れたところ、起動した瞬間にプロセスが落ちてしまいまして、ちょっと困っています。

以下の<source>~</source>をコメントアウトしますと、普通に起動できます。
td-agent.logの内容も以下に書いておりますが、「process finished code=6」と出てますが、調べたのですが、よくわかりません...

もしご存知であれば、何か情報等はありませんでしょうか?
こちらの情報で不足ありましたら、別途書きますので、よろしくお願いします。

■td-agent.confの内容

type twitter consumer_key ・・・・・・・・・・ consumer_secret ・・・・・・・・・・ oauth_token ・・・・・・・・・・ oauth_token_secret ・・・・・・・・・・ tag debug.twitter timeline userstream lang ja,en output_format flat

■td-agent.logの内容
2013-05-02 18:50:30 +0900: twitter: starting Twitter Streaming API for userstream. tag:debug.twitter lang:ja,en
2013-05-02 18:50:30 +0900: process finished code=6
2013-05-02 18:50:30 +0900: process died within 1 second. exit.

@y-ken
Copy link
Owner

y-ken commented May 2, 2013

ご利用頂きありがとうございます。
後ほど、再現テストをこちらでも行ってみます。

なお、次回からで良いので、英語で頂けると(特にpullreq)
同様の問題が起きた海外の方にも参考になる情報となるため、大変助かります。

@y-ken
Copy link
Owner

y-ken commented May 2, 2013

process finished code=6というと、以下のコードの170行目から出力されているものですね。
/usr/lib64/fluent/ruby/lib/ruby/gems/1.9.1/gems/fluentd-0.10.32/lib/fluent/supervisor.rb

残念ながら、こちらの環境では再現しないようです。
以下のように、期待通りの動作となりました。

その現象が起きる依存gemのバージョンの組み合わせを教えて頂けますか?
また、consumer_(key|secret)やoauth_(token|token_secret)が間違っていないか確認頂けますか?
はたまた、完全な山勘ですが、稼働させているマシンの時計がずれているという事はありますか?
もし必要であれば、単体テスト用のプログラムがあるのでgistに上げます。

依存gemのバージョン

$ /usr/lib64/fluent/ruby/bin/gem list | grep tw
em-twitter (0.2.1)
tweetstream (2.4.0, 2.3.0)
twitter (4.6.0, 4.5.0, 4.4.0, 4.2.0, 4.1.0, 4.0.0)

td-agent.conf 抜粋

<source>
  type twitter
  consumer_key        ********************
  consumer_secret     *****************************************
  oauth_token         **************************************************
  oauth_token_secret  ******************************************
  tag debug.twitter.userstream
  timeline userstream
  lang ja,en
  output_format flat
</source>

ログ出力

$ tail  /var/log/td-agent/td-agent.log
2013-05-02 23:40:12 +0900 [info]: listening fluent socket on 0.0.0.0:24224
2013-05-02 23:40:12 +0900 [info]: twitter: starting Twitter Streaming API for userstream. tag:debug.twitter.userstream lang:ja,en
2013-05-02 23:41:59 +0900 debug.twitter.userstream: {"created_at":"Thu May 02 14:41:59 +0000 2013","id":329969018867957761,"id_str":"329969018867957761","text":"しまった! 乗り過ごした。 折り返し・・・","source":"<a href=\"https://sites.google.com/site/tweentwitterclient/\" rel=\"nofollow\">Tween</a>","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user_id":79693483,"user_id_str":"79693483","user_name":"K.Namba/SIerは衰退しました","user_screen_name":"ipv6labs","user_location":"2001:240:6b0:feed::/64","user_url":"http://negi.ipv6labs.jp/","user_description":"System Architect for Solaris, BSD, Linux, Windows and Network devices.  This is personal tweets at twitter.  There tweets or comments are No-Official.","user_protected":false,"user_followers_count":1796,"user_friends_count":470,"user_listed_count":203,"user_created_at":"Sun Oct 04 09:18:25 +0000 2009","user_favourites_count":115,"user_utc_offset":32400,"user_time_zone":"Tokyo","user_geo_enabled":false,"user_verified":false,"user_statuses_count":77272,"user_lang":"ja","user_contributors_enabled":false,"user_is_translator":false,"user_profile_background_color":"B2DFDA","user_profile_background_image_url":"http://a0.twimg.com/images/themes/theme13/bg.gif","user_profile_background_image_url_https":"https://si0.twimg.com/images/themes/theme13/bg.gif","user_profile_background_tile":false,"user_profile_image_url":"http://a0.twimg.com/profile_images/1372890511/World_IPv6_Day_mikufox_tw_normal.png","user_profile_image_url_https":"https://si0.twimg.com/profile_images/1372890511/World_IPv6_Day_mikufox_tw_normal.png","user_profile_link_color":"93A644","user_profile_sidebar_border_color":"EEEEEE","user_profile_sidebar_fill_color":"FFFFFF","user_profile_text_color":"333333","user_profile_use_background_image":true,"user_default_profile":false,"user_default_profile_image":false,"user_following":null,"user_follow_request_sent":null,"user_notifications":null,"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"entities_hashtags":[],"entities_symbols":[],"entities_urls":[],"entities_user_mentions":[],"favorited":false,"retweeted":false,"filter_level":"medium","lang":"ja"}
2013-05-02 23:42:23 +0900 debug.twitter.userstream: {"created_at":"Thu May 02 14:42:23 +0000 2013","id":329969120965701632,"id_str":"329969120965701632","text":"(´・ω・`)","source":"<a href=\"https://sites.google.com/site/tweentwitterclient/\" rel=\"nofollow\">Tween</a>","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user_id":79693483,"user_id_str":"79693483","user_name":"K.Namba/SIerは衰退しました","user_screen_name":"ipv6labs","user_location":"2001:240:6b0:feed::/64","user_url":"http://negi.ipv6labs.jp/","user_description":"System Architect for Solaris, BSD, Linux, Windows and Network devices.  This is personal tweets at twitter.  There tweets or comments are No-Official.","user_protected":false,"user_followers_count":1796,"user_friends_count":470,"user_listed_count":203,"user_created_at":"Sun Oct 04 09:18:25 +0000 2009","user_favourites_count":115,"user_utc_offset":32400,"user_time_zone":"Tokyo","user_geo_enabled":false,"user_verified":false,"user_statuses_count":77273,"user_lang":"ja","user_contributors_enabled":false,"user_is_translator":false,"user_profile_background_color":"B2DFDA","user_profile_background_image_url":"http://a0.twimg.com/images/themes/theme13/bg.gif","user_profile_background_image_url_https":"https://si0.twimg.com/images/themes/theme13/bg.gif","user_profile_background_tile":false,"user_profile_image_url":"http://a0.twimg.com/profile_images/1372890511/World_IPv6_Day_mikufox_tw_normal.png","user_profile_image_url_https":"https://si0.twimg.com/profile_images/1372890511/World_IPv6_Day_mikufox_tw_normal.png","user_profile_link_color":"93A644","user_profile_sidebar_border_color":"EEEEEE","user_profile_sidebar_fill_color":"FFFFFF","user_profile_text_color":"333333","user_profile_use_background_image":true,"user_default_profile":false,"user_default_profile_image":false,"user_following":null,"user_follow_request_sent":null,"user_notifications":null,"geo":null,"coordinates":null,"place":null,"contributors":null,"retweet_count":0,"favorite_count":0,"entities_hashtags":[],"entities_symbols":[],"entities_urls":[],"entities_user_mentions":[],"favorited":false,"retweeted":false,"filter_level":"medium","lang":"ja"}

@ghost ghost assigned y-ken May 2, 2013
@m-masaki
Copy link
Author

m-masaki commented May 7, 2013

連休で返答遅くなりまして申し訳ございません。

なお、次回からで良いので、英語で頂けると(特にpullreq)
同様の問題が起きた海外の方にも参考になる情報となるため、大変助かります。

英語で書くのがマナーとわかってはおりますが、何分不得意で申し訳ございませんでした。

その現象が起きる依存gemのバージョンの組み合わせを教えて頂けますか?

/usr/lib64/fluent/ruby/bin/gem list | grep tw
em-twitter (0.2.2)
fluent-plugin-twitter (0.2.2)
tweetstream (2.5.0)
twitter (4.6.2)

また、consumer_(key|secret)やoauth_(token|token_secret)が間違っていないか確認頂けますか?

何度も確認しましたが、間違っておりません。
念のためphpの「twitteroauth」にて、API経由でツイートできる事は確認しております。

はたまた、完全な山勘ですが、稼働させているマシンの時計がずれているという事はありますか?

こちらも合ってます。

お手数をおかけしてすみません。

@y-ken
Copy link
Owner

y-ken commented May 7, 2013

ご確認ありがとうございます。新しいgemとの組み合わせによる不具合の可能性があります。
試しに、当方の開発環境と同一バージョンの組み合わせにて、動作確認のご協力をお願いできますでしょうか。

  • em-twitter (0.2.1)
  • tweetstream (2.4.0)
  • twitter (4.6.0)
$ sudo /usr/lib64/fluent/ruby/bin/gem uninstall em-twitter
$ sudo /usr/lib64/fluent/ruby/bin/gem uninstall tweetstream
$ sudo /usr/lib64/fluent/ruby/bin/gem uninstall twitter
$ sudo /usr/lib64/fluent/ruby/bin/gem install em-twitter -v='0.2.1'
$ sudo /usr/lib64/fluent/ruby/bin/gem install tweetstream -v='2.4.0'
$ sudo /usr/lib64/fluent/ruby/bin/gem install twitter -v='4.6.0'

@m-masaki
Copy link
Author

m-masaki commented May 7, 2013

遅くなって申し訳ありません。
以下の様にバージョンを合わせて確認してみましたが、同様の症状でおちてしまいます。

/usr/lib64/fluent/ruby/bin/gem list | grep tw
em-twitter (0.2.1)
fluent-plugin-twitter (0.2.2)
tweetstream (2.4.0)
twitter (4.6.0)

tail -f /var/log/td-agent/td-agent.log
2013-05-07 19:01:02 +0900: listening fluent socket on 0.0.0.0:24224
2013-05-07 19:01:02 +0900: twitter: starting Twitter Streaming API for userstream. tag:debug.twitter lang:ja,en
2013-05-07 19:01:02 +0900: process finished code=6
2013-05-07 19:01:02 +0900: process died within 1 second. exit.

@y-ken
Copy link
Owner

y-ken commented May 7, 2013

これは予想以上に難航しそうな香りがします。
単体テスト用のRubyコードを用意しますので、しばしお待ち頂ければと思います。
その間に、別のマシン(別のサーバ等)で同様の現象が起きるか試して頂くことは出来ますか?

@m-masaki
Copy link
Author

m-masaki commented May 8, 2013

少し古いサーバしかなかったのですが、CentOS5.7(386)にて、td-agentを入れて試したところ、新バージョンでも落ちずに動きました。

サーバ環境の問題ですかね..

/usr/lib/fluent/ruby/bin/gem list | grep tw
em-twitter (0.2.2)
fluent-plugin-twitter (0.2.2)
tweetstream (2.5.0)
twitter (4.6.2)

@y-ken
Copy link
Owner

y-ken commented Dec 4, 2013

大変お待たせしました。類似の事例があり、再現できる環境が用意できましたので確認しました。
どうやらopenssl-develが無い環境ではeventmachineの機能に制限が掛かり、落ちるようです。
次のコマンドを実行し、再度動作確認お願いできますでしょうか?

$ sudo yum install openssl-devel
$ sudo /usr/lib/fluent/ruby/bin/gem install eventmachine #上書き再インストール

@y-ken
Copy link
Owner

y-ken commented Oct 28, 2014

@m-masaki さま

こちらのチケット、クローズします。
また何かございましたらお知らせください。

@y-ken y-ken closed this as completed Oct 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants