Services cannot register with service locator in 1.5.0-M* when behind a proxy
See original GitHub issueMy infrastructure is a bit hard to reproduce… When behind a proxy, and using 1.5.0-M2 or 1.5.0-M3, the service locator cannot ping other services (and they cannot register with the service locator), which results in a gateway timeout.
Notes:
This works without a hitch using lagom 1.4.x.
Reproducer:
~/Code/online-auction-scala on master! ⌚ 11:48:58
$ git diff . | cat
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 2705d3d..efaa9c0 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -3,8 +3,8 @@
//
// The Lagom plugin
-addSbtPlugin("com.lightbend.lagom" % "lagom-sbt-plugin" % "1.4.8")
+addSbtPlugin("com.lightbend.lagom" % "lagom-sbt-plugin" % "1.5.0-M3")
// Needed for importing the project into Eclipse
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4")
// Platform Tooling plugin
-addSbtPlugin("com.lightbend.rp" % "sbt-reactive-app" % "1.1.0")
+addSbtPlugin("com.lightbend.rp" % "sbt-reactive-app" % "1.4.0")
Stack trace:
[warn] c.l.l.i.s.r.ScalaServiceRegistryClient - Service registry replied with an error when looking up serviceName=[cas_native]
<!-- Some HTML here... -->
at com.lightbend.lagom.scaladsl.api.transport.TransportException$.$anonfun$fromCodeAndMessage$2(Exceptions.scala:224)
at scala.Option.fold(Option.scala:158)
at com.lightbend.lagom.scaladsl.api.transport.TransportException$.fromCodeAndMessage(Exceptions.scala:224)
at com.lightbend.lagom.scaladsl.api.deser.DefaultExceptionSerializer.fromCodeAndMessage(ExceptionSerializer.scala:115)
at com.lightbend.lagom.scaladsl.api.deser.DefaultExceptionSerializer.deserialize(ExceptionSerializer.scala:101)
at com.lightbend.lagom.internal.scaladsl.client.ScaladslServiceApiBridge.exceptionSerializerDeserializeHttpException(ScaladslServiceApiBridge.scala:83)
at com.lightbend.lagom.internal.scaladsl.client.ScaladslServiceApiBridge.exceptionSerializerDeserializeHttpException$(ScaladslServiceApiBridge.scala:81)
at com.lightbend.lagom.internal.scaladsl.client.ScaladslClientServiceCallInvoker.exceptionSerializerDeserializeHttpException(ScaladslServiceClientInvoker.scala:111)
at com.lightbend.lagom.internal.scaladsl.client.ScaladslClientServiceCallInvoker.exceptionSerializerDeserializeHttpException(ScaladslServiceClientInvoker.scala:111)
at com.lightbend.lagom.internal.client.ClientServiceCallInvoker.$anonfun$makeStrictCall$3(ClientServiceCallInvoker.scala:223)
[warn] c.l.l.i.s.r.ScalaServiceRegistryClient - Service registry replied with an error when looking up serviceName=[cas_native]
Workaround
Adding 0.0.0.0
to my $JAVA_OPTS
http(s).nonProxyHosts
list seems to fix this for now.
Issue Analytics
- State:
- Created 5 years ago
- Comments:26 (17 by maintainers)
Top Results From Across the Web
Register a Service Mesh Proxy Outside of ...
You can register a service mesh sidecar proxy separately from the registration of the service ... The proxy_destination parameter was deprecated in 1.5.0....
Read more >Service Locator is an Anti-Pattern - ploeh blog
Let's examine why this is so. In short, the problem with Service Locator is that it hides a class' dependencies, causing run-time errors...
Read more >Add an on-premises app - Application Proxy in Azure ...
Tutorial: Add an on-premises application for remote access through Application Proxy in Azure Active Directory · In this article · Prerequisites.
Read more >c# - NuGet behind a proxy
But, I can't find any command line example. I'm trying to run some build and NuGet can't connect. How do I configure the...
Read more >1. Service Discovery: Eureka Clients
1.5 Registering a Secure Application. If your app wants to be contacted over HTTPS, you can set two flags in the EurekaInstanceConfig :....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@gabox01 I suspected that this was something added to 1.5.x because @erip mentioned that it works with 1.4.x.
I didn’t read the whole thread in detail yet, but it may be worth to quick test it with 1.5.0-M2. #1378 is included in 1.5.0-M2.
But then comes the question, if #1378 is the cure, why we are observing it in 1.5.0-M3?
@ramakrishna-hande, thanks for confirming.
Since this is an edge case and not very common (reported 3 years ago and affecting only two users), I don’t think we will be able to find time to fix it.
Someone in the community will need to jump in and address it. It can take some time before someone can find time to pick it.