ayush
ayush

Reputation: 11

ERROR:No contact points for [cas_native] when running the lagom project in conductr sandbox locally and cassandra separately in local?

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")

Upvotes: 1

Views: 462

Answers (2)

wjing
wjing

Reputation: 11

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")

Upvotes: 0

Tim Moore
Tim Moore

Reputation: 9482

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:

Upvotes: 0

Related Questions