Code Monkey home page Code Monkey logo

pekko-samples's People

Stargazers

Loic Lacomme avatar Anzori (Nika) Ghurtchumelia avatar Sean Kwak avatar Giovanni Morlin avatar CEE avatar Hariharan Ramanathan avatar  avatar Dmitry Ledentsov avatar XiaoQu avatar Yang Jing avatar Israel Oluwole O. avatar  avatar Adilson avatar chen.zs avatar Mark Visosky avatar Oleksandr B. avatar gasdia73 avatar trashd0wn avatar  avatar Mario Renau avatar Paul Bernet avatar Timothy Spann avatar  avatar 渡邉祐一 / Yuichi Watanabe avatar  avatar 侯元杰 avatar Fayán Leo Pardo avatar  avatar spamegg avatar Weldhapi avatar Szabolcs Berecz avatar  avatar

Watchers

Arnout Engelen avatar Justin Mclean avatar JB Onofré avatar Greg Methvin avatar Szabolcs Berecz avatar James Cloos avatar Nicolas Vollmar avatar Sean Glover avatar Matthew de Detrich avatar Samuele Resca avatar PJ Fanning avatar AndyChen(Jingzhang) avatar 梦境迷离 avatar  avatar Laglangyue avatar  avatar

pekko-samples's Issues

issue with Cassandra in pekko-sample-distributed-workers-scala

On a stable Debian (OpenJDK 17), the example pekko-sample-distributed-workers-scala will fail on a exception while using sbt run or sbt "runMain worker.Main cassandra".

The logs

Starting Cassandra on port client port: 9042 storage port 45209 host 127.0.0.1 java version 17.0.10+7-Debian-1deb12u1
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.apache.cassandra.security.ThreadAwareSecurityManager (file …/pekko-samples/pekko-sample-distributed-workers-scala/target/cassandra-db/cassandra-bundle.jar)
WARNING: Please consider reporting this to the maintainers of org.apache.cassandra.security.ThreadAwareSecurityManager
WARNING: System::setSecurityManager will be removed in a future release
Exception (java.lang.AssertionError) encountered during startup: java.lang.reflect.InaccessibleObjectException: Unable to make field private int java.io.FileDescriptor.fd accessible: module java.base does not "opens java.io" to unnamed module @11b03c1f
java.lang.AssertionError: java.lang.reflect.InaccessibleObjectException: Unable to make field private int java.io.FileDescriptor.fd accessible: module java.base does not "opens java.io" to unnamed module @11b03c1f
…
[error] 	at worker.Main$.startCassandraDatabase(Main.scala:101)

pekko-sample-cluster-java: Simple Cluster Example does not work

The Simple Cluster Example does not work.
Looking in depth at the ...../simple/App.java class file and its methods I noticed a wrong config property in the private static void startup(int port) (see line 38)
The line is

overrides.put("org.apache.pekko.remote.artery.canonical.port", port);

and should be changed to

overrides.put("pekko.remote.artery.canonical.port", port);

Reading the Artery Remoting documentation (https://pekko.apache.org/docs/pekko/current/remoting-artery.html) the right config property is "pekko.remote.artery.canonical.port"

After this change the Simple Cluster Example works very well !!!

Update SBT to latest version

Also fix any deprecation warnings. Many will be because prop in Category style is deprecated in favour of Category / prop style.

revisit newly added samples

  • use scala 2.13.10 to match existing samples
  • update readmes to link to original akka samples to allow some traceability
  • general double check

pekko-sample-cluster-java

The Simple Cluster Example does not work.

Looking in depth at the ..../simple/App.java class file and its methods, I noticed that there is a wrong configuration property in the method private static void startup(int port) (see line 38).
The line is:

overrides.put("org.apache.pekko.remote.artery.canonical.port", port);

and should be changed to:

overrides.put("pekko.remote.artery.canonical.port", port);

Reading the Artery Remoting documentation (https://pekko.apache.org/docs/pekko/current/remoting-artery.html) the right property is "pekko.remote.artery.canonical.port"

After this change the sample works very well.

Include http settings in application.conf for Kubernetes health checks in pekko-sample-cluster-kubernetes-scala

Description

The current application.conf configuration in the pekko-sample-cluster-kubernetes-scala project lacks the essential http settings under pekko.management. This omission prevents the application from binding to the required port (8558), which is necessary for Kubernetes health checks. Without this configuration, Kubernetes cannot perform health checks, leading to immediate termination of the pods as they are marked unhealthy.

Required Changes

To resolve this critical issue and stabilize pod deployment, the following http settings need to be explicitly defined in the application.conf file:

#management-config
pekko.management {
  cluster.bootstrap {
    contact-point-discovery {
      # pick the discovery method you'd like to use:
      discovery-method = kubernetes-api

      required-contact-point-nr = ${REQUIRED_CONTACT_POINT_NR}
    }
  }
 # Add these so the pods won't get killed.
  http {
    port = 8558
    bind-hostname = "0.0.0.0"
  }
}

By including these settings, Kubernetes can access the management HTTP server on port 8558 for health checks, ensuring the pods are correctly recognized as healthy and operational.

There is a configuration error in the startup settings of the pekko-sample-cluster-scala/stats sample code

`
private def startup(role: String, port: Int): Unit = {

// Override the configuration of the port when specified as program argument
val config = ConfigFactory
  .parseString(s"""
  org.apache.pekko.remote.artery.canonical.port=$port // It should be  pekko.remote.artery.canonical.port
  org.apache.pekko.cluster.roles = [$role] //It should be pekko.cluster.roles
  """)
  .withFallback(ConfigFactory.load("stats"))

ActorSystem[Nothing](RootBehavior(), "ClusterSystem", config)

}
`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.