{"action":"created","issue":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-gateway/issues/228","repository_url":"https://api.github.com/repos/spring-cloud/spring-cloud-gateway","labels_url":"https://api.github.com/repos/spring-cloud/spring-cloud-gateway/issues/228/labels{/name}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-gateway/issues/228/comments","events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-gateway/issues/228/events","html_url":"https://github.com/spring-cloud/spring-cloud-gateway/issues/228","id":304172402,"node_id":"MDU6SXNzdWUzMDQxNzI0MDI=","number":228,"title":"Cannot route to https URI: unexpected message type","user":{"login":"samtonyclarke","id":17018784,"node_id":"MDQ6VXNlcjE3MDE4Nzg0","avatar_url":"https://avatars1.githubusercontent.com/u/17018784?v=4","gravatar_id":"","url":"https://api.github.com/users/samtonyclarke","html_url":"https://github.com/samtonyclarke","followers_url":"https://api.github.com/users/samtonyclarke/followers","following_url":"https://api.github.com/users/samtonyclarke/following{/other_user}","gists_url":"https://api.github.com/users/samtonyclarke/gists{/gist_id}","starred_url":"https://api.github.com/users/samtonyclarke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samtonyclarke/subscriptions","organizations_url":"https://api.github.com/users/samtonyclarke/orgs","repos_url":"https://api.github.com/users/samtonyclarke/repos","events_url":"https://api.github.com/users/samtonyclarke/events{/privacy}","received_events_url":"https://api.github.com/users/samtonyclarke/received_events","type":"User","site_admin":false},"labels":[{"id":628238497,"node_id":"MDU6TGFiZWw2MjgyMzg0OTc=","url":"https://api.github.com/repos/spring-cloud/spring-cloud-gateway/labels/waiting%20for%20feedback","name":"waiting for feedback","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":35,"created_at":"2018-03-11T16:33:35Z","updated_at":"2018-06-07T18:52:34Z","closed_at":null,"author_association":"NONE","body":"Using GW M8 the following exception occurs when the GW tries to route to a URI over https.\r\n```\r\n        io.netty.handler.codec.EncoderException: java.lang.IllegalStateException: unexpected message type: DefaultHttpRequest\r\n\tat io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:106) ~[netty-codec-4.1.22.Final.jar:4.1.22.Final]\r\n\tat io.netty.channel.CombinedChannelDuplexHandler.write(CombinedChannelDuplexHandler.java:348) ~[netty-transport-4.1.22.Final.jar:4.1.22.Final]\r\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) ~[netty-transport-4.1.22.Final.jar:4.1.22.Final]\r\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:730) ~[netty-transport-4.1.22.Final.jar:4.1.22.Final]\r\n\tat io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:816) ~[netty-transport-4.1.22.Final.jar:4.1.22.Final]\r\n\tat io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:723) ~[netty-transport-4.1.22.Final.jar:4.1.22.Final]\r\n\tat reactor.ipc.netty.channel.ChannelOperationsHandler.doWrite(ChannelOperationsHandler.java:291) ~[reactor-netty-0.7.5.RELEASE.jar:0.7.5.RELEASE]\r\n\tat reactor.ipc.netty.channel.ChannelOperationsHandler.drain(ChannelOperationsHandler.java:465) ~[reactor-netty-0.7.5.RELEASE.jar:0.7.5.RELEASE]\r\n\tat reactor.ipc.netty.channel.ChannelOperationsHandler.flush(ChannelOperationsHandler.java:191) ~[reactor-netty-0.7.5.RELEASE.jar:0.7.5.RELEASE]\r\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:776) ~[netty-transport-4.1.22.Final.jar:4.1.22.Final]\r\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:802) ~[netty-transport-4.1.22.Final.jar:4.1.22.Final]\r\n\tat io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:814) ~[netty-transport-4.1.22.Final.jar:4.1.22.Final]\r\n\tat io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:794) ~[netty-transport-4.1.22.Final.jar:4.1.22.Final]\r\n\tat io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:831) ~[netty-transport-4.1.22.Final.jar:4.1.22.Final]\r\n\tat io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1051) ~[netty-transport-4.1.22.Final.jar:4.1.22.Final]\r\n\tat io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:300) ~[netty-transport-4.1.22.Final.jar:4.1.22.Final]\r\n\tat reactor.ipc.netty.http.HttpOperations.lambda$then$0(HttpOperations.java:135) ~[reactor-netty-0.7.5.RELEASE.jar:0.7.5.RELEASE]\r\n\tat reactor.ipc.netty.FutureMono.lambda$deferFuture$0(FutureMono.java:68) ~[reactor-netty-0.7.5.RELEASE.jar:0.7.5.RELEASE]\r\n\tat reactor.ipc.netty.FutureMono$DeferredFutureMono.subscribe(FutureMono.java:134) ~[reactor-netty-0.7.5.RELEASE.jar:0.7.5.RELEASE]\r\n\tat reactor.core.publisher.Mono.subscribe(Mono.java:3080) ~[reactor-core-3.1.5.RELEASE.jar:3.1.5.RELEASE]\r\n\tat reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.drain(MonoIgnoreThen.java:167) ~[reactor-core-3.1.5.RELEASE.jar:3.1.5.RELEASE]\r\n\tat reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:56) ~[reactor-core-3.1.5.RELEASE.jar:3.1.5.RELEASE]\r\n\tat reactor.core.publisher.Mono.subscribe(Mono.java:3080) ~[reactor-core-3.1.5.RELEASE.jar:3.1.5.RELEASE]\r\n\tat reactor.ipc.netty.NettyOutbound.subscribe(NettyOutbound.java:356) ~[reactor-netty-0.7.5.RELEASE.jar:0.7.5.RELEASE]\r\n\tat reactor.core.publisher.MonoSource.subscribe(MonoSource.java:51) ~[reactor-core-3.1.5.RELEASE.jar:3.1.5.RELEASE]\r\n\tat reactor.ipc.netty.channel.ChannelOperations.applyHandler(ChannelOperations.java:380) ~[reactor-netty-0.7.5.RELEASE.jar:0.7.5.RELEASE]\r\n\tat reactor.ipc.netty.http.client.HttpClientOperations.onHandlerStart(HttpClientOperations.java:501) ~[reactor-netty-0.7.5.RELEASE.jar:0.7.5.RELEASE]\r\n\tat io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) ~[netty-common-4.1.22.Final.jar:4.1.22.Final]\r\n\tat io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) ~[netty-common-4.1.22.Final.jar:4.1.22.Final]\r\n\tat io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463) ~[netty-transport-4.1.22.Final.jar:4.1.22.Final]\r\n\tat io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886) ~[netty-common-4.1.22.Final.jar:4.1.22.Final]\r\n\tat java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_144]\r\n```\r\n\r\nI will create a github repo with a sample to recreate the problem."},"comment":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-gateway/issues/comments/395527006","html_url":"https://github.com/spring-cloud/spring-cloud-gateway/issues/228#issuecomment-395527006","issue_url":"https://api.github.com/repos/spring-cloud/spring-cloud-gateway/issues/228","id":395527006,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTUyNzAwNg==","user":{"login":"mkreider329","id":26936680,"node_id":"MDQ6VXNlcjI2OTM2Njgw","avatar_url":"https://avatars3.githubusercontent.com/u/26936680?v=4","gravatar_id":"","url":"https://api.github.com/users/mkreider329","html_url":"https://github.com/mkreider329","followers_url":"https://api.github.com/users/mkreider329/followers","following_url":"https://api.github.com/users/mkreider329/following{/other_user}","gists_url":"https://api.github.com/users/mkreider329/gists{/gist_id}","starred_url":"https://api.github.com/users/mkreider329/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkreider329/subscriptions","organizations_url":"https://api.github.com/users/mkreider329/orgs","repos_url":"https://api.github.com/users/mkreider329/repos","events_url":"https://api.github.com/users/mkreider329/events{/privacy}","received_events_url":"https://api.github.com/users/mkreider329/received_events","type":"User","site_admin":false},"created_at":"2018-06-07T18:52:34Z","updated_at":"2018-06-07T18:52:34Z","author_association":"NONE","body":"Well, at the risk of convoluting this issue a bit, the run with http lasted 3 hours before throwing a new exception. This is the only time I've seen this exception \"ConnectTimeoutException connection timed out\", but it seems similar to \"SSLException: handshake timed out\" (one of the exceptions above).\r\n\r\nI plan to continue testing SSL, and will try to gather more system statistics to see if there are system bottlenecks.\r\n\r\nHere is the full stacktrace from the gateway output:\r\n```\r\n2018-06-07 12:54:44.366 ERROR 11959 --- [client-epoll-11] .a.w.r.e.DefaultErrorWebExceptionHandler : Failed to handle request [GET http://localhost:8080/integrationTest/1.0/app-name]\r\n\r\nio.netty.channel.ConnectTimeoutException: connection timed out: localhost/127.0.0.1:8081\r\n        at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe$1.run(AbstractNioChannel.java:267) ~[netty-transport-4.1.25.Final.jar!/:4.1.25.Final]\r\n        at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38) ~[netty-common-4.1.25.Final.jar!/:4.1.25.Final]\r\n        at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:125) ~[netty-common-4.1.25.Final.jar!/:4.1.25.Final]\r\n        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) ~[netty-common-4.1.25.Final.jar!/:4.1.25.Final]\r\n        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) ~[netty-common-4.1.25.Final.jar!/:4.1.25.Final]\r\n        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:465) ~[netty-transport-4.1.25.Final.jar!/:4.1.25.Final]\r\n        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) ~[netty-common-4.1.25.Final.jar!/:4.1.25.Final]\r\n        at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_131]\r\n\r\n2018-06-07 12:54:44.366 ERROR 11959 --- [client-epoll-12] .a.w.r.e.DefaultErrorWebExceptionHandler : Failed to handle request [GET http://localhost:8080/integra                                                   tionTest/1.0/app-name]\r\n\r\nio.netty.channel.ConnectTimeoutException: connection timed out: localhost/127.0.0.1:8081\r\n        at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe$1.run(AbstractNioChannel.java:267) ~[netty-transport-4.1.25.Final.jar!/:4.1.25.Final]\r\n        at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38) ~[netty-common-4.1.25.Final.jar!/:4.1.25.Final]\r\n        at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:125) ~[netty-common-4.1.25.Final.jar!/:4.1.25.Final]\r\n        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) ~[netty-common-4.1.25.Final.jar!/:4.1.25.Final]\r\n        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) ~[netty-common-4.1.25.Final.jar!/:4.1.25.Final]\r\n        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:465) ~[netty-transport-4.1.25.Final.jar!/:4.1.25.Final]\r\n        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) ~[netty-common-4.1.25.Final.jar!/:4.1.25.Final]\r\n        at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_131]\r\n\r\n2018-06-07 12:54:44.366 ERROR 11959 --- [client-epoll-10] .a.w.r.e.DefaultErrorWebExceptionHandler : Failed to handle request [GET http://localhost:8080/integra                                                   tionTest/1.0/app-name]\r\n\r\nio.netty.channel.ConnectTimeoutException: connection timed out: localhost/127.0.0.1:8081\r\n        at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe$1.run(AbstractNioChannel.java:267) ~[netty-transport-4.1.25.Final.jar!/:4.1.25.Final]\r\n        at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38) ~[netty-common-4.1.25.Final.jar!/:4.1.25.Final]\r\n        at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:125) ~[netty-common-4.1.25.Final.jar!/:4.1.25.Final]\r\n        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) ~[netty-common-4.1.25.Final.jar!/:4.1.25.Final]\r\n        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) ~[netty-common-4.1.25.Final.jar!/:4.1.25.Final]\r\n        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:465) ~[netty-transport-4.1.25.Final.jar!/:4.1.25.Final]\r\n        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) ~[netty-common-4.1.25.Final.jar!/:4.1.25.Final]\r\n        at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_131]\r\n```\r\n\r\nWhile the above exception "}}
{"actor":{"display_login":"mkreider329"}}