akka / akka-management

Akka Management is a suite of tools for operating Akka Clusters.
https://doc.akka.io/docs/akka-management/
Other
256 stars 160 forks source link

Issue with service discovery #1041

Closed bhanugarg23 closed 1 year ago

bhanugarg23 commented 2 years ago

I am facing issues with working with service discovery using akka. I recently migrated my application from Kubernetes version 1.18 to 1.21 . Service discovery is working fine on the older version but it doesn't seem to work on version 1.21. Below are the error log:-

 play.api.UnexpectedException: Unexpected exception[IllegalStateException: Service ${serviceName} was not found by service locator]                                         
     at play.api.http.HttpErrorHandlerExceptions$.throwableToUsefulException(HttpErrorHandler.scala:358)                                                                 
     at play.api.http.DefaultHttpErrorHandler.onServerError(HttpErrorHandler.scala:264)                                                                                  
     at play.core.server.AkkaHttpServer$$anonfun$2.applyOrElse(AkkaHttpServer.scala:430)                                                                                 
     at play.core.server.AkkaHttpServer$$anonfun$2.applyOrElse(AkkaHttpServer.scala:422)                                                                                 
     at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:454)                                                                                              
     at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:63)                                                                             
     at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:100)                                                                         
     at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)                                                                                          
     at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:94)                                                                                           
     at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:100)                                                                                    

Config file looks like:-

akka.management {
  cluster.bootstrap {
    contact-point-discovery {
      discovery-method = kubernetes-api
      service-name = ${serviceName}
      required-contact-point-nr = ${REQUIRED_CONTACT_POINT_NR}
    }
  }

Can I get some help regarding this please

johanandren commented 1 year ago

Looks like a missing value for ${serviceName} since that placeholder shows up in the log?

johanandren commented 1 year ago

Oh, really old issue anyway, closing.