'SSlconfiguration exception on finagle upgrade

I recently upgraded to finagle-core 22.4.0 from 21.4.0 and see this while loading integration tests in the application. I use wiremock-standalone version 2.27.2. Netty version is 4.1.73.Final. How can I fix this issue? I am assuming it is related to some version. But where to start debugging?

09:41:03.529 WARN finagle/netty4-2-1                io.netty.channel.ChannelInitializer [] [] [] [] [] [] [] [] [] [] [] Failed to initialize a channel. Closing: [id: 0x6e98560c]
com.twitter.finagle.ssl.SslConfigurationException: java.lang.IllegalArgumentException: ApplicationProtocols.Supported is not supported at this time for SslContextClientEngineFactory. Remote Info: Not Available
    at com.twitter.finagle.ssl.SslConfigurationException$.notSupported(SslConfigurationException.scala:18)
    at com.twitter.finagle.ssl.SslConfigurations$.checkApplicationProtocolsNotSupported(SslConfigurations.scala:246)
    at com.twitter.finagle.ssl.client.SslContextClientEngineFactory.apply(SslContextClientEngineFactory.scala:37)


Solution 1:[1]

A similar issue has been reported here: https://github.com/twitter/finagle/issues/913

You're getting an "Application protocol not supported" exception from finagle during a setup of a secure socket (SSL/TLS) connection.

The github issue links to the following piece of code showing the supported application protocols: https://github.com/twitter/finagle/blob/develop/finagle-core/src/main/scala/com/twitter/finagle/ssl/ApplicationProtocols.scala#L19-L31

  private val alpnProtocolIds: Set[String] = Set(
    "http/1.1",
    "spdy/1",
    "spdy/2",
    "spdy/3",
    "stun.turn",
    "stun.nat-discovery",
    "h2",
    "h2c",
    "webrtc",
    "c-webrtc",
    "ftp"
  )

This could mean that for example your test is now trying to communicate with HTTP2, which is not supported. You might have to configure that back to HTTP1.1

If that doesn't help you can try to debug the full SSL communication with the following vm option:

-Djavax.net.debug=all

See for more information:

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 slindenau