-
Notifications
You must be signed in to change notification settings - Fork 14.8k
MINOR: Skip testDsaKeyPair when DSA algorithm is not supported #20967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Jian <[email protected]>
Signed-off-by: Jian <[email protected]>
Signed-off-by: Jian <[email protected]>
gaurav-narula
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the change!
I'm wondering how we deduced from the logs that the test fails due to DSA not being supported by the JVM and not test flakyness. The stacktrace you shared indicates the test fails because the channel's not ready but I don't see anything pointing that it's not ready because this algorithm isn't supported
|
@gaurav-narula Yes, you’re right. My bad for forgetting to add the background info in the PR description—I’ve already corrected it. |
@gaurav-narula nice question. Please check the following log. |
| // Common patterns: TLS_DHE_DSS_*, TLS_DH_DSS_*, SSL_DHE_DSS_*, SSL_DH_DSS_* | ||
| return Arrays.stream(cipherSuites) | ||
| .anyMatch(suite -> suite.contains("_DSS_")); | ||
| } catch (Exception e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why we get this branch? SSLContext.getInstance gets error if tlsv1.2 is not supported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chia7712 yes. I change the 1.2 to 1.8 and take a snapshot for it:

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
understand, it will certainly be an issue if tlsv1.2 is dropped. I'm confident Apache Kafka' lifespan will exceed that necessity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree
|
the patch pass on my local. I'd like to merge it if the comment gets resolved. |
…e#20967) Background: apache#20961 (comment) ``` Gradle Test Run :clients:test > Gradle Test Executor 7 > SslTransportLayerTest > testDsaKeyPair(Args) > "testDsaKeyPair(Args).args=tlsProtocol=TLSv1.2, useInlinePem=true" FAILED org.opentest4j.AssertionFailedError: Channel 0 was not ready after 30 seconds ==> expected: <true> but was: <false> at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151) at app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132) at app//org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63) at app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36) at app//org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:214) at app//org.apache.kafka.common.network.NetworkTestUtils.waitForChannelReady(NetworkTestUtils.java:107) at app//org.apache.kafka.common.network.NetworkTestUtils.checkClientConnection(NetworkTestUtils.java:70) at app//org.apache.kafka.common.network.SslTransportLayerTest.verifySslConfigs(SslTransportLayerTest.java:1326) at app//org.apache.kafka.common.network.SslTransportLayerTest.testDsaKeyPair(SslTransportLayerTest.java:483) ``` Reviewers: Gaurav Narula <[email protected]>, Chia-Ping Tsai <[email protected]>
Background: #20961 (comment) ``` Gradle Test Run :clients:test > Gradle Test Executor 7 > SslTransportLayerTest > testDsaKeyPair(Args) > "testDsaKeyPair(Args).args=tlsProtocol=TLSv1.2, useInlinePem=true" FAILED org.opentest4j.AssertionFailedError: Channel 0 was not ready after 30 seconds ==> expected: <true> but was: <false> at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151) at app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132) at app//org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63) at app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36) at app//org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:214) at app//org.apache.kafka.common.network.NetworkTestUtils.waitForChannelReady(NetworkTestUtils.java:107) at app//org.apache.kafka.common.network.NetworkTestUtils.checkClientConnection(NetworkTestUtils.java:70) at app//org.apache.kafka.common.network.SslTransportLayerTest.verifySslConfigs(SslTransportLayerTest.java:1326) at app//org.apache.kafka.common.network.SslTransportLayerTest.testDsaKeyPair(SslTransportLayerTest.java:483) ``` Reviewers: Gaurav Narula <[email protected]>, Chia-Ping Tsai <[email protected]>
Background: #20961 (comment) ``` Gradle Test Run :clients:test > Gradle Test Executor 7 > SslTransportLayerTest > testDsaKeyPair(Args) > "testDsaKeyPair(Args).args=tlsProtocol=TLSv1.2, useInlinePem=true" FAILED org.opentest4j.AssertionFailedError: Channel 0 was not ready after 30 seconds ==> expected: <true> but was: <false> at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151) at app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132) at app//org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63) at app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36) at app//org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:214) at app//org.apache.kafka.common.network.NetworkTestUtils.waitForChannelReady(NetworkTestUtils.java:107) at app//org.apache.kafka.common.network.NetworkTestUtils.checkClientConnection(NetworkTestUtils.java:70) at app//org.apache.kafka.common.network.SslTransportLayerTest.verifySslConfigs(SslTransportLayerTest.java:1326) at app//org.apache.kafka.common.network.SslTransportLayerTest.testDsaKeyPair(SslTransportLayerTest.java:483) ``` Reviewers: Gaurav Narula <[email protected]>, Chia-Ping Tsai <[email protected]>
|
trunk:cdc4019 @clolov I cherry-picked this to 4.2 branch because it was obstructing us from testing in env lacking DSA support |
|
@jiafu1115 could you please open a patch for 3.9 branch? the cherry-pick is failed |
Create this PR to merge to 3.9 with #20967 due to the cherry pick fail #20967 (comment) Fix: ``` javax.net.ssl|ERROR|E1|echoserver|2025-11-24 14:34:37.602 CST|TransportContext.java:375|Fatal (HANDSHAKE_FAILURE): no cipher suites in common ( "throwable" : { javax.net.ssl.SSLHandshakeException: (handshake_failure) no cipher suites in common at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:130) at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:370) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:326) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:317) at java.base/sun.security.ssl.ServerHello$T12ServerHelloProducer.chooseCipherSuite(ServerHello.java:459) at java.base/sun.security.ssl.ServerHello$T12ServerHelloProducer.produce(ServerHello.java:285) at java.base/sun.security.ssl.SSLHandshake.produce(SSLHandshake.java:437) at java.base/sun.security.ssl.ClientHello$T12ClientHelloConsumer.consume(ClientHello.java:1110) at java.base/sun.security.ssl.ClientHello$ClientHelloConsumer.onClientHello(ClientHello.java:843) at java.base/sun.security.ssl.ClientHello$ClientHelloConsumer.consume(ClientHello.java:798) at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:393) at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:477) at java.base/sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedAction.run(SSLEngineImpl.java:1273) at java.base/sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedAction.run(SSLEngineImpl.java:1260) at java.base/java.security.AccessController.doPrivileged(AccessController.java:714) at java.base/sun.security.ssl.SSLEngineImpl$DelegatedTask.run(SSLEngineImpl.java:1205) at org.apache.kafka.common.network.SslTransportLayer.runDelegatedTasks(SslTransportLayer.java:444) at org.apache.kafka.common.network.SslTransportLayer.handshakeUnwrap(SslTransportLayer.java:533) at org.apache.kafka.common.network.SslTransportLayer.doHandshake(SslTransportLayer.java:382) at org.apache.kafka.common.network.SslTransportLayer.handshake(SslTransportLayer.java:302) at org.apache.kafka.common.network.KafkaChannel.prepare(KafkaChannel.java:178) at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:548) at org.apache.kafka.common.network.Selector.poll(Selector.java:486) at org.apache.kafka.common.network.NioEchoServer.run(NioEchoServer.java:221)} ``` Reviewers: PoAn Yang <[email protected]>, Chia-Ping Tsai <[email protected]>
Background:
#20961 (comment)
Reviewers: Gaurav Narula [email protected], Chia-Ping Tsai
[email protected]