LogStash启动报错:<Redis::CommandError: ERR unknown command 'script'>
来源:互联网 发布:淘宝真丝针织背心 编辑:程序博客网 时间:2024/05/22 12:38
今天学习LogStash,想使用redis作为中间缓冲,client读取日志发给redis,然后server从redis中获取日志保存到一起。
测试data_type为‘channel’的时候很正常,但是消息发布之后,如果订阅方没有启动,这条消息就丢失了。
于是测试data_type为‘list’,也就是redis的BLPOP指令,相当于一个队列。
结果client启动正常,server启动却报了如下错误:
[2017-03-17T19:24:36,346][WARN ][logstash.inputs.redis ] Redis connection problem {:exception=>#<Redis::CommandError: ERR unknown command 'script'>}
下面是logstash的conf设置:
input{ redis { data_type => "list" key => "logstash-zorro-redis-test" host => "192.168.0.8" port => 6379 }}output{ stdout{ codec=>rubydebug }}
然后查看官方文档,首先看到了这么几句话:
The list command (BLPOP) used by Logstash is supported in Redis v1.3.1+, and the channel commands used by Logstash are found in Redis v1.3.8+.
#list(BLPOP)指令需要redis版本为1.3.1以上,channel(发布订阅模式)需要redis版本1.3.8以上。batch_count note: If you use the batch_count setting, you must use a Redis version 2.6.0 or newer.
#batch_count指令,如果你使用这个设置,你必须使用redis的版本为2.6.0以上。
我一看没错啊,我的redis是2.4的,并没有使用batch_count设置啊。
然后在网上也查不到相关信息。
正准备屈服去升级redis的时候,看见了官网文档的一个表格:
原来这玩意儿有默认值,被上面给误导了。
这个值是指从队列中读取数据时,一次性取出多少条。
所以,解决办法就是,不使用这个功能,将batch_size设置为1.
input{ redis { data_type => "list" key => "logstash-zorro-redis-test" host => "192.168.0.8" port => 6379 batch_count => 1 }}output{ stdout{ codec=>rubydebug }}
然后启动测试,一切正常。
(感觉就一句话的事,被我说了这么久。。。)
- LogStash启动报错:<Redis::CommandError: ERR unknown command 'script'>
- laravel 5.4 redis 报错 'Predis\Response\ServerException' with message 'ERR unknown command 'EVAL'' 201
- ERR unknown command 'GEOADD'
- redis.clients.jedis.exceptions.JedisDataException: ERR unknown command 'SENTINEL'
- ERR Slot 16011 is already busy (Redis::CommandError)
- ERR Slot 741 is already busy (Redis::CommandError)
- ELK学习13_logstash启动报错[logstash.outputs.elasticsearch] Unknown setting 'host' for elasticsearch
- (mysql导入数据库报错)[Err] 1115 - Unknown character set:
- mysql导入sql报错 Unknown command '\''.
- redis服务启动报未知错误--UnKnown error
- Redis:err max number of clients reached 报错解决办法
- Redis启动报错
- Redis启动报错
- redis启动报错
- mysql导入sql文件乱码或者报错unknown command
- sqlplus执行语句报错:unknown command beginning解决方案
- Mysql报错[Err] 1054 - Unknown column 'b.borrow_id' in 'on clause'
- 解决Cognos启动报错CFG-ERR-0106
- 学习Lua笔记(二)
- QQ登录
- 内核文件加载执行控制方案实现(win7, win8 64位)--windows内核安全策略的演变
- php操作redis之hash
- 激活无线网卡至monitor模式遇到的问题
- LogStash启动报错:<Redis::CommandError: ERR unknown command 'script'>
- JS学习笔记之对象
- asprintf的头文件没定义
- 【图像特征提取7】SURF特征提取算法的
- js实现动态改变菜单栏颜色(兄弟节点的知识)
- XML—可扩展标记语言(eXtensible Markup Languae)
- cf453 以为是概率论结果没想到是暴力
- 链表(篇3)链表中将所有的偶数移到奇数后面不改变原来的相对位置
- 道德经