Netty Client does not detect when ALPN was not used
See original GitHub issueWhen I tried to reproduce the APLN silence failure, I expected the following change fails our tests, but not, all tests still passed.
diff --git a/interop-testing/src/test/java/io/grpc/testing/integration/Http2NettyTest.java b/interop-testing/src/test/java/io/grpc/testing/integration/Http2NettyTest.java
index 504c815..2ae8160 100644
--- a/interop-testing/src/test/java/io/grpc/testing/integration/Http2NettyTest.java
+++ b/interop-testing/src/test/java/io/grpc/testing/integration/Http2NettyTest.java
@@ -37,6 +37,7 @@ import io.grpc.transport.netty.GrpcSslContexts;
import io.grpc.transport.netty.NettyChannelBuilder;
import io.grpc.transport.netty.NettyServerBuilder;
+import io.netty.handler.ssl.ApplicationProtocolConfig;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -74,7 +75,8 @@ public class Http2NettyTest extends AbstractTransportTest {
return NettyChannelBuilder
.forAddress(TestUtils.testServerAddress(serverPort))
.sslContext(GrpcSslContexts.forClient().trustManager(
- TestUtils.loadCert("ca.pem")).build())
+ TestUtils.loadCert("ca.pem"))
+ .applicationProtocolConfig(ApplicationProtocolConfig.DISABLED).build())
.build();
} catch (Exception ex) {
throw new RuntimeException(ex);
The problem itself is not a big deal, but investigating it may expose some hidden bugs.
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
java - How to solve "Neither Jetty ALPN nor OpenSSL via netty ...
We've just released the 0.9.1 client that paired with Netty tcnative-boringssl-static we use Fork19 as shown in the connector examples and pardo hello ......
Read more >ApplicationProtocolNegotiationH...
See the 13 * License for the specific language governing permissions and ... to use when 81 * ALPN/NPN negotiation fails or the...
Read more >Requirements for 4.x - Netty.docs
ALPN is a fairly new standard and (where possible) Netty supports protocol negotiation via NPN for systems that do not yet support ALPN....
Read more >Http2Client xref - Netty
See the License for the specific language governing permissions and limitations ... example for a HTTP2 client example which does not use 59...
Read more >JdkAlpnSslEngine xref - Netty
isEmpty()) { 77 // ALPN is not supported 78 selector.unsupported(); 79 } 80 } ... 121 if (alpnSelector == null) { 122 //...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@buchgr, that’s a pretty weak error message. Very few people would be able to figure out what’s wrong in that case.
When I disable ALPN all tests in Http2NettyTest fail with
Isn’t that what we want, @ejona86 ?