lagom / lagom-scala.g8

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gateway http://localhost:9000/api/hello/123 fails with java.net.SocketException: Invalid argument

hossameldeen opened this issue · comments

If you try http://localhost:9000/api/hello/123, you'd get:

2019-01-14T00:47:46.420Z [error] akka.actor.ActorSystemImpl [sourceThread=application-akka.actor.default-dispatcher-19, akkaSource=akka.actor.ActorSystemImpl(application), sourceActorSystem=application, akkaTimestamp=00:47:46.419UTC] - Internal server error, sending 500 response
akka.stream.StreamTcpException: Tcp command [Connect(0.0.0.0:58859,None,List(),Some(10 seconds),true)] failed because of java.net.SocketException: Invalid argument
Caused by: java.net.SocketException: Invalid argument
	at sun.nio.ch.Net.connect0(Native Method)
	at sun.nio.ch.Net.connect(Net.java:454)
	at sun.nio.ch.Net.connect(Net.java:446)
	at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:648)
	at akka.io.TcpOutgoingConnection.$anonfun$register$1(TcpOutgoingConnection.scala:87)

However, if you access hello-stream service directly on the port 58859, it'll work correctly (i.e., http://localhost:58859/api/hello/123 works).

Reproduction steps:

  • Downloaded scala-sbt lagom example from TechHub.
  • Imported it into Intellij.
  • Ran sbt runAll task.

Note: New to Lagom & might be totally mistaken :-)

hi @hossameldeen, I'm afraid with the details you provided I get a successful result. Please review the steps. Cheers.

I'll close this issue.