我计划将日志发送到我们的协作弹性搜索集群。
我使用td-agent将日志转发到连接到协作弹性搜索集群的Kafka端点。我已经安装了带有td-agent的fluent- plugin -kafka插件,可以将日志发送到连接到协作弹性搜索集群的Kafka端点
插件网址:https://github.com/fluent/fluent-plugin-kafka
日志发送路径如下:
logs --> td-agent+fluent-plugin-kafka --> kafka cluster --> elasticsearch --> kibana问题是,Kafka端点被配置为支持SASL身份验证而不支持SSL,因为日志只通过协作网络路由,我猜不需要支持SSL。
我得到了下面的错误:
2019-04-30 17:46:39 +0900 [error]: #0 /opt/td-agent/embedded/lib/ruby/gems/2.4.0/gems/fluentd-1.3.3/bin/fluentd:8:in `<top (required)>'
2019-04-30 17:46:39 +0900 [error]: #0 /opt/td-agent/embedded/bin/fluentd:23:in `load'
2019-04-30 17:46:39 +0900 [error]: #0 /opt/td-agent/embedded/bin/fluentd:23:in `<main>'
2019-04-30 17:46:39 +0900 [error]: #0 unexpected error error_class=ArgumentError error="SASL authentication requires that SSL is configured"
2019-04-30 17:46:39 +0900 [error]: #0 suppressed same stacktrace
2019-04-30 17:46:39 +0900 [info]: Worker 0 finished unexpectedly with status 1
^C我的td-agent配置如下:
#
<source>
@type dummy
dummy {"hello":"world"}
tag test
</source>
<match test>
@type kafka2
brokers stg-ageapdsk101.stg.hnd2.bdd.local:9002,stg-ageapdsk102.stg.hnd2.bdd.local:9002,stg-ageapdsk103.stg.hnd2.bdd.local:9002
principal 'appuser@STGKAFKA100.GEAP.XXX.COM'
keytab 'appuser.keytab'
client_id 'kafka'
sasl_over_ssl false
get_kafka_client_log true
<format>
@type json
</format>
topic_key 'stg_esd_app_elk_1'
get_kafka_client_log true
<buffer topic>
flush_interval 10s
</buffer>
</match>请帮助我解决此问题。
发布于 2020-07-13 15:14:10
在带Kerberos身份验证的Cloudera6.3 (GSSAPI)环境中,fluentdv1.9.2插件fluent- plugin -kafkav0.13.0,out_kafka2无法工作。作为同一插件中的一个替代模块,我尝试了rdkafka2,现在它可以工作了。
详细信息;
主体和密钥表与kafka2相同
特定于rdkafka2 service_name 'kafka‘的参数
您可以检查the code,因为它填充了GSSAPI、SASL_PAINTEXT场景的所有必要参数。
if @principal
sasl = true
config[:"sasl.mechanisms"] = "GSSAPI"
config[:"sasl.kerberos.principal"] = @principal
config[:"sasl.kerberos.service.name"] = @service_name if @service_name
config[:"sasl.kerberos.keytab"] = @keytab if @keytab
end
if ssl && sasl
security_protocol = "SASL_SSL"
elsif ssl && !sasl
security_protocol = "SSL"
elsif !ssl && sasl
security_protocol = "SASL_PLAINTEXT"
else
security_protocol = "PLAINTEXT"
end
config[:"security.protocol"] = security_protocol除此之外,不要忘了添加环境变量-Djava.security.auth.login.config=/home/user/jaas.conf,以获取jaas conf此link的详细信息。
发布于 2019-05-09 18:55:25
使用不带任何值的ssl_ca_cert而不是sasl_over_ssl false
e.g
client_id 'kafka‘
ssl_ca_cert
keytab 'appuser.keytab
谢谢
https://stackoverflow.com/questions/55917592
复制相似问题