{"action":"opened","issue":{"url":"https://api.github.com/repos/netty/netty/issues/8685","repository_url":"https://api.github.com/repos/netty/netty","labels_url":"https://api.github.com/repos/netty/netty/issues/8685/labels{/name}","comments_url":"https://api.github.com/repos/netty/netty/issues/8685/comments","events_url":"https://api.github.com/repos/netty/netty/issues/8685/events","html_url":"https://github.com/netty/netty/issues/8685","id":393702442,"node_id":"MDU6SXNzdWUzOTM3MDI0NDI=","number":8685,"title":"Behavior of Netty on Hanging Remotely-closed Proxy Connection","user":{"login":"eaglerainbow","id":12811079,"node_id":"MDQ6VXNlcjEyODExMDc5","avatar_url":"https://avatars2.githubusercontent.com/u/12811079?v=4","gravatar_id":"","url":"https://api.github.com/users/eaglerainbow","html_url":"https://github.com/eaglerainbow","followers_url":"https://api.github.com/users/eaglerainbow/followers","following_url":"https://api.github.com/users/eaglerainbow/following{/other_user}","gists_url":"https://api.github.com/users/eaglerainbow/gists{/gist_id}","starred_url":"https://api.github.com/users/eaglerainbow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eaglerainbow/subscriptions","organizations_url":"https://api.github.com/users/eaglerainbow/orgs","repos_url":"https://api.github.com/users/eaglerainbow/repos","events_url":"https://api.github.com/users/eaglerainbow/events{/privacy}","received_events_url":"https://api.github.com/users/eaglerainbow/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-22T20:53:59Z","updated_at":"2018-12-22T20:53:59Z","closed_at":null,"author_association":"NONE","body":"In https://github.com/promregator/promregator/issues/83 I am currently struggling with outbound HTTP connections which use HttpProxyHandler. Scenario is as following:\r\n\r\n* Promregator is a client application which uses https://github.com/cloudfoundry/cf-java-client\r\n* cf-java-client in turn is using netty for making outbound TCP HTTP connections.\r\n* In the scenario, an HTTP proxy must be used to reach the server endpoint on the other end. No authentication, no SOCKS...\r\n* Promregator is creating HTTP requests periodically - usually every 15-60 seconds.\r\n* Obviously proxy connections get pooled/reused by netty.\r\n\r\nInitially the setup works fine and hundreds of requests can be sent successfully. After some time (usually around 1h), the entire application start to hang, though. The log statements indicate that no further connections can be made to the server.\r\nBy chance I could observe the network wire in such a situation and observed that the TCP connection between the application and the proxy server was closed by the proxy. The application considered the socket to still be open. The assumption is that the proxy simply dropped the connection in an unfriendly way (e.g. the proxy has a \"maximal time to live\" timeout for open connections).\r\n\r\nI tried to read through the docs and many of the issues related to the search term \"proxy\" here, but I could not find any documentation describing how netty is expected to handle this situation (but perhaps I am simply not deep enough in the framework - NB I am from high up in OSI level 7 😁 )\r\n\r\nWhat is the expected behavior based on your point of view for this scenario?\r\nShould this situation be handled by netty or what would an application have to do to properly handle the  situation?\r\n\r\n### Actual Behavior\r\nThe closed proxy connection apparently is kept open and obviously blocks resources. No further connections are processed.\r\n\r\n### Expected Behavior\r\nThe socket of the closed proxy connection should be closed properly and - if needed - a new connection to the proxy shall established for the \"broken\" one.\r\n(it is unclear to me, whether this is a task for netty or for the consumer of netty - in this case here: cf-java-client)\r\n\r\n### Netty version\r\n4.1.31\r\n\r\n### JVM version (e.g. `java -version`)\r\n```\r\nopenjdk version \"1.8.0_181\"\r\nOpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-2~deb9u1-b13)\r\nOpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)\r\n```\r\n### OS version (e.g. `uname -a`)\r\n``` \r\nLinux 8aeb66cfbf47 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64 GNU/linux\r\n```"}}
{"actor":{"display_login":"eaglerainbow"}}