【问题标题】:ERROR:No contact points for [cas_native] when running the lagom project in conductr sandbox locally and cassandra separately in local?错误:在本地导体沙箱中运行 lagom 项目并在本地分别运行 cassandra 时,[cas_native] 没有联系点?
【发布时间】:2018-05-22 18:07:08
【问题描述】:

我有一个 lagom 项目,我正在使用外部 cassandra,所以实际问题是当我使用沙箱在本地运行我的项目时,它无法检测到在我的本地单独运行的 cassandra。

错误:找不到 Cassandra 联系点,原因是:没有联系 [cas_native] 的积分

我的 build.sbt 包含

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

【问题讨论】:

  • 是的,cassandra 正在本地主机上运行。如果我们运行“cqlsh”,那么我们就在 cql shell 中。

标签: cassandra lagom conductor


【解决方案1】:

上面的build.sbt 配置只适用于在开发模式下运行。

有关为生产配置服务定位器的信息,请参阅 Lagom 文档:

【讨论】:

  • 网址不再有效。我遇到了类似的问题。你能提供最新的网址吗?谢谢
  • @WantIt 我用最新文档的链接更新了答案。我假设您没有像原始海报那样使用 ConductR,因为不再支持 ConductR。
【解决方案2】:

我发现你应该从“http://localhost:9042”更改为“tcp://localhost:9042”,参考官方文档https://www.lagomframework.com/documentation/current/scala/CassandraServer.html#:~:text=tcp%3A//localhost%3A9042

【讨论】:

  • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-10-17
  • 2020-06-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多