我通过将其部署在 docker 上创建了 2 个 cassandra 实例。一个在 9042 端口上,另一个在 9043 上。
我有 2 个应用程序,一个要连接到 9042,另一个要连接到 9043。 第一个应用程序连接到 9042 并且运行成功。
我为 db 提供的属性是:contactpoints = localhost, port = 9042
将由第二个数据库实例启动的第二个应用程序,即 9043 正在抛出错误:
om.datastax.driver.core.Cluster - 您在联系点中列出了 localhost/0:0:0:0:0:0:0:1:9042,但在控制主机的 system.peers 中没有找到它启动
我为 db 提供的属性是:
接触点 = 本地主机,端口 = 9043
第一个应用程序运行时如何连接到 cassandra intsance 9043?