Connection terminated while authentication
mnusergit opened this issue · comments
Description
I am using the kafka client to send messages to Event Hub, using the sample given here, but the program is not able to establish the connection
How to reproduce
Run the sample
Has it worked previously?
This is the first attempt
Checklist
IMPORTANT: We will close issues where the checklist has not been completed or where adequate information has not been provided.
Please provide the relevant information for the following items:
- SDK (include version info): Java kafka
- Sample you're having trouble with: Java Quickstart
- If using Apache Kafka Java clients or a framework that uses Apache Kafka Java clients, version:
2.3
- Kafka client configuration: the same as in the sample, replaced the namespace and key
- Namespace and EventHub/topic name mnehdemo/mneh
- Consumer or producer failure - Producer Failure
- Timestamps in UTC Oct 22, 2021 18:41
- group.id or client.id
<REPLACE with e.g., group.id=cg-name>
- Logs provided 2021-10-22 18:41:16 DEBUG Selector:607 - [Producer clientId=KafkaExampleProducer] Connection with xxxxxxxxx.servicebus.windows.net/20.192.102.0 disconnected
java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:197)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)
at org.apache.kafka.common.network.SslTransportLayer.readFromSocketChannel(SslTransportLayer.java:205)
at org.apache.kafka.common.network.SslTransportLayer.read(SslTransportLayer.java:528)
at org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:94)
at org.apache.kafka.common.security.authenticator.SaslClientAuthenticator.receiveResponseOrToken(SaslClientAuthenticator.java:412)
at org.apache.kafka.common.security.authenticator.SaslClientAuthenticator.receiveKafkaResponse(SaslClientAuthenticator.java:502)
at org.apache.kafka.common.security.authenticator.SaslClientAuthenticator.authenticate(SaslClientAuthenticator.java:223)
at org.apache.kafka.common.network.KafkaChannel.prepare(KafkaChannel.java:173)
at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:547)
at org.apache.kafka.common.network.Selector.poll(Selector.java:483)
at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:539)
at org.apache.kafka.clients.producer.internals.Sender.runOnce(Sender.java:331)
at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:238)
at java.lang.Thread.run(Thread.java:748)
2021-10-22 18:41:16 DEBUG SslTransportLayer:181 - [SslTransportLayer channelId=-1 key=sun.nio.ch.SelectionKeyImpl@130dfc84] Failed to send SSL Close message
java.io.IOException: Broken pipe - Standalone repro `cloned the same quickstart repo
- Operating system:
Ubuntu 20.04 LTS>
- Critical issue
If this is a question on basic functionality, please verify the following:
- [x ] Port 9093 should not be blocked by firewall ("broker cannot be found" errors), the .net code works from the same VM
- Pinging FQDN should return cluster DNS resolution (e.g.
$ ping namespace.servicebus.windows.net
returns ~ns-eh2-prod-am3-516.cloudapp.net [13.69.64.0]
), yes the ping works and returns the value - [x ] Namespace should be either Standard or Dedicated tier, not Basic (TopicAuthorization errors), it is standard
It did work for after modifying the configuration which looked like had some extra character