Closed afrancoc2000 closed 6 years ago
Found my problem, I was missing the bind-port property in the remote configuration, adding it solved the issue.
remote {
log-remote-lifecycle-events = on
netty.tcp {
hostname = "127.0.0.1"
hostname = ${?HOSTNAME}
port = 2551
port = ${?PORT}
bind-hostname = 0.0.0.0
bind-port = 2551
}
}
Thanks!
Another visible problem is creating singleton right after ClusterBootstrap start. If service discovery is is in progress then singleton would not get created. So better to put singleton creation in the memberUp event.
Cluster(system).registerOnMemberUp({
system.actorOf(
ClusterSingletonManager.props(
Master.props(workTimeout),
PoisonPill,
ClusterSingletonManagerSettings(system).withRole(role)
),
"master")
system.actorOf(Worker.props(), "worker")
})
Ana Maria should be encouraged to write up this configuration for Clustering in Kubernetes as a blog post or how-to article for LightBend.
There's much good information located here that is otherwise spread out through Akka documentation.
For the record the samples in Akka projection nowadays contain complete Kubernetes yamls (including ingress load balancer for k8 on AWS):
https://github.com/akka/akka-projection/tree/main/samples/grpc/shopping-cart-service-java https://github.com/akka/akka-projection/tree/main/samples/grpc/shopping-cart-service-scala
Hi @lonnie-intercax, thank you for the proposal, this is an issue from 5 years ago and I have not worked in Akka for a while, so I would need to regain context in the latest changes and updates that have happened. But I will keep it in mind for when I have some extra time.
;-) v/r Lonnie Click to schedule a call https://calendly.com/lonnie-vanzandt/30min
On Wed, Jan 10, 2024 at 1:27 PM Ana Maria Franco @.***> wrote:
Hi @lonnie-intercax https://github.com/lonnie-intercax, thank you for the proposal, this is an issue from 5 years ago and I have not worked in Akka for a while, so I would need to regain context in the latest changes and updates that have happened. But I will keep it in mind for when I have some extra time.
— Reply to this email directly, view it on GitHub https://github.com/akka/akka-management/issues/263#issuecomment-1885397596, or unsubscribe https://github.com/notifications/unsubscribe-auth/A67C37C7VPXJ5U43P4N55E3YN3MSPAVCNFSM4FOW75O2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBYGUZTSNZVHE3A . You are receiving this because you were mentioned.Message ID: @.***>
Hi,
I've been trying to create an akka cluster in kubernetes but I'm having a few problems, I tried it on my local machine using the kubernetes that comes with docker for windows and everything works great, but when I upload my yml file to my development environment, a kubernetes on a rancher I get a lot of trouble.
First the problem was the RBAC but creating a ClusterRole and a ClusterRoleBinding I managed to get by, but now even without this problems the cluster form, it does discover it self, but probing fails and I get like a cluster per pod. I have a singleton in my cluster and every pod I get has the singleton running that's how I guess the cluster is not forming.
I see there are some problems with #187 and #236 in the discovery, but I'm not sure if that is what is happening to me, it seems like the other pods are found but not been able to probe them, and I get a TCP alert.
The big difference between my local environment and dev is, I guess the use of namespaces.
I really don't get why after discovering the other pods the cluster doesn't form and every pod joins itself.
Some times I don't get the TCP error but still, the cluster is not formed.
Can you help me? I'm adding here my configuration files.
application.conf:
akka-cluster.yml:
Dockerfile:
Master.scala:
build.sbt:
Logs: