I have a lagom project and I am using external cassandra so the actual problem is when i am running my project on conductr locally using sandbox it is not able to detect cassandra running separately on my local.

Error : Could not find Cassandra contact points, due to: No contact points for [cas_native]

My build.sbt contains

lagomCassandraEnabled in ThisBuild := false
lagomUnmanagedServices in ThisBuild := Map("cas_native" -> "http://localhost:9042")
2

There are 2 answers

2
Tim Moore On

The build.sbt configuration above only applies when running in development mode.

See the Lagom documentation for information on configuring the service locator for production:

1
wjing On

I found that you should chnage from "http://localhost:9042" to "tcp://localhost:9042", accounding to official documents https://www.lagomframework.com/documentation/current/scala/CassandraServer.html#:~:text=tcp%3A//localhost%3A9042

in sbt:

lagomCassandraEnabled in ThisBuild := false
lagomUnmanagedServices in ThisBuild := Map("cas_native" -> "tcp://localhost:9042")