Hi, I am reading the Akka Platform Guide, but I get problem in the example.
I download the source code of the first chapter Create the gRPC Cart service and compile, run it with SBT.
sbt -Dconfig.resource=local1.conf run
The source code:
https://developer.lightbend.com/docs/akka-platform-guide/microservices-tutorial/_attachments/1-shopping-cart-grpc-scala.zip
I am sure that I modify nothing. But it shows dead-letters occurred when running on my laptop.
[info] welcome to sbt 1.4.6 (AdoptOpenJDK Java 11.0.9.1)
[info] loading global plugins from C:\Users\Casper\.sbt\1.0\plugins
[info] loading settings for project shopping-cart-service-build from plugins.sbt ...
[info] loading project definition from E:\Downloads\shopping-cart-service\project
[info] loading settings for project shopping-cart-service from build.sbt ...
[info] set current project to shopping-cart-service (in build file:/E:/Downloads/shopping-cart-service/)
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[info] running shopping.cart.Main
[2021-03-12 21:45:50,029] [INFO] [akka.event.slf4j.Slf4jLogger] [] [] [ShoppingCartService-akka.actor.default-dispatcher-3] - Slf4jLogger starte
[2021-03-12 21:45:51,170] [INFO] [akka.remote.artery.tcp.ArteryTcpTransport] [akka://ShoppingCartService@127.0.0.1:2551] [] [ShoppingCartService-
akka.actor.default-dispatcher-3] - Remoting started with transport [Artery tcp]; listening on address [akka://ShoppingCartService@127.0.0.1:2551]
with UID [7020411709129983039]
[2021-03-12 21:45:51,245] [INFO] [akka.cluster.Cluster] [akka://ShoppingCartService@127.0.0.1:2551] [] [ShoppingCartService-akka.actor.default-di
spatcher-3] - Cluster Node [akka://ShoppingCartService@127.0.0.1:2551] - Starting up, Akka version [2.6.13] ...
[2021-03-12 21:45:51,550] [INFO] [akka.cluster.Cluster] [akka://ShoppingCartService@127.0.0.1:2551] [] [ShoppingCartService-akka.actor.default-di
spatcher-3] - Cluster Node [akka://ShoppingCartService@127.0.0.1:2551] - Registered cluster JMX MBean [akka:type=Cluster]
[2021-03-12 21:45:51,551] [INFO] [akka.cluster.Cluster] [akka://ShoppingCartService@127.0.0.1:2551] [] [ShoppingCartService-akka.actor.default-di
spatcher-3] - Cluster Node [akka://ShoppingCartService@127.0.0.1:2551] - Started up successfully
[2021-03-12 21:45:51,660] [INFO] [akka.cluster.Cluster] [akka://ShoppingCartService@127.0.0.1:2551] [] [ShoppingCartService-akka.actor.default-di
spatcher-6] - Cluster Node [akka://ShoppingCartService@127.0.0.1:2551] - No seed nodes found in configuration, relying on Cluster Bootstrap for j
oining
[2021-03-12 21:45:51,686] [INFO] [akka.cluster.sbr.SplitBrainResolver] [akka://ShoppingCartService@127.0.0.1:2551] [] [ShoppingCartService-akka.a
ctor.default-dispatcher-3] - SBR started. Config: strategy [KeepMajority], stable-after [20 seconds], down-all-when-unstable [15 seconds], selfUn
iqueAddress [akka://ShoppingCartService@127.0.0.1:2551#7020411709129983039], selfDc [default].
[2021-03-12 21:45:53,532] [INFO] [akka.management.internal.HealthChecksImpl] [akka://ShoppingCartService@127.0.0.1:2551] [] [ShoppingCartService-
akka.actor.default-dispatcher-11] - Loading readiness checks [(cluster-membership,akka.management.cluster.scaladsl.ClusterMembershipCheck), (shar
ding,akka.cluster.sharding.ClusterShardingHealthCheck)]
[2021-03-12 21:45:53,533] [INFO] [akka.management.internal.HealthChecksImpl] [akka://ShoppingCartService@127.0.0.1:2551] [] [ShoppingCartService-
akka.actor.default-dispatcher-11] - Loading liveness checks []
[2021-03-12 21:45:53,839] [INFO] [akka.management.scaladsl.AkkaManagement] [akka://ShoppingCartService@127.0.0.1:2551] [] [ShoppingCartService-ak
ka.actor.default-dispatcher-11] - Binding Akka Management (HTTP) endpoint to: 127.0.0.1:9101
[2021-03-12 21:45:54,102] [INFO] [akka.management.scaladsl.AkkaManagement] [akka://ShoppingCartService@127.0.0.1:2551] [] [ShoppingCartService-ak
ka.actor.default-dispatcher-11] - Including HTTP management routes for ClusterHttpManagementRouteProvider
[2021-03-12 21:45:54,352] [INFO] [akka.management.scaladsl.AkkaManagement] [akka://ShoppingCartService@127.0.0.1:2551] [] [ShoppingCartService-ak
ka.actor.default-dispatcher-11] - Including HTTP management routes for ClusterBootstrap
[2021-03-12 21:45:54,368] [INFO] [akka.management.cluster.bootstrap.ClusterBootstrap] [akka://ShoppingCartService@127.0.0.1:2551] [] [ShoppingCar
tService-akka.actor.default-dispatcher-11] - Using self contact point address: http://127.0.0.1:9101
[2021-03-12 21:45:54,449] [INFO] [akka.management.scaladsl.AkkaManagement] [akka://ShoppingCartService@127.0.0.1:2551] [] [ShoppingCartService-ak
ka.actor.default-dispatcher-11] - Including HTTP management routes for HealthCheckRoutes
[2021-03-12 21:45:55,193] [WARN] [akka.actor.ActorSystemImpl] [akka://ShoppingCartService@127.0.0.1:2551] [] [ShoppingCartService-akka.actor.defa
ult-dispatcher-3] - Binding with a connection source not supported with HTTP/2. Falling back to HTTP/1.1.
[2021-03-12 21:45:55,467] [INFO] [akka.management.cluster.bootstrap.ClusterBootstrap] [akka://ShoppingCartService@127.0.0.1:2551] [] [ShoppingCar
tService-akka.actor.default-dispatcher-11] - Initiating bootstrap procedure using config method...
[2021-03-12 21:45:55,467] [INFO] [akka.management.cluster.bootstrap.ClusterBootstrap] [akka://ShoppingCartService@127.0.0.1:2551] [] [ShoppingCar
tService-akka.actor.default-dispatcher-3] - Bootstrap using `akka.discovery` method: config
[2021-03-12 21:45:55,499] [INFO] [akka.management.scaladsl.AkkaManagement] [akka://ShoppingCartService@127.0.0.1:2551] [akkaManagementBound] [Sho
ppingCartService-akka.actor.default-dispatcher-11] - Bound Akka Management (HTTP) endpoint to: 127.0.0.1:9101
[2021-03-12 21:45:55,561] [INFO] [akka.management.cluster.bootstrap.internal.BootstrapCoordinator] [akka://ShoppingCartService@127.0.0.1:2551] [a
kkaBootstrapInit] [ShoppingCartService-akka.actor.default-dispatcher-11] - Locating service members. Using discovery [akka.discovery.config.Confi
gServiceDiscovery], join decider [akka.management.cluster.bootstrap.LowestAddressJoinDecider], scheme [http]
[2021-03-12 21:45:55,577] [INFO] [akka.management.cluster.bootstrap.internal.BootstrapCoordinator] [akka://ShoppingCartService@127.0.0.1:2551] []
[ShoppingCartService-akka.actor.default-dispatcher-11] - Looking up [Lookup(shopping-cart-service,Some(management),Some(tcp))]
[2021-03-12 21:45:55,608] [INFO] [akka.management.cluster.bootstrap.internal.BootstrapCoordinator] [akka://ShoppingCartService@127.0.0.1:2551] [a
kkaBootstrapResolved] [ShoppingCartService-akka.actor.default-dispatcher-11] - Located service members based on: [Lookup(shopping-cart-service,So
me(management),Some(tcp))]: [ResolvedTarget(127.0.0.1,Some(9101),None), ResolvedTarget(127.0.0.1,Some(9102),None), ResolvedTarget(127.0.0.1,Some(
9103),None)], filtered to [127.0.0.1:9101, 127.0.0.1:9102, 127.0.0.1:9103]
[2021-03-12 21:45:56,203] [INFO] [akka.actor.typed.ActorSystem] [] [] [ShoppingCartService-akka.actor.default-dispatcher-11] - Shopping online at
gRPC server 127.0.0.1:8101
[2021-03-12 21:45:56,374] [INFO] [akka.management.cluster.bootstrap.contactpoint.HttpClusterBootstrapRoutes] [akka://ShoppingCartService@127.0.0.
1:2551] [] [ShoppingCartService-akka.actor.default-dispatcher-13] - Bootstrap request from 127.0.0.1:1318: Contact Point returning 0 seed-nodes [
]
[2021-03-12 21:45:56,588] [INFO] [akka.management.cluster.bootstrap.internal.BootstrapCoordinator] [akka://ShoppingCartService@127.0.0.1:2551] [a
kkaBootstrapSeedNodes] [ShoppingCartService-akka.actor.default-dispatcher-11] - Contact point [akka://ShoppingCartService@127.0.0.1:2551] returne
d [0] seed-nodes []
[2021-03-12 21:45:56,601] [INFO] [akka.management.cluster.bootstrap.internal.BootstrapCoordinator] [akka://ShoppingCartService@127.0.0.1:2551] [a
kkaBootstrapJoinSelf] [ShoppingCartService-akka.actor.default-dispatcher-13] - Initiating new cluster, self-joining [akka://ShoppingCartService@1
27.0.0.1:2551]. Other nodes are expected to locate this cluster via continued contact-point probing.
[2021-03-12 21:45:56,660] [INFO] [akka.cluster.Cluster] [akka://ShoppingCartService@127.0.0.1:2551] [akkaMemberChanged] [ShoppingCartService-akka
.actor.default-dispatcher-3] - Cluster Node [akka://ShoppingCartService@127.0.0.1:2551] - Node [akka://ShoppingCartService@127.0.0.1:2551] is JOI
NING itself (with roles [dc-default], version [0.0.0]) and forming new cluster
[2021-03-12 21:45:56,660] [INFO] [akka.cluster.Cluster] [akka://ShoppingCartService@127.0.0.1:2551] [] [ShoppingCartService-akka.actor.default-di
spatcher-3] - Cluster Node [akka://ShoppingCartService@127.0.0.1:2551] - is the new leader among reachable nodes (more leaders may exist)
[2021-03-12 21:45:56,677] [INFO] [akka.cluster.Cluster] [akka://ShoppingCartService@127.0.0.1:2551] [akkaMemberChanged] [ShoppingCartService-akka
.actor.default-dispatcher-3] - Cluster Node [akka://ShoppingCartService@127.0.0.1:2551] - Leader is moving node [akka://ShoppingCartService@127.0
.0.1:2551] to [Up]
[2021-03-12 21:45:56,704] [INFO] [akka.cluster.sbr.SplitBrainResolver] [akka://ShoppingCartService@127.0.0.1:2551] [] [ShoppingCartService-akka.a
ctor.default-dispatcher-3] - This node is now the leader responsible for taking SBR decisions among the reachable nodes (more leaders may exist)
[2021-03-12 21:45:58,350] [INFO] [akka.actor.LocalActorRef] [akka://ShoppingCartService@127.0.0.1:2551] [akkaDeadLetter] [ShoppingCartService-akk
a.actor.default-dispatcher-12] - Message [akka.actor.Status$Failure] from Actor[akka://ShoppingCartService/system/bootstrapCoordinator/contactPoi
ntProbe-127.0.0.1-9102#383864108] to Actor[akka://ShoppingCartService/system/bootstrapCoordinator/contactPointProbe-127.0.0.1-9102#383864108] was
not delivered. [1] dead letters encountered. If this is not an expected behavior then Actor[akka://ShoppingCartService/system/bootstrapCoordinat
or/contactPointProbe-127.0.0.1-9102#383864108] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration se
ttings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
[2021-03-12 21:45:58,350] [INFO] [akka.actor.LocalActorRef] [akka://ShoppingCartService@127.0.0.1:2551] [akkaDeadLetter] [ShoppingCartService-akk
a.actor.default-dispatcher-12] - Message [akka.actor.Status$Failure] from Actor[akka://ShoppingCartService/system/bootstrapCoordinator/contactPoi
ntProbe-127.0.0.1-9103#646571814] to Actor[akka://ShoppingCartService/system/bootstrapCoordinator/contactPointProbe-127.0.0.1-9103#646571814] was
not delivered. [2] dead letters encountered. If this is not an expected behavior then Actor[akka://ShoppingCartService/system/bootstrapCoordinat
or/contactPointProbe-127.0.0.1-9103#646571814] may have terminated unexpectedly. This logging can be turned off or adjusted with configuration se
ttings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
As a beginner, I spent 2 days to try to solve it. But it’s too complex for me. Even I tried to migrate the project build tool from SBT to Gradle. But it didn’t work too.
In fact, I suppose that the configurations of Akka components is the most complex part of Akka programming.
Thanks.