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

superPool logs UnknownHostException with HTTPS url but not HTTP urls #3138

Closed
arpit-saxena opened this issue May 7, 2020 · 2 comments
Closed
Labels
0 - new Ticket is unclear on it's purpose or if it is valid or not

Comments

@arpit-saxena
Copy link

arpit-saxena commented May 7, 2020

Here is a reproducer snippet:

import akka.stream.scaladsl.{Sink, Source}    
import akka.NotUsed
import scala.util.Success
import akka.http.scaladsl.model.HttpRequest
import akka.http.scaladsl.Http
import akka.actor.ActorSystem

implicit val system = ActorSystem()
Source.single((HttpRequest(uri = "https://a.com"), NotUsed))
          .via(Http().superPool[NotUsed]())
          .map(_ match {
              case (Success(v), _) => {v.discardEntityBytes(); println("Success")}
              case _ => println("Failure")
          })
          .runWith(Sink.ignore)

In this case, "Failure" is printed on the console but so are exceptions:

00:43:32.670 [default-akka.actor.default-dispatcher-5] ERROR akka.actor.ActorSystemImpl - Outgoing request stream error
akka.stream.StreamTcpException: Tcp command [Connect(a.com:443,None,List(),Some(10 seconds),true)] failed because of java.net.UnknownHostException: a.com
Caused by: java.net.UnknownHostException: a.com

If the URL is replaced with http://a.com, no exceptions are printed, only "Failure" is printed.

Is this expected behavior? I would expect it to either log exceptions in both cases or not log them in either

@jrudolph jrudolph added the 0 - new Ticket is unclear on it's purpose or if it is valid or not label May 11, 2020
@jrudolph
Copy link
Member

Hi @arpit-saxena, I tried to reproduce the issue but cannot find an issue between HTTP and HTTPS.

In neither case an exception is logged for me automatically. We might have fixed something in that regard, so can you check again with 10.1.12 or 10.2.0-M1?

@arpit-saxena
Copy link
Author

Hi @jrudolph, you are right. I don't see the error being logged with 10.1.12. For reference, I was using 10.1.11 when I opened the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new Ticket is unclear on it's purpose or if it is valid or not
Projects
None yet
Development

No branches or pull requests

2 participants