I created a reproducible problem combining two templates:
- lagom/lagom-scala.g8
- playframework/play-scala-seed.g8
This is loosely based on this helpful article:
The difference is that I used Scala only and compile-time dependency injection.
I made two variants of this project:
- Branch lagom-1.6.1 is based on Lagom 1.6.1 + Play 2.8 compiled with Scala 2.13.1
- Branch lagom-1.5.5 is based on Lagom 1.5.5 + Play 2.7.4 compiled with Scala 2.12.9
With Lagom 1.5.5, the service gateway works as expected; that is,
it responds to http://localhost:9000/* requests.
With Lagom 1.6.1, the service gateway doesn’t work at all.
Requests to http://localhost:9000/* are rejected with an error that suggests
that the service gateway would be listening on http://0.0.0.0:9000
according to the error I see in sbt:
2020-04-13T03:37:11.253Z [error] akka.actor.ActorSystemImpl [akkaAddress=akka://application, sourceThread=application-akka.actor.default-dispatcher-18, akkaSource=akka.actor.ActorSystemImpl(application), sourceActorSystem=application, akkaTimestamp=03:37:11.245UTC] - Internal server error, sending 500 response
akka.stream.StreamTcpException: Tcp command [Connect(0.0.0.0:9000,None,List(),Some(10 seconds),true)] failed because of java.net.ConnectException: Connection refused
Caused by: java.net.ConnectException: Connection refused
at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:779)
at akka.io.TcpOutgoingConnection$$anonfun$connecting$1.$anonfun$applyOrElse$3(TcpOutgoingConnection.scala:104)
at akka.io.TcpOutgoingConnection.akka$io$TcpOutgoingConnection$$reportConnectFailure(TcpOutgoingConnection.scala:51)
at akka.io.TcpOutgoingConnection$$anonfun$connecting$1.applyOrElse(TcpOutgoingConnection.scala:104)
at akka.actor.Actor.aroundReceive(Actor.scala:534)
at akka.actor.Actor.aroundReceive$(Actor.scala:532)
at akka.io.TcpConnection.aroundReceive(TcpConnection.scala:32)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:573)
| => Tat akka.actor.ActorCell.invoke(ActorCell.scala:543)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:269)
at akka.dispatch.Mailbox.run(Mailbox.scala:230)
at akka.dispatch.Mailbox.exec(Mailbox.scala:242)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Yet, if I start with: sbt -Dhttp.address=127.0.0.1 runAll
, then requests
to http://localhost:9000/* just hang.
All the details are in the README.md of both branches.
Does anyone know what’s going on w/ the Lagom 1.6 ServiceGateway?
- Nicolas.