Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Domantas Petrauskas
@dope9967

Note: the only limitation when migrating from from Lagom Persistence (classic) to Akka Persistence Typed is that a full cluster shutdown is required. Even though all durable data is compatible, Lagom Persistence (classic) and Akka Persistence Typed can’t coexist.

Does this mean that same type of entity can't run on both Lagom classic and Akka Typed implementations, or that whole service has to either have Lagom classic or Akka Typed entities? I have a service with multiple entites, and one of them would benefit from some of the Akka Typed features, was wondering if I'll have to migrate all of them.

1 reply
Pawel
@odwrotnie
How can I force Lagom to return full description of the Exceptions on production?
4 replies
Shubham Girdhar
@girdharshubham
Hi @all
I'm using Lagom version 1.6.3 with mixed persistence. I took reference from the lagom-samples repo. Here's my conf
lagom {

  cluster.exit-jvm-when-system-terminated = on

  persistence {
    jdbc {
      create-tables.auto = true
    }
  }
}
ludington.postgres {
  host = ${?POSTGRES_HOST}
  database = ${?POSTGRES_DATABASE}
  user = ${?POSTGRES_USER}
  password = ${?POSTGRES_PASSWORD}
}

ludington.postgres {
  host = ${?POSTGRES_HOST}
  database = ${?POSTGRES_DATABASE}
  user = ${?POSTGRES_USER}
  password = ${?POSTGRES_PASSWORD}
}


db.default {
  driver = "org.postgresql.Driver"
    url = ${?POSTGRES_URL}
  username = ${ludington.postgres.user}
  password = ${ludington.postgres.password}
}

jdbc-defaults.slick.profile = "slick.jdbc.PostgresProfile$"


cassandra.default {
  ## list the contact points here
  host = ${?GLOBAL_CASSANDRA}
  contact-points = [${cassandra.default.host}]
  port = 9042
  port = ${?CASSANDRA_PORT} 
  keyspace = ${?CASSANDRA_JOURNAL_KEYSPACE}
  ## override Lagom’s ServiceLocator-based ConfigSessionProvider
  session-provider = akka.persistence.cassandra.ConfigSessionProvider
}

cassandra-journal {
  keyspace = ${cassandra.default.keyspace}
  contact-points = ${cassandra.default.contact-points}
  session-provider = ${cassandra.default.session-provider}
  port = ${cassandra.default.port}
}

cassandra-snapshot-store {
  keyspace = ${cassandra.default.keyspace}
  contact-points = ${cassandra.default.contact-points}
  session-provider = ${cassandra.default.session-provider}
  port = ${cassandra.default.port}
}

akka.persistence {
  journal {
    plugin = cassandra-journal
  }

  snapshot-store {
    plugin = cassandra-snapshot-store
  }
}
And mixed persistence isn't working out as expected
abstract class Application(context: LagomApplicationContext)
  extends LagomApplication(context)
    with ReadSideJdbcPersistenceComponents
    with HikariCPComponents
    with WriteSideCassandraPersistenceComponents
    with AhcWSComponents
    with LagomKafkaClientComponents
I guess the readside is still waiting for messages in Postgres
Because when I changed the whole set up to persist events in PG, it worked like a charm. Is there something that I'm missing?
Shubham Girdhar
@girdharshubham
@all
Nikhil Arora
@nikhilaroratgo_gitlab
Could someone explain why leader cannot make decision when one of the nodes is in Unreachable state. It's written everywhere that convergence cannot be reached. But why leader cannot make decision is not mentioned anywhere. What happens if Leader is allowed to take the decision. What is the impact?
Ignasi Marimon-Clos
@ignasi35
:point_up: September 17, 2020 5:33 PM this is a very intesting question but it’s a bit specific to Akka Cluster. I think a perfect place for this question (with wider audience) is https://discuss.lightbend.com/
brabo-hi
@brabo-hi
Hi all, i have a question: why is lagom always based on old version of akka-persistence-cassandra ? The lagom version 1.6.4 is using cassandra-persistence version 0.100 ? How can we update it to the latest one, currently 1.0.x
3 replies
brabo-hi
@brabo-hi
according to this link can we mix WriteSideSlickPersistenceComponents and ReadSideCassandraPersistenceComponents ??
1 reply
Pawel
@odwrotnie
I have tried everything and still getting Service app was not found by service locator Exception :(
4 replies
Pawel
@odwrotnie
Pleeease, help me!
Srepfler Srdan
@schrepfler
how are we looking with the migration to test-containers?
Nikhil Arora
@nikhilaroratgo_gitlab
@ignasi35 I am running a Lagom App in prod and start 3 pods in the cluster. Everything worked fine for a month and now 1 App started to consume more heap compared to others and was reaching the limit of the max heapSize, Major GC was not able to free up the resources, so I restarted this app. The issue got fixed in that pod. Now, another node in the cluster has started to show the same behaviour. could it be that Lagom framework internals are using more heap? How much memory does the cache of ShardCoordinator consume ? I know this is difficult to answer. It's difficult to say if there is problem in Application code as the memory heap pattern is exactly same and also I know lagom has been throughly battle tested.
13 replies
Nikhil Arora
@nikhilaroratgo_gitlab
What is the minimum JVM footprint used by the cluster and Lagom?
Domantas Petrauskas
@dope9967
Is there some approximate date for when Lagom 1.7 will be out? Is https://github.com/lagom/lagom/milestone/63 up to date?
Nikhil Arora
@nikhilaroratgo_gitlab
Is there any built in async Http client in Lagom which also allows metrics monitoring via prometheus? I found one here https://www.playframework.com/documentation/2.8.x/JavaWS , but don't know how to get metrics and if this is the right one to use in lagom. Thanks for any hints.
2 replies
Nikhil Arora
@nikhilaroratgo_gitlab
By right I mean its from play framework so should be right, But is there any other opinionated way ?
Steven Matison
@ds-steven-matison
Good Morning, my name is Steven from DataStax. We have been working internally with lagom and Astra (cassandra database as a service) and are wondering what it will take to get lagom master branch to cassandra 3.8 driver? This is a simple 1 line change from the current version of embedded cassandra which then makes connecting to astra easy. We have also made progress as far as 4.x driver, but this is a larger codebase change. Would love to open dialouge with interested parties. TIA
9 replies
Nikhil Arora
@nikhilaroratgo_gitlab

@ignasi35 I am trying to update from Lagom 1.5.4 to Lagom 1.6.4 and getting errors during cluster formation. In 1.5.4, we added

akka {

 remote {
    netty.tcp {
          hostname = ${KUBERNETES_POD_IP}
         port = ${REMOTING_PORT}
     }
  }

and it worked. But since artery is now default. Do I have to adde some similar config to make it work?

3 replies
Nikhil Arora
@nikhilaroratgo_gitlab

@ignasi35 I was able to start the cluster but now I see lots of messages like

[thread-application-akka.actor.default-dispatcher-58] [akka.actor.LocalActorRefProvider.Deserialization] [akkaAddress=akka://application@100.70.4.143:2552, kamonSpanId=d92bf43eeec6570f, sourceThread=application-akka.actor.internal-dispatcher-3, akkaSource=akka.actor.LocalActorRefProvider.Deserialization, sourceActorSystem=application, kamonTraceId=50dabe2c14105b5df4203cfe0e1d3848, kamonSpanName=tell(ActorGraphInterpreter, AsyncInput), akkaTimestamp=16:40:48.451UTC] - Resolve (deserialization) of path [system/ddataReplicator/$d#1712639334] doesn't match an active actor. It has probably been stopped, using deadLetters.

and

[thread-application-akka.actor.default-dispatcher-50] [akka.http.impl.util.StreamUtils$DelayCancellationStage$$anon$11] [akkaAddress=akka://application@100.70.4.143:2552, kamonSpanId=136be1e6e5cdd9a6, sourceThread=application-akka.actor.default-dispatcher-50, akkaSource=StreamUtils$DelayCancellationStage$$anon$11(akka://application), sourceActorSystem=application, kamonTraceId=4853603745c8559796677d5e92fbd153, kamonSpanName=tell(ActorGraphInterpreter, AsyncInput), akkaTimestamp=16:40:49.244UTC] - Delaying cancellation for 1 minute

Any idea where I should check ?
These are continuously repeating. On the other hand other cluster with 1.5.x is quite stable.

3 replies
Nikhil Arora
@nikhilaroratgo_gitlab
@ignasi35 I created https://discuss.lightbend.com/t/lagom1-6-4-reason-for-debug-messages-resolve-deserialization-of-path-and-delaying-cancellation-for-1-minute/7274 . I would be thankful if you spare some time and can help me out on this. Thank in advance.
javierfvargas
@javierfvargas
Hi guys, I wonder how could I personalize how Json Parsing errors are logged in Lagom. I have a set of sensors sending data and being able to add more information to serialization errors would be of great help to diagnose potential misbehaviours in our sensor. I'd like to be able to print at least some excerpt of the message that failed to parse and the parameter in the path of the request. Any clue would be muh appreciated!
1 reply
brabo-hi
@brabo-hi

Hi guys,

i have a lagom project, i would like to add additional route to serve public assets (css, js, files).
From the documentation, we can achieve it by using ScalaSirdRouter by adding this:

val router = Router.from {
  case GET(p"/assets/$file*") =>
    Assets.versioned(path = "/public", file = file)
}

I am getting the following errors:

  1. value versioned is not a member of object controllers.Assets
  2. not found: value path
  3. reassignment to val
    Is there anything i am missing ? Or what is the best way to do this ?
Andrey Ladniy
@AndreyLadniy
Hi, how can I call another service method using serviceClient.implement[OtherService], if this method is described using ServiceAcl (additionalRouter)?
bc-mpavan
@bc-mpavan
@megri Will you have any examples of how to do the headless service followed by an endpoint? Thank you very much, greetings!!
megri
@megri
@bc-mpavan You mean in Kubernetes?
bc-mpavan
@bc-mpavan
@megri Yes, to reference an external service. Because I need to use an external api https://xxxxx.com.ar and I don't know how to reference that, which in development mode works well with lagomUnmanagedServices. Thank you!
megri
@megri
@bc-mpavan I can't actually remember how we solved it in the end..
tolstoymv
@tolstoymv

Hello,
i have a microservice
In that service there is a persistence entity of type A
each A depends on events from multiple entities of type B and each B depends on some events from multiple entities of type C
so there is a tree-like structure

I have a limits that require updates to propagate from C to A in like 1 second

My question is what is lagom pattern for that kind of propagation?

Is it supposed to send commands to "parent" from readside processor reading events from "children"?
Or should it be direct communication between entities

It is not desired to hold whole tree in one state since it may be quite large, however it is still an option

I failed to read it out from the documentation

Could you please give me some advice on that?

bc-mpavan
@bc-mpavan
@megri you know how to reference an externalName of kubernetes in this configuration: lagom.akka.discovery.service-name-mappings.my-service.lookup= [external-service]
tolstoymv
@tolstoymv

Hello.
Could you please clarify for me a bit about read side processor.
I see a constant lag between event being persisted and being caught by RSP and this lag is like 5 seconds

Is there any way to lower that latency?
What is the reason?

1 reply
tolstoymv
@tolstoymv
found out about eventual-consistency delay but (may be i am dumb) failed to override it. Application just ignores the settings and prints "starting with EC delay 5000ms" at startup
megri
@megri
@bc-mpavan I have it like this for elasticsearch lagom.akka.discovery.service-name-mappings.elasticsearch.lookup = _http._tcp.elasticsearch-master-headless.elasticsearch.svc.cluster.local
bc-mpavan
@bc-mpavan
@megri Okay, but is that elasticsearch-master-headless pointing to an external url of the http://xxxx.com? If you can pass me the configuration of that headless it would be very useful... Thank you!
brabo-hi
@brabo-hi
Hi, can we return a Flow on a logom service?
def doSomething: ServiceCall[NotUsed, Flow[String, String, NotUsed]]
I am getting a serializaiton error
megri
@megri
@bc-mpavan I used this helm-chart for elasticsearch: https://github.com/elastic/helm-charts/tree/master/elasticsearch
So obviously we ran it ourselves. I think you only need to follow the guide mentioned before to get it working for a service external to your kubernetes cluster.
ErBajrangDubey
@ErBajrangDubey
com.lightbend.lagom.internal.persistence.cassandra.NoServiceLocatorException: Timed out after 2 seconds while waiting for a ServiceLocator. Have you configured one?
Kindly tell a solution to this one
bc-mpavan
@bc-mpavan
@megri If I have the following service configuration, as would be the configuration of this: lagom.akka.discovery.service-name-mappings.elasticsearch.lookup = _http._tcp.elasticsearch-master-headless.elasticsearch.svc.cluster.local
image.png
megri
@megri
@bc-mpavan You probably want to name your port "http"
Gabriel Harris-Rouquette
@gabizou
So, I'm looking into using Lagom with gradle specifically, as I'm vastly more experienced now with Gradle these days than some six years ago, and I've seen there's some things about needing to get play working on gradle (I've already submitted a PR to bring Play 2.8.x support in) before lagom 1.6 can be considered, but my main question is: What does Lagom specifically need to customize on top of play framework to run in an IDE or customize the build process to do? I haven't quite looked into the maven plugin implementation as of yet (skimmed it, but couldn't figure out whether it was just boilerplate as maven traditionally is, or not).
Brian Miller
@bkmdev
hi, is there any way one can gain insight into what is causing a circuit breaker? We have a play application that upon hitting a certain endpoint seems to be constantly triggering the circuit breaker error and not showing any prior failing errors that would indicate what led up to it. The service also doesn't seem to reset back to Half-Open or Closed (which I thought normally is printed in the log) after the default timeout (which we haven't changed). I've tried adding things like <logger name="com.lightbend.lagom" level="DEBUG"/> & <logger name="akka.pattern.CircuitBreaker" level="DEBUG"/> (not sure if the latter is correct) to our prod-logback.xml but it seems to not provide any additional output :confused:
bc-mpavan
@bc-mpavan
image.png
@megri I have defined the ExternalName that attached in the image, but when I do this: -Dlagom.akka.discovery.service-name-mappings.external-mercedes-benz-api.lookup-_http._tcp.external-mercedes-benz-api.connected-auto.svc.cluster.local returns this error: java.lang.IllegalStateException: Service external-mercedes-benz-api was not found by service locator. Do you have any ideas?
megri
@megri
@bc-mpavan Sorry, no clue. Someone else here can probably help you better than I