Search code examples
akka-streamakka-http

akka http client system.shutdown() produce "Outgoing request stream error (akka.stream.AbruptTerminationException)" when using https


Hi the following code works as expected.

implicit val system = ActorSystem()
implicit val materializer = ActorMaterializer()

import system.dispatcher

val request = HttpRequest(uri = "http://www.google.com")

Http.get(system).singleRequest(request).map(_.entity.dataBytes.runWith(Sink.ignore))
  .onComplete { _ =>
    println("shutting down actor system...")
    system.terminate()
  }

However, if I change http://www.google.com to https://www.google.com like the following:

implicit val system = ActorSystem()
implicit val materializer = ActorMaterializer()

import system.dispatcher

val request = HttpRequest(uri = "https://www.google.com")

Http.get(system).singleRequest(request).map(_.entity.dataBytes.runWith(Sink.ignore))
  .onComplete { _ =>
    println("shutting down actor system...")
    system.terminate()
  }

I get the following error message:

shutting down actor system...
[ERROR] [02/11/2017 13:13:08.929] [default-akka.actor.default-dispatcher-4] [akka.actor.ActorSystemImpl(default)] Outgoing request stream error (akka.stream.AbruptTerminationException)

Anyone knows why https produces above error and how can I fix it?


Solution

  • It is apparently a known issue, see the following tickets:

    The error seems harmless.