question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Services cannot register with service locator in 1.5.0-M* when behind a proxy

See original GitHub issue

My 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:open
  • Created 5 years ago
  • Comments:26 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
octonatocommented, Sep 24, 2018

@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?

0reactions
octonatocommented, Jul 21, 2021

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found