Python Kafka Client triggering error even though consumer works











up vote
0
down vote

favorite












I am using the confluent_kafka client package version 0.11.5 and Python 3.6.6 for interacting with Apache Kafka. Getting error when the consumer connection has been polling for several minutes. Still able to consume and handle messages correctly from subscribed topic. Seems to only be getting error/fail on some of the brokers I used in the connection, not all of them. Error appears quicker when running locally than on Kubernetes, but tends to disappear after a while and then come back.



Consumer Options:



{
'bootstrap.servers': kafka_brokers_sasl,
'sasl.mechanisms': 'PLAIN',
'security.protocol': 'SASL_SSL',
'sasl.username': 'token',
'sasl.password': api_key,
'log.connection.close' : False,
'client.id': 'kafka-python-console-sample-consumer',
'group.id': 'kafka-python-console-sample-consumer',
'default.topic.config': {
'auto.offset.reset': 'earliest'
}
}


Error message:



%3|1539683094.048|FAIL|kafka-python-console-sample-consumer#consumer-1| [thrd:sasl_ssl://kafka02-prod01.messagehub.services.eu-de.bluemix.net]: sasl_ssl://kafka02-prod01.messagehub.services.eu-de.bluemix.net:9093/1: Failed to initializeSASL authentication: SASL Handshake not supported by broker (required by mechanism PLAIN) 
%3|1539683094.048|ERROR|kafka-python-console-sample-consumer#consumer-1| [thrd:sasl_ssl://kafka02-prod01.messagehub.services.eu-de.bluemix.net]: sasl_ssl://kafka02-prod01.messagehub.services.eu-de.bluemix.net:9093/1: Failed to initialize SASL authentication: SASL Handshake not supported by broker (required by mechanism PLAIN)


I have read multiple different posts but can't find a solution that works for me. How can I get rid of the message and make sure nothing is wrong with my broker connections?










share|improve this question
























  • Hint: 'sasl.mechanisms': 'PLAIN' probably doesn't work well with 'security.protocol': 'SASL_SSL'
    – cricket_007
    Nov 9 at 15:26










  • @cricket_007 I followed this guide explaining how to use it with Kafka on IBM Cloud: github.com/ibm-messaging/event-streams-samples/blob/master/…. How do you propose to use it, and which one to change?
    – danielo
    Nov 9 at 15:43










  • I'm not particularly sure about the Confluent Python library. If you think you've ran into an error, though, perhaps you can report the issue here github.com/confluentinc/confluent-kafka-python/issues
    – cricket_007
    Nov 9 at 16:14















up vote
0
down vote

favorite












I am using the confluent_kafka client package version 0.11.5 and Python 3.6.6 for interacting with Apache Kafka. Getting error when the consumer connection has been polling for several minutes. Still able to consume and handle messages correctly from subscribed topic. Seems to only be getting error/fail on some of the brokers I used in the connection, not all of them. Error appears quicker when running locally than on Kubernetes, but tends to disappear after a while and then come back.



Consumer Options:



{
'bootstrap.servers': kafka_brokers_sasl,
'sasl.mechanisms': 'PLAIN',
'security.protocol': 'SASL_SSL',
'sasl.username': 'token',
'sasl.password': api_key,
'log.connection.close' : False,
'client.id': 'kafka-python-console-sample-consumer',
'group.id': 'kafka-python-console-sample-consumer',
'default.topic.config': {
'auto.offset.reset': 'earliest'
}
}


Error message:



%3|1539683094.048|FAIL|kafka-python-console-sample-consumer#consumer-1| [thrd:sasl_ssl://kafka02-prod01.messagehub.services.eu-de.bluemix.net]: sasl_ssl://kafka02-prod01.messagehub.services.eu-de.bluemix.net:9093/1: Failed to initializeSASL authentication: SASL Handshake not supported by broker (required by mechanism PLAIN) 
%3|1539683094.048|ERROR|kafka-python-console-sample-consumer#consumer-1| [thrd:sasl_ssl://kafka02-prod01.messagehub.services.eu-de.bluemix.net]: sasl_ssl://kafka02-prod01.messagehub.services.eu-de.bluemix.net:9093/1: Failed to initialize SASL authentication: SASL Handshake not supported by broker (required by mechanism PLAIN)


I have read multiple different posts but can't find a solution that works for me. How can I get rid of the message and make sure nothing is wrong with my broker connections?










share|improve this question
























  • Hint: 'sasl.mechanisms': 'PLAIN' probably doesn't work well with 'security.protocol': 'SASL_SSL'
    – cricket_007
    Nov 9 at 15:26










  • @cricket_007 I followed this guide explaining how to use it with Kafka on IBM Cloud: github.com/ibm-messaging/event-streams-samples/blob/master/…. How do you propose to use it, and which one to change?
    – danielo
    Nov 9 at 15:43










  • I'm not particularly sure about the Confluent Python library. If you think you've ran into an error, though, perhaps you can report the issue here github.com/confluentinc/confluent-kafka-python/issues
    – cricket_007
    Nov 9 at 16:14













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am using the confluent_kafka client package version 0.11.5 and Python 3.6.6 for interacting with Apache Kafka. Getting error when the consumer connection has been polling for several minutes. Still able to consume and handle messages correctly from subscribed topic. Seems to only be getting error/fail on some of the brokers I used in the connection, not all of them. Error appears quicker when running locally than on Kubernetes, but tends to disappear after a while and then come back.



Consumer Options:



{
'bootstrap.servers': kafka_brokers_sasl,
'sasl.mechanisms': 'PLAIN',
'security.protocol': 'SASL_SSL',
'sasl.username': 'token',
'sasl.password': api_key,
'log.connection.close' : False,
'client.id': 'kafka-python-console-sample-consumer',
'group.id': 'kafka-python-console-sample-consumer',
'default.topic.config': {
'auto.offset.reset': 'earliest'
}
}


Error message:



%3|1539683094.048|FAIL|kafka-python-console-sample-consumer#consumer-1| [thrd:sasl_ssl://kafka02-prod01.messagehub.services.eu-de.bluemix.net]: sasl_ssl://kafka02-prod01.messagehub.services.eu-de.bluemix.net:9093/1: Failed to initializeSASL authentication: SASL Handshake not supported by broker (required by mechanism PLAIN) 
%3|1539683094.048|ERROR|kafka-python-console-sample-consumer#consumer-1| [thrd:sasl_ssl://kafka02-prod01.messagehub.services.eu-de.bluemix.net]: sasl_ssl://kafka02-prod01.messagehub.services.eu-de.bluemix.net:9093/1: Failed to initialize SASL authentication: SASL Handshake not supported by broker (required by mechanism PLAIN)


I have read multiple different posts but can't find a solution that works for me. How can I get rid of the message and make sure nothing is wrong with my broker connections?










share|improve this question















I am using the confluent_kafka client package version 0.11.5 and Python 3.6.6 for interacting with Apache Kafka. Getting error when the consumer connection has been polling for several minutes. Still able to consume and handle messages correctly from subscribed topic. Seems to only be getting error/fail on some of the brokers I used in the connection, not all of them. Error appears quicker when running locally than on Kubernetes, but tends to disappear after a while and then come back.



Consumer Options:



{
'bootstrap.servers': kafka_brokers_sasl,
'sasl.mechanisms': 'PLAIN',
'security.protocol': 'SASL_SSL',
'sasl.username': 'token',
'sasl.password': api_key,
'log.connection.close' : False,
'client.id': 'kafka-python-console-sample-consumer',
'group.id': 'kafka-python-console-sample-consumer',
'default.topic.config': {
'auto.offset.reset': 'earliest'
}
}


Error message:



%3|1539683094.048|FAIL|kafka-python-console-sample-consumer#consumer-1| [thrd:sasl_ssl://kafka02-prod01.messagehub.services.eu-de.bluemix.net]: sasl_ssl://kafka02-prod01.messagehub.services.eu-de.bluemix.net:9093/1: Failed to initializeSASL authentication: SASL Handshake not supported by broker (required by mechanism PLAIN) 
%3|1539683094.048|ERROR|kafka-python-console-sample-consumer#consumer-1| [thrd:sasl_ssl://kafka02-prod01.messagehub.services.eu-de.bluemix.net]: sasl_ssl://kafka02-prod01.messagehub.services.eu-de.bluemix.net:9093/1: Failed to initialize SASL authentication: SASL Handshake not supported by broker (required by mechanism PLAIN)


I have read multiple different posts but can't find a solution that works for me. How can I get rid of the message and make sure nothing is wrong with my broker connections?







python apache-kafka confluent confluent-kafka






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 9 at 15:23









cricket_007

75.7k1042106




75.7k1042106










asked Nov 8 at 10:38









danielo

242114




242114












  • Hint: 'sasl.mechanisms': 'PLAIN' probably doesn't work well with 'security.protocol': 'SASL_SSL'
    – cricket_007
    Nov 9 at 15:26










  • @cricket_007 I followed this guide explaining how to use it with Kafka on IBM Cloud: github.com/ibm-messaging/event-streams-samples/blob/master/…. How do you propose to use it, and which one to change?
    – danielo
    Nov 9 at 15:43










  • I'm not particularly sure about the Confluent Python library. If you think you've ran into an error, though, perhaps you can report the issue here github.com/confluentinc/confluent-kafka-python/issues
    – cricket_007
    Nov 9 at 16:14


















  • Hint: 'sasl.mechanisms': 'PLAIN' probably doesn't work well with 'security.protocol': 'SASL_SSL'
    – cricket_007
    Nov 9 at 15:26










  • @cricket_007 I followed this guide explaining how to use it with Kafka on IBM Cloud: github.com/ibm-messaging/event-streams-samples/blob/master/…. How do you propose to use it, and which one to change?
    – danielo
    Nov 9 at 15:43










  • I'm not particularly sure about the Confluent Python library. If you think you've ran into an error, though, perhaps you can report the issue here github.com/confluentinc/confluent-kafka-python/issues
    – cricket_007
    Nov 9 at 16:14
















Hint: 'sasl.mechanisms': 'PLAIN' probably doesn't work well with 'security.protocol': 'SASL_SSL'
– cricket_007
Nov 9 at 15:26




Hint: 'sasl.mechanisms': 'PLAIN' probably doesn't work well with 'security.protocol': 'SASL_SSL'
– cricket_007
Nov 9 at 15:26












@cricket_007 I followed this guide explaining how to use it with Kafka on IBM Cloud: github.com/ibm-messaging/event-streams-samples/blob/master/…. How do you propose to use it, and which one to change?
– danielo
Nov 9 at 15:43




@cricket_007 I followed this guide explaining how to use it with Kafka on IBM Cloud: github.com/ibm-messaging/event-streams-samples/blob/master/…. How do you propose to use it, and which one to change?
– danielo
Nov 9 at 15:43












I'm not particularly sure about the Confluent Python library. If you think you've ran into an error, though, perhaps you can report the issue here github.com/confluentinc/confluent-kafka-python/issues
– cricket_007
Nov 9 at 16:14




I'm not particularly sure about the Confluent Python library. If you think you've ran into an error, though, perhaps you can report the issue here github.com/confluentinc/confluent-kafka-python/issues
– cricket_007
Nov 9 at 16:14

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53205991%2fpython-kafka-client-triggering-error-even-though-consumer-works%23new-answer', 'question_page');
}
);

Post as a guest





































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53205991%2fpython-kafka-client-triggering-error-even-though-consumer-works%23new-answer', 'question_page');
}
);

Post as a guest




















































































Popular posts from this blog

Schultheiß

Liste der Kulturdenkmale in Wilsdruff

Android Play Services Check