Elasticsearch::Transport::Transport::Errors::Unauthorized" error="[401]
2016-04-06 10:01
686 查看
功能描述:fluentd(td-agent) 提取日志存储到elasticsearch 中
环境配置:elasticsearch 添加了shield 插件。配置了用户角色。
fluentd(td-agent)相关配置如下:
<match **>
type elasticsearch_dyn_index
hosts loghub-es-01.yr.local:9200,loghub-es-02.yr.local:9200,loghub-es-03.yr.local:9200
buffer_queue_limit 512
buffer_chunk_limit 16m
# NOTE! type_name must be consitent with what we set when creating new index in ES
type_name applog
index_prefix_key app-name
index_dateformat %Y-%m-%d
utc_index false
message_key msg
parse_msg_timestamp true
time_key time
num_threads 8
retry_wait 5s
max_retry_wait 600s
disable_retry_limit true
flush_interval 5s
user es_admin
password es_admin
</match>
日志信息报warn信息如下:
2016-04-06 09:38:19 +0800 [warn]: temporarily failed to flush the buffer. next_retry=2016-04-06 09:38:25 +0800 error_class="Elasticsearch::Transport::Transport::Errors::Unauthorized" error="[401] {\"error\":{\"root_cause\":[{\"type\":\"security_exception\",\"reason\":\"unable
to authenticate user [es_admin] for REST request [/_bulk]\",\"header\":{\"WWW-Authenticate\":\"Basic realm=\\\"shield\\\"\"}}],\"type\":\"security_exception\",\"reason\":\"unable to authenticate user [es_admin] for REST request [/_bulk]\",\"header\":{\"WWW-Authenticate\":\"Basic
realm=\\\"shield\\\"\"}},\"status\":401}" plugin_id="object:1b8f1cc"
2016-04-06 09:38:19 +0800 [warn]: suppressed same stacktrace
2016-04-06 09:38:25 +0800 [warn]: retry succeeded. plugin_id="object:1b8f1cc"
问题分析:
日志中 retry succeeded 可以看出消息存储成功。td-agent 是轮询插入到es cluster 中的nodes 。 最后查看es nodes 发现有一台node 没有配置用户。
配置成功后,无发现上面warn信息。
环境配置:elasticsearch 添加了shield 插件。配置了用户角色。
fluentd(td-agent)相关配置如下:
<match **>
type elasticsearch_dyn_index
hosts loghub-es-01.yr.local:9200,loghub-es-02.yr.local:9200,loghub-es-03.yr.local:9200
buffer_queue_limit 512
buffer_chunk_limit 16m
# NOTE! type_name must be consitent with what we set when creating new index in ES
type_name applog
index_prefix_key app-name
index_dateformat %Y-%m-%d
utc_index false
message_key msg
parse_msg_timestamp true
time_key time
num_threads 8
retry_wait 5s
max_retry_wait 600s
disable_retry_limit true
flush_interval 5s
user es_admin
password es_admin
</match>
日志信息报warn信息如下:
2016-04-06 09:38:19 +0800 [warn]: temporarily failed to flush the buffer. next_retry=2016-04-06 09:38:25 +0800 error_class="Elasticsearch::Transport::Transport::Errors::Unauthorized" error="[401] {\"error\":{\"root_cause\":[{\"type\":\"security_exception\",\"reason\":\"unable
to authenticate user [es_admin] for REST request [/_bulk]\",\"header\":{\"WWW-Authenticate\":\"Basic realm=\\\"shield\\\"\"}}],\"type\":\"security_exception\",\"reason\":\"unable to authenticate user [es_admin] for REST request [/_bulk]\",\"header\":{\"WWW-Authenticate\":\"Basic
realm=\\\"shield\\\"\"}},\"status\":401}" plugin_id="object:1b8f1cc"
2016-04-06 09:38:19 +0800 [warn]: suppressed same stacktrace
2016-04-06 09:38:25 +0800 [warn]: retry succeeded. plugin_id="object:1b8f1cc"
问题分析:
日志中 retry succeeded 可以看出消息存储成功。td-agent 是轮询插入到es cluster 中的nodes 。 最后查看es nodes 发现有一台node 没有配置用户。
配置成功后,无发现上面warn信息。
相关文章推荐
- 九幽史程博:助力国内开发者借Win10东风出海
- NTFS For Mac系统配置有什么要求
- XmlSerializer(Type type, Type[] extraTypes) 内存泄漏
- Ajax之数据连接信息捕获
- SharePoint2013 上传文件到文档库
- spring框架学习(四)自动装配
- Linux下获取进程状态
- python 安装 setuptools Compression requires the (missing) zlib module 的解决方案
- 统计无符号整型数的二进制码中‘1’的个数
- web前端工程师
- DevExpress RibbonForm的标题栏(Title Caption)中文显示不全
- Android onTouch事件传递机制
- MyEclipse 引用 jar外包的方法
- QT5 OPenGL(二,平面图形上色)
- 把byte[]转换为String
- php 算法之切割数组,不用array_chunk(),算法之二,取数组的差值,不用array_diff()
- 浏览器强制使用360极速模式
- web前端工程师
- web项目启动初始化java Demo
- 好马应不应该吃回头草?