Having trouble running Akka proof-of-concept for Akka Event Sourcing


I am just trying to run a small in-memory proof of concept using Akka Event Sourcing.

Entry point here: akka_test/main.kt at master · NatElkins/akka_test · GitHub

Configuration here: akka_test/application.conf at master · NatElkins/akka_test · GitHub

It’s mostly cobbled together from various tutorials and copy-pasting from things I read online.

When I run it, here is the error I receive:

Exception occurred
java.util.concurrent.ExecutionException: akka.pattern.AskTimeoutException: Ask timed out on [EntityRef(EntityTypeKey[Command](Counter), A)] after [5000 ms]. Message of type [Command$Get]. A typical reason for `AskTimeoutException` is that the recipient actor didn't send a reply.

This is probably because the cluster never got set up properly. That said, there is no other error indicating anything went wrong. So I’m not really sure how to proceed from here.

Can anybody point me in the right direction on how to get this working?

Thank you!

In the logs, do you see the node join itself, become UP and form a one node cluster before that message is sent?

An easy way to check if there is a race condition with the cluster forming would be to delay sending that message give the cluster time to form first.