{"action":"created","issue":{"url":"https://api.github.com/repos/akka/akka-http/issues/497","repository_url":"https://api.github.com/repos/akka/akka-http","labels_url":"https://api.github.com/repos/akka/akka-http/issues/497/labels{/name}","comments_url":"https://api.github.com/repos/akka/akka-http/issues/497/comments","events_url":"https://api.github.com/repos/akka/akka-http/issues/497/events","html_url":"https://github.com/akka/akka-http/issues/497","id":188074838,"number":497,"title":"Processor actor terminated abruptly on HTTPs connections (akka 2.4.12, akka-http 2.4.11)","user":{"login":"samidalouche","id":142329,"avatar_url":"https://avatars.githubusercontent.com/u/142329?v=3","gravatar_id":"","url":"https://api.github.com/users/samidalouche","html_url":"https://github.com/samidalouche","followers_url":"https://api.github.com/users/samidalouche/followers","following_url":"https://api.github.com/users/samidalouche/following{/other_user}","gists_url":"https://api.github.com/users/samidalouche/gists{/gist_id}","starred_url":"https://api.github.com/users/samidalouche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samidalouche/subscriptions","organizations_url":"https://api.github.com/users/samidalouche/orgs","repos_url":"https://api.github.com/users/samidalouche/repos","events_url":"https://api.github.com/users/samidalouche/events{/privacy}","received_events_url":"https://api.github.com/users/samidalouche/received_events","type":"User","site_admin":false},"labels":[{"id":430145635,"url":"https://api.github.com/repos/akka/akka-http/labels/1%20-%20triaged","name":"1 - triaged","color":"5319e7","default":false},{"id":427494657,"url":"https://api.github.com/repos/akka/akka-http/labels/bug","name":"bug","color":"ee0701","default":true},{"id":439061009,"url":"https://api.github.com/repos/akka/akka-http/labels/t:core","name":"t:core","color":"ededed","default":false},{"id":439004105,"url":"https://api.github.com/repos/akka/akka-http/labels/t:stream","name":"t:stream","color":"cccccc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/akka/akka-http/milestones/5","html_url":"https://github.com/akka/akka-http/milestone/5","labels_url":"https://api.github.com/repos/akka/akka-http/milestones/5/labels","id":1991250,"number":5,"title":"backlog","description":"","creator":{"login":"akka-ci","id":2511948,"avatar_url":"https://avatars.githubusercontent.com/u/2511948?v=3","gravatar_id":"","url":"https://api.github.com/users/akka-ci","html_url":"https://github.com/akka-ci","followers_url":"https://api.github.com/users/akka-ci/followers","following_url":"https://api.github.com/users/akka-ci/following{/other_user}","gists_url":"https://api.github.com/users/akka-ci/gists{/gist_id}","starred_url":"https://api.github.com/users/akka-ci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka-ci/subscriptions","organizations_url":"https://api.github.com/users/akka-ci/orgs","repos_url":"https://api.github.com/users/akka-ci/repos","events_url":"https://api.github.com/users/akka-ci/events{/privacy}","received_events_url":"https://api.github.com/users/akka-ci/received_events","type":"User","site_admin":false},"open_issues":111,"closed_issues":25,"state":"open","created_at":"2016-09-08T14:27:28Z","updated_at":"2017-01-12T15:11:31Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-11-08T18:58:46Z","updated_at":"2017-02-05T08:30:25Z","closed_at":null,"body":"I posted on [akka-user](https://groups.google.com/forum/#!topic/akka-user/yVXgEQ8v434), but since I believe it might be a bug, I am opening an issue for that.\r\n\r\nThe problem seems to be that when performing `HTTPS` queries using a connection pool, shutting down the actor system raises the following error: \r\n\r\n```\r\nERROR akka.actor.ActorSystemImpl - Outgoing request stream error\r\nakka.stream.AbruptTerminationException: Processor actor [Actor[akka://default/user/StreamSupervisor-1/flow-0-0-unknown-operation#-901476425]] terminated abruptly\r\n```\r\n\r\nAn example of simple code that reproduces the problem  (replace the `https` prefix by `http` in the `uri` field to make the problem disappear)\r\n\r\n```scala\r\nobject HttpsWithConnectionPoolIssue extends App {\r\n\r\n  implicit val system = ActorSystem()\r\n  implicit val materializer = ActorMaterializer()\r\n  implicit val timeout = Timeout(10.seconds)\r\n  import system.dispatcher\r\n\r\n  val request = HttpRequest(\r\n    uri = \"https://httpstatuses.com/200\"\r\n  )\r\n\r\n  val future = Http(system)\r\n    .singleRequest(request)\r\n    .map(_.discardEntityBytes())\r\n\r\n  val systemTerminatedFuture = future.flatMap { _ =>\r\n    Http().shutdownAllConnectionPools().flatMap { _ =>\r\n      materializer.shutdown()\r\n      system.terminate()\r\n    }\r\n  }\r\n\r\n  Await.result(systemTerminatedFuture, Duration.Inf)\r\n}\r\n```\r\n\r\nAn example of code that does not exhibit the problem (no connection pool)\r\n\r\n```scala\r\nobject HTTPsConnectionNotExhibitingProblem extends App {\r\n\r\n  implicit val system = ActorSystem()\r\n  implicit val materializer = ActorMaterializer()\r\n  implicit val timeout = Timeout(10.seconds)\r\n  import system.dispatcher\r\n\r\n  val request = HttpRequest(\r\n    uri = \"/200\"\r\n  )\r\n\r\n  val flow = Http(system).outgoingConnectionHttps(\"httpstatuses.com\")\r\n\r\n  val source = Source.single(request)\r\n    .via(flow)\r\n    .map(_.discardEntityBytes())\r\n\r\n  val sourceProcessed = source.runWith(Sink.ignore)\r\n\r\n  val systemTerminatedFuture = sourceProcessed.flatMap { _ =>\r\n    Http().shutdownAllConnectionPools().flatMap { _ =>\r\n      materializer.shutdown()\r\n      system.terminate()\r\n    }\r\n  }\r\n\r\n  Await.result(systemTerminatedFuture, Duration.Inf)\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/akka/akka-http/issues/comments/277504756","html_url":"https://github.com/akka/akka-http/issues/497#issuecomment-277504756","issue_url":"https://api.github.com/repos/akka/akka-http/issues/497","id":277504756,"user":{"login":"BusyByte","id":3882422,"avatar_url":"https://avatars.githubusercontent.com/u/3882422?v=3","gravatar_id":"","url":"https://api.github.com/users/BusyByte","html_url":"https://github.com/BusyByte","followers_url":"https://api.github.com/users/BusyByte/followers","following_url":"https://api.github.com/users/BusyByte/following{/other_user}","gists_url":"https://api.github.com/users/BusyByte/gists{/gist_id}","starred_url":"https://api.github.com/users/BusyByte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BusyByte/subscriptions","organizations_url":"https://api.github.com/users/BusyByte/orgs","repos_url":"https://api.github.com/users/BusyByte/repos","events_url":"https://api.github.com/users/BusyByte/events{/privacy}","received_events_url":"https://api.github.com/users/BusyByte/received_events","type":"User","site_admin":false},"created_at":"2017-02-05T08:30:25Z","updated_at":"2017-02-05T08:30:25Z","body":"We are also seeing this issue.  It's harmless as the code executes but really confusing to the users of our CLI which uses akka-http as they think there's been an error when nothing is wrong."}}
{"actor":{"display_login":"BusyByte"}}