3

I am using APISIX-3.12 version. Trying to enable kafka-logger plugin to send log data over Kafka topic using SASL_SSL protocol.

Route I created as:

curl http://127.0.0.1:9180/apisix/admin/routes/5 -H "X-API-KEY: $admin_key" -X PUT -d 

'
{
    "plugins": {
       "kafka-logger": {
           "brokers" : [
             {
               "host" :"127.0.0.1",
               "port" : 9092,
               "sasl_config": {
                 "enable": true, 
                 "user":"XXX", 
                 "password":"XXX", 
                 "mechanism":"PLAIN"
                }, 
                "ssl": true, 
                "ssl_verify":true
             }
            ],
           "kafka_topic" : "test2",
           "key" : "key1",
           "batch_max_size": 1,
           "name": "kafka logger"
       }
    },
    "upstream": {
       "nodes": {
           "127.0.0.1:1980": 1
       },
       "type": "roundrobin"
    },
    "uri": "/hello"
}'

When trying to trigger this route getting below error:

SSL_read() failed - routines::ssl/tls:ssl bed certificates alert number 42.

Not sure where to supply client certificate, private key and trusted certificates. I tried following openresty-kafka document to set certificates using directives:

lua_ssl_trusted_certificate lua_ssl_certificate_key lua_ssl_certificate

FYI: using same certificates, i am able to connect using Python producer/consumer.

JIRA Link:

0

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.