SASL_SSL using GSSAPI not able to connect

349 views Asked by At

While I am trying to connect to kafka from other server using kafka-python. I am getting SSL certficate error.

ssl_certfile='~/cacerts.pem',ssl_password='~~~~',sasl_mechanism='GSSAPI',sasl_kerberos_service_name='ssskafka' ) Traceback (most recent call last): self._sslobj.do_handshake() File "/opt/middleware/anaconda_python/3.5.4/lib/python3.5/ssl.py", line 641, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:719)

Can someone help to fix the issue?

import ssl
import gssapi
from kafka import KafkaProducer, KafkaConsumer

consumer = KafkaConsumer(
    bootstrap_servers='AAA:9094,BBBB:9094,CCC:9094',
    security_protocol="SASL_SSL",
    ssl_certfile='~/cacerts.pem',
    ssl_password='~~~~',
    sasl_mechanism='GSSAPI',
    sasl_kerberos_service_name='ssskafka'
)
0

There are 0 answers