Getting java.lang.NoSuchFieldError: TCP_FASTOPEN with latest confluentinc/cp-kafka-connect Docker Image


We are using the confluentinc/cp-kafka-connect:latest docker image and have 0.31.0 Kafka Connect Zeebe (Camunda) on top of it.
When we are building the final docker image and post deploying this docker image the source connector is not working and throwing the below exception:

Caused by: java.lang.NoSuchFieldError: TCP_FASTOPEN
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(
at io.grpc.netty.Utils.getEpollChannelOption(
at io.grpc.netty.Utils.maybeGetTcpUserTimeoutOption(
at io.grpc.netty.NettyClientTransport.start(
at io.grpc.internal.ForwardingConnectionClientTransport.start(
at io.grpc.internal.ForwardingConnectionClientTransport.start(
at io.grpc.internal.InternalSubchannel.startNewTransport(
at io.grpc.internal.InternalSubchannel.access$400(
at io.grpc.internal.InternalSubchannel$
at io.grpc.SynchronizationContext.drain(
at io.grpc.SynchronizationContext.execute(
at io.grpc.internal.ManagedChannelImpl$NameResolverListener.onResult(
at io.grpc.internal.DnsNameResolver$
… 3 common frames omitted

However on using confluentinc/cp-kafka-connect:7.0.0 image docker image and 0.31.0 Kafka Connect Zeebe (Camunda) we are not seeing any issue and the source connector works fine.

We are seeing this issue when using confluentinc/cp-kafka-connect:latest image which was updated/uploaded post Dec 3rd 2021. Prior to this date we didn’t face any such issues.

Can you please help us as to why the above errors are coming with the confluentinc/cp-kafka-connect:latest image updated/uploaded post Dec 3rd 2021 and not with confluentinc/cp-kafka-connect:7.0.0 image?

@ssachidanand I, personally, recommend you do not use the latest tag for Docker images in any production or production like deployment. Pinning your releases to an immutable version (by way of the image digest), allows you to guarantee you are running the same versions over time. This docker documentation describes more: docker pull | Docker Documentation

Can you provide the specific digest of the cp-kafka-connect image you are having issues with along with any additional installation steps for the connector you are taking along with a configuration (secrets redacted)?

1 Like

Thanks for the details rick. I used the image digest - sha256:97b5f8c2e484f9de15b4094f9e21f2cee49403c61c7a1283013557c9cb028e84 of confluentinc/cp-kafka-connect:latest and its working fine.

I am getting the above exception when using the image digest -sha256:bac307173d11085d54b53b54825250407d0034b9656504226b7c293b3131b82f of confluentinc/cp-kafka-connect:latest and the newer ones.

As mentioned earlier we are using 0.31.0 Kafka Connect Zeebe (Camunda) - GitHub - camunda-community-hub/kafka-connect-zeebe: Kafka Connector for along with the above cp-kafka-connect image for getting kafka connect functionalities.

Please let me know in case any more details are required.

Can you please let me know where we can get all the image digests for confluentinc/cp-kafka-connect:latest?

@ssachidanand You can see all of the published versions of the cp-kafka-connect image, including the digest and associated tags, here:

Thanks and this I know. What I was asking is where can I get the different image digests for each update done to confluentinc/cp-kafka-connect:latest?

@rick Any update on why the java.lang.NoSuchFieldError: TCP_FASTOPEN exception is being thrown and where to get the different image digests for each update done to confluentinc/cp-kafka-connect:latest?

@ssachidanand I’m not able to diagnose the exception you are seeing at this time. You can see all of the docker images including their tags, digest, and date updated on Docker Hub at the link I provided