Skip to content
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

Client with TLS configuration not working on version v22.12.0 onwards - java.lang.IllegalArgumentException: ApplicationProtocols.Supported is not supported at this time for SslContextClientEngineFactory. Remote Info: Not Available #965

Open
Hakky54 opened this issue Aug 2, 2024 · 9 comments

Comments

@Hakky54
Copy link

Hakky54 commented Aug 2, 2024

Describe the bug
Https requests fails. Finagle client cannot call https server from version 22.12.0 onwards. This issue is also present on the latest version of 24.x.x I am using http1 which should work. Even when switching to http2 it still fails.

The full stacktrace is here
@Demo
Scenario Outline: Saying hello to the Server with Finagle # Hello.feature:26
15:33:06.037 [main] DEBUG nl.altindag.client.stepdefs.HelloStepDefs - Assuming the server is up and running
  Given Server is alive                                   # nl.altindag.client.stepdefs.HelloStepDefs.serverIsAlive()
15:33:06.162 [finagle/netty4-4-1] WARN  io.netty.channel.ChannelInitializer - Failed to initialize a channel. Closing: [id: 0x09c32b8c]
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)
	at com.twitter.finagle.netty4.ssl.client.Netty4ClientSslChannelInitializer.$anonfun$initChannel$1(Netty4ClientSslChannelInitializer.scala:141)
	at com.twitter.finagle.netty4.ssl.client.Netty4ClientSslChannelInitializer.$anonfun$initChannel$1$adapted(Netty4ClientSslChannelInitializer.scala:138)
	at scala.Option.foreach(Option.scala:437)
	at com.twitter.finagle.netty4.ssl.client.Netty4ClientSslChannelInitializer.initChannel(Netty4ClientSslChannelInitializer.scala:138)
	at io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:129)
	at io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.java:112)
	at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:1130)
	at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:609)
	at io.netty.channel.DefaultChannelPipeline.addFirst(DefaultChannelPipeline.java:181)
	at io.netty.channel.DefaultChannelPipeline.addFirst(DefaultChannelPipeline.java:152)
	at com.twitter.finagle.netty4.channel.AbstractNetty4ClientChannelInitializer.initChannel(AbstractNetty4ClientChannelInitializer.scala:93)
	at com.twitter.finagle.netty4.channel.RawNetty4ClientChannelInitializer.initChannel(RawNetty4ClientChannelInitializer.scala:18)
	at io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:129)
	at io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.java:112)
	at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:1130)
	at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:609)
	at io.netty.channel.DefaultChannelPipeline.access$100(DefaultChannelPipeline.java:46)
	at io.netty.channel.DefaultChannelPipeline$PendingHandlerAddedTask.execute(DefaultChannelPipeline.java:1463)
	at io.netty.channel.DefaultChannelPipeline.callHandlerAddedForAllHandlers(DefaultChannelPipeline.java:1115)
	at io.netty.channel.DefaultChannelPipeline.invokeHandlerAddedIfNeeded(DefaultChannelPipeline.java:650)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:514)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.access$200(AbstractChannel.java:429)
	at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:486)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at com.twitter.finagle.util.BlockingTimeTrackingThreadFactory$$anon$1.run(BlockingTimeTrackingThreadFactory.scala:23)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IllegalArgumentException: ApplicationProtocols.Supported is not supported at this time for SslContextClientEngineFactory
	... 37 common frames omitted
15:33:06.195 [finagle/netty4-4-2] WARN  io.netty.channel.ChannelInitializer - Failed to initialize a channel. Closing: [id: 0x33e7a25f]
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)
	at com.twitter.finagle.netty4.ssl.client.Netty4ClientSslChannelInitializer.$anonfun$initChannel$1(Netty4ClientSslChannelInitializer.scala:141)
	at com.twitter.finagle.netty4.ssl.client.Netty4ClientSslChannelInitializer.$anonfun$initChannel$1$adapted(Netty4ClientSslChannelInitializer.scala:138)
	at scala.Option.foreach(Option.scala:437)
	at com.twitter.finagle.netty4.ssl.client.Netty4ClientSslChannelInitializer.initChannel(Netty4ClientSslChannelInitializer.scala:138)
	at io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:129)
	at io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.java:112)
	at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:1130)
	at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:609)
	at io.netty.channel.DefaultChannelPipeline.addFirst(DefaultChannelPipeline.java:181)
	at io.netty.channel.DefaultChannelPipeline.addFirst(DefaultChannelPipeline.java:152)
	at com.twitter.finagle.netty4.channel.AbstractNetty4ClientChannelInitializer.initChannel(AbstractNetty4ClientChannelInitializer.scala:93)
	at com.twitter.finagle.netty4.channel.RawNetty4ClientChannelInitializer.initChannel(RawNetty4ClientChannelInitializer.scala:18)
	at io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:129)
	at io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.java:112)
	at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:1130)
	at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:609)
	at io.netty.channel.DefaultChannelPipeline.access$100(DefaultChannelPipeline.java:46)
	at io.netty.channel.DefaultChannelPipeline$PendingHandlerAddedTask.execute(DefaultChannelPipeline.java:1463)
	at io.netty.channel.DefaultChannelPipeline.callHandlerAddedForAllHandlers(DefaultChannelPipeline.java:1115)
	at io.netty.channel.DefaultChannelPipeline.invokeHandlerAddedIfNeeded(DefaultChannelPipeline.java:650)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:514)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.access$200(AbstractChannel.java:429)
	at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:486)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at com.twitter.finagle.util.BlockingTimeTrackingThreadFactory$$anon$1.run(BlockingTimeTrackingThreadFactory.scala:23)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IllegalArgumentException: ApplicationProtocols.Supported is not supported at this time for SslContextClientEngineFactory
	... 37 common frames omitted
15:33:06.198 [finagle/netty4-4-3] WARN  io.netty.channel.ChannelInitializer - Failed to initialize a channel. Closing: [id: 0x9b11f944]
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)
	at com.twitter.finagle.netty4.ssl.client.Netty4ClientSslChannelInitializer.$anonfun$initChannel$1(Netty4ClientSslChannelInitializer.scala:141)
	at com.twitter.finagle.netty4.ssl.client.Netty4ClientSslChannelInitializer.$anonfun$initChannel$1$adapted(Netty4ClientSslChannelInitializer.scala:138)
	at scala.Option.foreach(Option.scala:437)
	at com.twitter.finagle.netty4.ssl.client.Netty4ClientSslChannelInitializer.initChannel(Netty4ClientSslChannelInitializer.scala:138)
	at io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:129)
	at io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.java:112)
	at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:1130)
	at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:609)
	at io.netty.channel.DefaultChannelPipeline.addFirst(DefaultChannelPipeline.java:181)
	at io.netty.channel.DefaultChannelPipeline.addFirst(DefaultChannelPipeline.java:152)
	at com.twitter.finagle.netty4.channel.AbstractNetty4ClientChannelInitializer.initChannel(AbstractNetty4ClientChannelInitializer.scala:93)
	at com.twitter.finagle.netty4.channel.RawNetty4ClientChannelInitializer.initChannel(RawNetty4ClientChannelInitializer.scala:18)
	at io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:129)
	at io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.java:112)
	at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:1130)
	at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:609)
	at io.netty.channel.DefaultChannelPipeline.access$100(DefaultChannelPipeline.java:46)
	at io.netty.channel.DefaultChannelPipeline$PendingHandlerAddedTask.execute(DefaultChannelPipeline.java:1463)
	at io.netty.channel.DefaultChannelPipeline.callHandlerAddedForAllHandlers(DefaultChannelPipeline.java:1115)
	at io.netty.channel.DefaultChannelPipeline.invokeHandlerAddedIfNeeded(DefaultChannelPipeline.java:650)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:514)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.access$200(AbstractChannel.java:429)
	at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:486)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at com.twitter.finagle.util.BlockingTimeTrackingThreadFactory$$anon$1.run(BlockingTimeTrackingThreadFactory.scala:23)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IllegalArgumentException: ApplicationProtocols.Supported is not supported at this time for SslContextClientEngineFactory
	... 37 common frames omitted
15:33:06.199 [finagle/netty4-4-4] WARN  io.netty.channel.ChannelInitializer - Failed to initialize a channel. Closing: [id: 0xf2d9ab0d]
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)
	at com.twitter.finagle.netty4.ssl.client.Netty4ClientSslChannelInitializer.$anonfun$initChannel$1(Netty4ClientSslChannelInitializer.scala:141)
	at com.twitter.finagle.netty4.ssl.client.Netty4ClientSslChannelInitializer.$anonfun$initChannel$1$adapted(Netty4ClientSslChannelInitializer.scala:138)
	at scala.Option.foreach(Option.scala:437)
	at com.twitter.finagle.netty4.ssl.client.Netty4ClientSslChannelInitializer.initChannel(Netty4ClientSslChannelInitializer.scala:138)
	at io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:129)
	at io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.java:112)
	at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:1130)
	at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:609)
	at io.netty.channel.DefaultChannelPipeline.addFirst(DefaultChannelPipeline.java:181)
	at io.netty.channel.DefaultChannelPipeline.addFirst(DefaultChannelPipeline.java:152)
	at com.twitter.finagle.netty4.channel.AbstractNetty4ClientChannelInitializer.initChannel(AbstractNetty4ClientChannelInitializer.scala:93)
	at com.twitter.finagle.netty4.channel.RawNetty4ClientChannelInitializer.initChannel(RawNetty4ClientChannelInitializer.scala:18)
	at io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:129)
	at io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.java:112)
	at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:1130)
	at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:609)
	at io.netty.channel.DefaultChannelPipeline.access$100(DefaultChannelPipeline.java:46)
	at io.netty.channel.DefaultChannelPipeline$PendingHandlerAddedTask.execute(DefaultChannelPipeline.java:1463)
	at io.netty.channel.DefaultChannelPipeline.callHandlerAddedForAllHandlers(DefaultChannelPipeline.java:1115)
	at io.netty.channel.DefaultChannelPipeline.invokeHandlerAddedIfNeeded(DefaultChannelPipeline.java:650)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:514)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.access$200(AbstractChannel.java:429)
	at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:486)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at com.twitter.finagle.util.BlockingTimeTrackingThreadFactory$$anon$1.run(BlockingTimeTrackingThreadFactory.scala:23)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IllegalArgumentException: ApplicationProtocols.Supported is not supported at this time for SslContextClientEngineFactory
	... 37 common frames omitted
15:33:06.201 [finagle/netty4-4-5] WARN  io.netty.channel.ChannelInitializer - Failed to initialize a channel. Closing: [id: 0x439ff73e]
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)
	at com.twitter.finagle.netty4.ssl.client.Netty4ClientSslChannelInitializer.$anonfun$initChannel$1(Netty4ClientSslChannelInitializer.scala:141)
	at com.twitter.finagle.netty4.ssl.client.Netty4ClientSslChannelInitializer.$anonfun$initChannel$1$adapted(Netty4ClientSslChannelInitializer.scala:138)
	at scala.Option.foreach(Option.scala:437)
	at com.twitter.finagle.netty4.ssl.client.Netty4ClientSslChannelInitializer.initChannel(Netty4ClientSslChannelInitializer.scala:138)
	at io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:129)
	at io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.java:112)
	at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:1130)
	at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:609)
	at io.netty.channel.DefaultChannelPipeline.addFirst(DefaultChannelPipeline.java:181)
	at io.netty.channel.DefaultChannelPipeline.addFirst(DefaultChannelPipeline.java:152)
	at com.twitter.finagle.netty4.channel.AbstractNetty4ClientChannelInitializer.initChannel(AbstractNetty4ClientChannelInitializer.scala:93)
	at com.twitter.finagle.netty4.channel.RawNetty4ClientChannelInitializer.initChannel(RawNetty4ClientChannelInitializer.scala:18)
	at io.netty.channel.ChannelInitializer.initChannel(ChannelInitializer.java:129)
	at io.netty.channel.ChannelInitializer.handlerAdded(ChannelInitializer.java:112)
	at io.netty.channel.AbstractChannelHandlerContext.callHandlerAdded(AbstractChannelHandlerContext.java:1130)
	at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:609)
	at io.netty.channel.DefaultChannelPipeline.access$100(DefaultChannelPipeline.java:46)
	at io.netty.channel.DefaultChannelPipeline$PendingHandlerAddedTask.execute(DefaultChannelPipeline.java:1463)
	at io.netty.channel.DefaultChannelPipeline.callHandlerAddedForAllHandlers(DefaultChannelPipeline.java:1115)
	at io.netty.channel.DefaultChannelPipeline.invokeHandlerAddedIfNeeded(DefaultChannelPipeline.java:650)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:514)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.access$200(AbstractChannel.java:429)
	at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:486)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at com.twitter.finagle.util.BlockingTimeTrackingThreadFactory$$anon$1.run(BlockingTimeTrackingThreadFactory.scala:23)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IllegalArgumentException: ApplicationProtocols.Supported is not supported at this time for SslContextClientEngineFactory
	... 37 common frames omitted
15:33:06.202 [finagle/netty4-4-5] INFO  com.twitter.finagle.liveness.FailureAccrualFactory$ - marking connection to "localhost:8443" as dead for 5 seconds. Policy: SuccessRateFailureAccrualPolicy(sr=0.0, requiredSuccessRate=0.8), ConsecutiveFailureAccrualPolicy(consecutiveFailures=5, consecutiveFailuresThreshold=5). Remote Address: Inet(localhost/127.0.0.1:8443,Map())
  When I say hello with "Finagle"                         # nl.altindag.client.stepdefs.HelloStepDefs.iSayHelloWithClient(java.lang.String)
      nl.altindag.client.ClientException: java.util.concurrent.ExecutionException: Failure(null at remote address: localhost/127.0.0.1:8443. Remote Info: Not Available, flags=0x08) with RemoteInfo -> Upstream Address: Not Available, Upstream id: Not Available, Downstream Address: localhost/127.0.0.1:8443, Downstream label: localhost:8443, Trace Id: 4daf953a65dc8c65.651a28eead949b26<:a1b124d622a55745 with Service -> localhost:8443 with AppId -> hakans-mbp.home
	at nl.altindag.client.service.RequestService.execute(RequestService.java:32)
	at nl.altindag.client.stepdefs.HelloStepDefs.lambda$iSayHelloWithClient$0(HelloStepDefs.java:61)
	at java.base/java.util.Optional.map(Optional.java:260)
	at nl.altindag.client.stepdefs.HelloStepDefs.iSayHelloWithClient(HelloStepDefs.java:61)
	at ✽.I say hello with "Finagle"(classpath:Hello.feature:6)
Caused by: java.util.concurrent.ExecutionException: Failure(null at remote address: localhost/127.0.0.1:8443. Remote Info: Not Available, flags=0x08) with RemoteInfo -> Upstream Address: Not Available, Upstream id: Not Available, Downstream Address: localhost/127.0.0.1:8443, Downstream label: localhost:8443, Trace Id: 4daf953a65dc8c65.651a28eead949b26<:a1b124d622a55745 with Service -> localhost:8443 with AppId -> hakans-mbp.home
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
	at nl.altindag.client.service.FinagleHttpClientService.executeRequest(FinagleHttpClientService.java:51)
	at nl.altindag.client.service.RequestService.execute(RequestService.java:30)
	at nl.altindag.client.stepdefs.HelloStepDefs.lambda$iSayHelloWithClient$0(HelloStepDefs.java:61)
	at java.base/java.util.Optional.map(Optional.java:260)
	at nl.altindag.client.stepdefs.HelloStepDefs.iSayHelloWithClient(HelloStepDefs.java:61)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:354)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)
	at org.springframework.aop.aspectj.AspectJAfterAdvice.invoke(AspectJAfterAdvice.java:49)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:173)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)
	at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:58)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:173)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:720)
	at nl.altindag.client.stepdefs.HelloStepDefs$$SpringCGLIB$$0.iSayHelloWithClient(<generated>)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at io.cucumber.java.Invoker.doInvoke(Invoker.java:66)
	at io.cucumber.java.Invoker.invoke(Invoker.java:24)
	at io.cucumber.java.AbstractGlueDefinition.invokeMethod(AbstractGlueDefinition.java:47)
	at io.cucumber.java.JavaStepDefinition.execute(JavaStepDefinition.java:29)
	at io.cucumber.core.runner.CoreStepDefinition.execute(CoreStepDefinition.java:66)
	at io.cucumber.core.runner.PickleStepDefinitionMatch.runStep(PickleStepDefinitionMatch.java:63)
	at io.cucumber.core.runner.ExecutionMode$1.execute(ExecutionMode.java:10)
	at io.cucumber.core.runner.TestStep.executeStep(TestStep.java:81)
	at io.cucumber.core.runner.TestStep.run(TestStep.java:53)
	at io.cucumber.core.runner.PickleStepTestStep.run(PickleStepTestStep.java:51)
	at io.cucumber.core.runner.TestCase.run(TestCase.java:84)
	at io.cucumber.core.runner.Runner.runPickle(Runner.java:75)
	at io.cucumber.core.runtime.Runtime.lambda$executePickle$6(Runtime.java:107)
	at io.cucumber.core.runtime.CucumberExecutionContext.lambda$runTestCase$5(CucumberExecutionContext.java:136)
	at io.cucumber.core.runtime.RethrowingThrowableCollector.executeAndThrow(RethrowingThrowableCollector.java:23)
	at io.cucumber.core.runtime.CucumberExecutionContext.runTestCase(CucumberExecutionContext.java:136)
	at io.cucumber.core.runtime.Runtime.lambda$executePickle$7(Runtime.java:107)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at io.cucumber.core.runtime.Runtime$SameThreadExecutorService.execute(Runtime.java:235)
	at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:123)
	at io.cucumber.core.runtime.Runtime.lambda$runFeatures$3(Runtime.java:89)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.stream.SliceOps$1$1.accept(SliceOps.java:200)
	at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1602)
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
	at io.cucumber.core.runtime.Runtime.runFeatures(Runtime.java:90)
	at io.cucumber.core.runtime.Runtime.lambda$run$0(Runtime.java:78)
	at io.cucumber.core.runtime.CucumberExecutionContext.lambda$runFeatures$6(CucumberExecutionContext.java:147)
	at io.cucumber.core.runtime.CucumberExecutionContext.execute(CucumberExecutionContext.java:162)
	at io.cucumber.core.runtime.CucumberExecutionContext.runFeatures(CucumberExecutionContext.java:145)
	at io.cucumber.core.runtime.Runtime.run(Runtime.java:78)
	at io.cucumber.core.cli.Main.run(Main.java:87)
	at io.cucumber.core.cli.Main.main(Main.java:30)
	at nl.altindag.client.ClientRunner.main(ClientRunner.java:34)
Caused by: Failure(null at remote address: localhost/127.0.0.1:8443. Remote Info: Not Available, flags=0x08) with RemoteInfo -> Upstream Address: Not Available, Upstream id: Not Available, Downstream Address: localhost/127.0.0.1:8443, Downstream label: localhost:8443, Trace Id: 4daf953a65dc8c65.651a28eead949b26<:a1b124d622a55745 with Service -> localhost:8443 with AppId -> hakans-mbp.home
Caused by: com.twitter.finagle.ConnectionFailedException: null at remote address: localhost/127.0.0.1:8443. Remote Info: Not Available
	at com.twitter.finagle.netty4.ConnectionBuilder$$anon$1.operationComplete(ConnectionBuilder.scala:105)
	at com.twitter.finagle.netty4.ConnectionBuilder$$anon$1.operationComplete(ConnectionBuilder.scala:84)
	at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:590)
	at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:557)
	at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:492)
	at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:636)
	at io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:629)
	at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:118)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.safeSetFailure(AbstractChannel.java:999)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.ensureOpen(AbstractChannel.java:982)
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.connect(AbstractNioChannel.java:239)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.connect(DefaultChannelPipeline.java:1342)
	at io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:655)
	at io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:634)
	at io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:618)
	at io.netty.channel.DefaultChannelPipeline.connect(DefaultChannelPipeline.java:978)
	at io.netty.channel.AbstractChannel.connect(AbstractChannel.java:265)
	at io.netty.bootstrap.Bootstrap$3.run(Bootstrap.java:264)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at com.twitter.finagle.util.BlockingTimeTrackingThreadFactory$$anon$1.run(BlockingTimeTrackingThreadFactory.scala:23)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: io.netty.channel.StacklessClosedChannelException
	at io.netty.channel.AbstractChannel$AbstractUnsafe.ensureOpen(ChannelPromise)(Unknown Source)

  Then I expect to receive status code 200                # nl.altindag.client.stepdefs.HelloStepDefs.iExpectToReceiveStatusCodeStatusCode(int)
  And I expect to receive "Hello" message                 # nl.altindag.client.stepdefs.HelloStepDefs.iExpectToReceiveBody(java.lang.String)
  And I display the time it took to get the message       # nl.altindag.client.stepdefs.HelloStepDefs.iDisplayTheTimeItTookToGetTheMessage()

Failed scenarios:
classpath:Hello.feature:26 # Saying hello to the Server with Finagle

1 Scenarios (1 failed)
5 Steps (1 failed, 3 skipped, 1 passed)
0m5,662s


nl.altindag.client.ClientException: java.util.concurrent.ExecutionException: Failure(null at remote address: localhost/127.0.0.1:8443. Remote Info: Not Available, flags=0x08) with RemoteInfo -> Upstream Address: Not Available, Upstream id: Not Available, Downstream Address: localhost/127.0.0.1:8443, Downstream label: localhost:8443, Trace Id: 4daf953a65dc8c65.651a28eead949b26<:a1b124d622a55745 with Service -> localhost:8443 with AppId -> hakans-mbp.home
	at nl.altindag.client.service.RequestService.execute(RequestService.java:32)
	at nl.altindag.client.stepdefs.HelloStepDefs.lambda$iSayHelloWithClient$0(HelloStepDefs.java:61)
	at java.base/java.util.Optional.map(Optional.java:260)
	at nl.altindag.client.stepdefs.HelloStepDefs.iSayHelloWithClient(HelloStepDefs.java:61)
	at ✽.I say hello with "Finagle"(classpath:Hello.feature:6)
Caused by: java.util.concurrent.ExecutionException: Failure(null at remote address: localhost/127.0.0.1:8443. Remote Info: Not Available, flags=0x08) with RemoteInfo -> Upstream Address: Not Available, Upstream id: Not Available, Downstream Address: localhost/127.0.0.1:8443, Downstream label: localhost:8443, Trace Id: 4daf953a65dc8c65.651a28eead949b26<:a1b124d622a55745 with Service -> localhost:8443 with AppId -> hakans-mbp.home
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
	at nl.altindag.client.service.FinagleHttpClientService.executeRequest(FinagleHttpClientService.java:51)
	at nl.altindag.client.service.RequestService.execute(RequestService.java:30)
	at nl.altindag.client.stepdefs.HelloStepDefs.lambda$iSayHelloWithClient$0(HelloStepDefs.java:61)
	at java.base/java.util.Optional.map(Optional.java:260)
	at nl.altindag.client.stepdefs.HelloStepDefs.iSayHelloWithClient(HelloStepDefs.java:61)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:354)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)
	at org.springframework.aop.aspectj.AspectJAfterAdvice.invoke(AspectJAfterAdvice.java:49)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:173)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)
	at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:58)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:173)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:720)
	at nl.altindag.client.stepdefs.HelloStepDefs$$SpringCGLIB$$0.iSayHelloWithClient(<generated>)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at io.cucumber.java.Invoker.doInvoke(Invoker.java:66)
	at io.cucumber.java.Invoker.invoke(Invoker.java:24)
	at io.cucumber.java.AbstractGlueDefinition.invokeMethod(AbstractGlueDefinition.java:47)
	at io.cucumber.java.JavaStepDefinition.execute(JavaStepDefinition.java:29)
	at io.cucumber.core.runner.CoreStepDefinition.execute(CoreStepDefinition.java:66)
	at io.cucumber.core.runner.PickleStepDefinitionMatch.runStep(PickleStepDefinitionMatch.java:63)
	at io.cucumber.core.runner.ExecutionMode$1.execute(ExecutionMode.java:10)
	at io.cucumber.core.runner.TestStep.executeStep(TestStep.java:81)
	at io.cucumber.core.runner.TestStep.run(TestStep.java:53)
	at io.cucumber.core.runner.PickleStepTestStep.run(PickleStepTestStep.java:51)
	at io.cucumber.core.runner.TestCase.run(TestCase.java:84)
	at io.cucumber.core.runner.Runner.runPickle(Runner.java:75)
	at io.cucumber.core.runtime.Runtime.lambda$executePickle$6(Runtime.java:107)
	at io.cucumber.core.runtime.CucumberExecutionContext.lambda$runTestCase$5(CucumberExecutionContext.java:136)
	at io.cucumber.core.runtime.RethrowingThrowableCollector.executeAndThrow(RethrowingThrowableCollector.java:23)
	at io.cucumber.core.runtime.CucumberExecutionContext.runTestCase(CucumberExecutionContext.java:136)
	at io.cucumber.core.runtime.Runtime.lambda$executePickle$7(Runtime.java:107)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at io.cucumber.core.runtime.Runtime$SameThreadExecutorService.execute(Runtime.java:235)
	at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:123)
	at io.cucumber.core.runtime.Runtime.lambda$runFeatures$3(Runtime.java:89)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.stream.SliceOps$1$1.accept(SliceOps.java:200)
	at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1602)
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
	at io.cucumber.core.runtime.Runtime.runFeatures(Runtime.java:90)
	at io.cucumber.core.runtime.Runtime.lambda$run$0(Runtime.java:78)
	at io.cucumber.core.runtime.CucumberExecutionContext.lambda$runFeatures$6(CucumberExecutionContext.java:147)
	at io.cucumber.core.runtime.CucumberExecutionContext.execute(CucumberExecutionContext.java:162)
	at io.cucumber.core.runtime.CucumberExecutionContext.runFeatures(CucumberExecutionContext.java:145)
	at io.cucumber.core.runtime.Runtime.run(Runtime.java:78)
	at io.cucumber.core.cli.Main.run(Main.java:87)
	at io.cucumber.core.cli.Main.main(Main.java:30)
	at nl.altindag.client.ClientRunner.main(ClientRunner.java:34)
Caused by: Failure(null at remote address: localhost/127.0.0.1:8443. Remote Info: Not Available, flags=0x08) with RemoteInfo -> Upstream Address: Not Available, Upstream id: Not Available, Downstream Address: localhost/127.0.0.1:8443, Downstream label: localhost:8443, Trace Id: 4daf953a65dc8c65.651a28eead949b26<:a1b124d622a55745 with Service -> localhost:8443 with AppId -> hakans-mbp.home
Caused by: com.twitter.finagle.ConnectionFailedException: null at remote address: localhost/127.0.0.1:8443. Remote Info: Not Available
	at com.twitter.finagle.netty4.ConnectionBuilder$$anon$1.operationComplete(ConnectionBuilder.scala:105)
	at com.twitter.finagle.netty4.ConnectionBuilder$$anon$1.operationComplete(ConnectionBuilder.scala:84)
	at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:590)
	at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:557)
	at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:492)
	at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:636)
	at io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:629)
	at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:118)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.safeSetFailure(AbstractChannel.java:999)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.ensureOpen(AbstractChannel.java:982)
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.connect(AbstractNioChannel.java:239)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.connect(DefaultChannelPipeline.java:1342)
	at io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:655)
	at io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:634)
	at io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:618)
	at io.netty.channel.DefaultChannelPipeline.connect(DefaultChannelPipeline.java:978)
	at io.netty.channel.AbstractChannel.connect(AbstractChannel.java:265)
	at io.netty.bootstrap.Bootstrap$3.run(Bootstrap.java:264)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at com.twitter.finagle.util.BlockingTimeTrackingThreadFactory$$anon$1.run(BlockingTimeTrackingThreadFactory.scala:23)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: io.netty.channel.StacklessClosedChannelException
	at io.netty.channel.AbstractChannel$AbstractUnsafe.ensureOpen(ChannelPromise)(Unknown Source)

To Reproduce
Steps to reproduce the behavior:

  1. git clone [email protected]:Hakky54/mutual-tls-ssl.git or go to https://github.com/Hakky54/mutual-tls-ssl and download the repo
  2. Bump finagle at this place: https://github.com/Hakky54/mutual-tls-ssl/blob/master/pom.xml#L46 to version 22.12.0 or higher
  3. run init script to prepare ssl material: ./script/configure-two-way-authentication-by-trusting-root-ca.sh black-hole
  4. Run ./mvnw clean install
  5. Analyse the integration test of the client module to find the error
  6. Downgrade it to version 22.7.0 and rerun the maven command and it will pass

Expected behavior
I would expect the test to pass, but it fails

Environment
Finagle: 22.12.0
Java: 17 (OpenJDK)
Maven 3.6.3
OS: Mac OS X 14.5

Additional context
I used code snippet in project to configure finagle:

@Bean
public Service<Request, Response> finagle(SSLFactory sslFactory) throws URISyntaxException {
    var uri = new URI(Constants.getServerUrl());
    var client = Http.client().withNoHttp2();
    if (uri.getScheme().equals("https")) {
        client = client.withTransport()
                .tls(sslFactory.getSslContext());
    }
    return client.newService(uri.getHost() + ":" + uri.getPort());
}

When I debug the code in intellij I see that the protocol is supported, however the supported switch case is throwing an exception which should not happen right. Not supported or unknown protocol should throw an exception I would assume. See here:

Screenshot 2024-08-02 at 15 50 11
@Hakky54
Copy link
Author

Hakky54 commented Sep 4, 2024

hi guys, did you got the chance to look at this issue? Would love to get your input on the issue which I have.

@canoztokmak
Copy link

@Hakky54 have you found a workaround for this ?

@Hakky54
Copy link
Author

Hakky54 commented Nov 26, 2024

No, I haven't. I tried even downgrading/upgrading every transitive dependency Independently but that also didn't work. Are you also facing the same issue?

@canoztokmak
Copy link

@Hakky54 Yes. Obviously the behavior is changed in some way, but couldn't figure out how yet.

@Hakky54
Copy link
Author

Hakky54 commented Nov 26, 2024

I have the feeling that it is related to the code changes. I have not received any response from the maintainers... So I have the feeling that it can only be resolved fast if I compare the differences between the two versions myself. The only downside is that I don't have much scala knowledge. What about combining the effort and doing together?

@canoztokmak
Copy link

canoztokmak commented Nov 26, 2024

I tried debugging the issue in the deeper levels of the code and I might have found the issue and the workaround for it.

In the previous versions, the below code would not add Alpn protocol by default when withNoHttp2 is passed.
187e338#diff-5792b868660e9894068eef01136f5024a5dbce5609a399b9900af30ea142b245R90

However, in the recent versions, when you pick withNoHttp2, by default the above Alpn stack param is added to the client params.

After the client is initialized successfully, netty tries to establish a connection with the target.
At the line below, the netty tries to combine the protocol params you set in your SSL configuration with the ones exists in the Stack.Params.
https://github.com/twitter/finagle/blob/develop/finagle-netty4/src/main/scala/com/twitter/finagle/netty4/ssl/client/Netty4ClientSslChannelInitializer.scala#L140

In the previous versions, both would have Unspecified and it would pass the checks in the screenshot in your original message. But now, the client stack.params contains a Alpn param and it fails.

The workaround I have is to bypass the checks in that class altogether by creating a custom SslClientEngineFactory and passing it to the client as below:

final class CustomClientEngineFactory(sslContext: SSLContext) extends SslClientEngineFactory {
  def apply(address: Address, config: SslClientConfiguration): Engine = {
    // Initially there were 3 checks here!!
    val engine = SslClientEngineFactory.createEngine(sslContext, address, config)
    SslClientEngineFactory.configureEngine(engine, config)
    engine
  }
}

Http.client
        // could be more stuff here
        .tls(SslClientConfiguration(hostname = Some(host)), new CustomClientEngineFactory(sslContext))

The skipped checked can be seen here: https://github.com/twitter/finagle/blob/develop/finagle-core/src/main/scala/com/twitter/finagle/ssl/client/SslContextClientEngineFactory.scala#L26

I'm not sure about the implications of this change, but it works locally for my use case. It would be better if the maintainers could chime in and talk about the implications or suggest a workaround.

@Hakky54
Copy link
Author

Hakky54 commented Nov 26, 2024

Thank you for pointing out and doing this analysis! I have tried to override the Application protocols by creating a SslClientConfiguration instead of just passing a SSLContext to the client as shown here. In this way I was able to pass empty protocols and it worked, however my compiler had issues with me using scala code in java code. I was not able to fix that, so I had converted my finagle client configuration and http request service into scala and now it just work with the latest version.

I don't need the withNoHttp2. With and without that option the request still pases. I can use client.withTransport.tls(sslContext) and it works, however I found out that the recommended way is to use client.withTransport.tls(sslClientConfiguration)

So basically the code changes of the finagle maintainers didn't sort of introduce regression. If I just write it in scala it works, however if I write it in java it fails after version 22.7.0. I am not sure what to do with this issue. I have adjusted my code example here: Hakky54/mutual-tls-ssl#108 and it just works however, I know that there are a-lot java developers who use finagle in a plain java setup who will encounter this issue. What is your situation @canoztokmak are you using it in a java code base like I did?

@canoztokmak
Copy link

@Hakky54 no we are using it in a scala project. I didn't have time to try your suggestion, as it will require a significant code change in our codebase. I really would like to hear from the maintainers whether this behavior change is intended, or a side effect ?

@Hakky54
Copy link
Author

Hakky54 commented Nov 29, 2024

Hi @jyanJing and @tigerlily-he not quite sure whether you both are still involved and maintaining the finagle project. Some time ago you both responded on my earlier github issue here: #913 it is related to the same issue as what is still happening after version 22.12.0 Any idea how this can be properly resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants