许可优化
许可优化
产品
产品
解决方案
解决方案
服务支持
服务支持
关于
关于
软件库
当前位置:服务支持 >  软件文章 >  Fluent安装过程:详细步骤与注意事项

Fluent安装过程:详细步骤与注意事项

阅读数 3
点赞 0
article_banner

在Mac下安装Fluentd:

sudo gem install fluentd --no-ri --no-rdoc
WARNING:  Error fetching data: too many connection resets (http://production.s3.rubygems.org/specs.4.8.gz)Successfully installed fluentd-0.10.321 gem installed

报了这个错误。看不懂,google了下

http://stackoverflow.com/questions/10278174/gem-not-installing-showing-connection-error

This problem was caused by the cachefly server.

It seems that the folks over at rubygems.org disabled this mirror and then people's downloads were able to continue successfully.

There is a thread over at rubygems.org discussing this issue. 不知道怎么解决~于是使用源码安装
 

$ git clone https://github.com/fluent/fluentd.git
$ cd fluentd
$ rake build
Jeweler not available. Install it with: gem install jewelerrake aborted!Don't know how to build task 'build' (See full trace by running task with --trace)
又报错了~~先装jeweler,再rake build。
$ sudo gem install jeweler
$ rake build
/usr/local/Cellar/ruby/1.9.3-p286/lib/ruby/gems/1.9.1/gems/git-1.2.5/lib/git/lib.rb:709: warning: Insecure world writable dir /usr/local in PATH, mode 040777WARNING:  no description specified  Successfully built RubyGem  Name: fluentd  Version: 0.10.32  File: fluentd-0.10.32.gem
$ sudo gem install pkg/fluentd-0.10.32.gem 安装好啦~~接下来测试安装情况 
   
$ fluentd --setup ./fluent-bash: fluentd: command not found

修改~/.bash_profile,添加


export PATH="/usr/local/Cellar/ruby/1.9.3-p286/lib/ruby/gems/1.9.1/gems/fluentd-0.10.32/bin:$PATH"

再次运行:

$ fluentd --setup ./fluent
$ fluentd -c ./fluent/fluent.conf -vv &
$ echo '{"json":"message"}' | fluent-cat debug.test  
2013-03-13 22:41:54 +0800 [trace]: plugin/in_forward.rb:147:initialize: accepted fluent socket object_id=703132539036802013-03-13 22:41:54 +0800 debug.test: {"json":"message"}2013-03-13 22:41:54 +0800 [trace]: plugin/in_forward.rb:188:on_close: closed fluent socket object_id=70313253903680

更多安装方式:

http://docs.fluentd.org/categories/installation

http://www.cnblogs.com/xuxm2007/archive/2013/01/25/2876590.html

安装mongo插件

$ sudo gem install fluent-plugin-mongo
Fetching: bson-1.6.4.gem (100%)Fetching: mongo-1.6.4.gem (100%)Fetching: fluent-plugin-mongo-0.6.13.gem (100%)Successfully installed bson-1.6.4Successfully installed mongo-1.6.4Successfully installed fluent-plugin-mongo-0.6.133 gems installed

$ sudo fluent-gem install fluent-plugin-mongo

Successfully installed fluent-plugin-mongo-0.6.13 1 gem installed Installing ri documentation for fluent-plugin-mongo-0.6.13... Installing RDoc documentation for fluent-plugin-mongo-0.6.13...


$ fluentd -c ./fluent/fluent.conf -vv & ........ 2013-03-14 23:21:25 +0800 [info]: fluent/engine.rb:61:configure: using configuration file: <ROOT>  <source>    type forward  </source>  <source>    type http    port 8888  </source>  <source>    type tail    format apache2    path /private/var/log/apache2/access_log    pos_file /var/log/td-agent/apache2.access_log.pos    tag mongo.apache  </source>  <source>    type debug_agent    port 24230  </source>  <match debug.**>    type stdout  </match>  <match mongo.**>    type mongo    database apache    collection access    host 127.0.0.1    port 27017    flush_interval 10s  </match></ROOT>2013-03-14 23:21:25 +0800 [info]: fluent/engine.rb:70:block in configure: adding source type="forward"2013-03-14 23:21:25 +0800 [info]: fluent/engine.rb:70:block in configure: adding source type="http"2013-03-14 23:21:25 +0800 [info]: fluent/engine.rb:70:block in configure: adding source type="tail"2013-03-14 23:21:25 +0800 [info]: fluent/engine.rb:70:block in configure: adding source type="debug_agent"2013-03-14 23:21:25 +0800 [info]: fluent/engine.rb:86:block in configure: adding match pattern="debug.**" type="stdout"2013-03-14 23:21:25 +0800 [info]: fluent/engine.rb:86:block in configure: adding match pattern="mongo.**" type="mongo"2013-03-14 23:21:25 +0800 [trace]: fluent/plugin.rb:89:register_impl: registered output plugin 'mongo'/usr/local/Cellar/ruby/1.9.3-p286/lib/ruby/1.9.1/rubygems/custom_require.rb:36: stack level too deep (SystemStackError)2013-03-14 23:21:25 +0800 [info]: fluent/supervisor.rb:170:supervise: process finished code=2562013-03-14 23:21:25 +0800 [warn]: fluent/supervisor.rb:173:supervise: process died within 1 second. exit.

2013-03-14 23:21:25 +0800 [trace]: fluent/plugin.rb:89:register_impl: registered output plugin 'mongo'
 

   /usr/local/Cellar/ruby/1.9.3-p286/lib/ruby/1.9.1/rubygems/custom_require.rb:36: stack level too deep (SystemStackError)
 

这是什么东西~,各种谷歌,头都大了,还是不知道怎么解决,只好向github求助

https://github.com/fluent/fluentd/issues/110


    在@ repeatedly 的建议下,

I first heard this issue.

    Could you reduce the cause of this case?

For example:

  • invoke fluentd without sudo
  • remove non-related source or match
  • degrade the fluentd version
  • etc...

我降低了fluentd 的版本,重新安装bson_ext版本(保持跟mongo同一版本),这才解决了问题。具体解决过程在上面issues链接里。

第一次在英文网站发表问题,让英语小学水平的我获得一点点兴奋和满足,哈哈~

一点点消除错误,一点点减少挫败感


转载于:https://my.oschina. net /u/1000151/blog/114130


免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删

相关文章
技术文档
QR Code
微信扫一扫,欢迎咨询~
customer

online

联系我们
武汉格发信息技术有限公司
湖北省武汉市经开区科技园西路6号103孵化器
电话:155-2731-8020 座机:027-59821821
邮件:tanzw@gofarlic.com
Copyright © 2023 Gofarsoft Co.,Ltd. 保留所有权利
遇到许可问题?该如何解决!?
评估许可证实际采购量? 
不清楚软件许可证使用数据? 
收到软件厂商律师函!?  
想要少购买点许可证,节省费用? 
收到软件厂商侵权通告!?  
有正版license,但许可证不够用,需要新购? 
联系方式 board-phone 155-2731-8020
close1
预留信息,一起解决您的问题
* 姓名:
* 手机:

* 公司名称:

姓名不为空

姓名不为空

姓名不为空
手机不正确

手机不正确

手机不正确
公司不为空

公司不为空

公司不为空