无法连接到 TitanDB - 具有相同实例 ID [] 的 Titan 图已经打开。可能需要强制关机
Can't connect to TitanDB - A Titan graph with the same instance id [] is already open. Might required forced shutdown
一切正常,直到我的应用程序服务器关闭后我无法连接到 TitanDB。
我的连接码:
try {
titanGraph = TitanFactory.build()
.set("storage.backend", "cassandra")
.set("storage.hostname", titanHostname)
.set("graph.unique-instance-id-suffix", 99)
.open();
if(titanGraph.isOpen()) {
LOGGER.info("Success to open Titan DB");
}
} catch (Exception e) {
initError(e, "Error opening Titan DB: ");
}
我总是遇到这个异常:
Caused by: com.thinkaurelius.titan.core.TitanException: A Titan graph with the same instance id [c0a838012r] is already open. Might required forced shutdown.
at com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.<init>(StandardTitanGraph.java:133)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:93)
at com.thinkaurelius.titan.core.TitanFactory$Builder.open(TitanFactory.java:134)
at com.ngsoft.security.auth.TitanLoginModule.connectTitanDB(TitanLoginModule.java:119)
... 33 more
主要问题是:
具有相同实例 ID [...] 的 Titan 图已经打开。可能需要强制关机。
重启我的电脑,cassandra 集群没有工作
如何从数据库中删除会话 ID c0a838012r 的示例:
我们需要通过 gremlin 访问管理系统,删除实例并提交。
\,,,/
(o o)
-----oOOo-(_)-oOOo-----
gremlin> g = TitanFactory.open('../conf/titan-db.properties')
==>titangraph[cassandra:[10.20.30.11, 10.20.30.12]]
gremlin> mgmt = g.getManagementSystem()
==>com.thinkaurelius.titan.graphdb.database.management.ManagementSystem@c1fca2a
gremlin> mgmt.getOpenInstances()
==>c0a838019904-Yossi_c-pc1
==>c0a838012r
==>c0a838016736-Yossi_c-pc1
gremlin> mgmt.forceCloseInstance('c0a838012r')
==>null
gremlin> mgmt.commit()
==>null
一切正常,直到我的应用程序服务器关闭后我无法连接到 TitanDB。 我的连接码:
try {
titanGraph = TitanFactory.build()
.set("storage.backend", "cassandra")
.set("storage.hostname", titanHostname)
.set("graph.unique-instance-id-suffix", 99)
.open();
if(titanGraph.isOpen()) {
LOGGER.info("Success to open Titan DB");
}
} catch (Exception e) {
initError(e, "Error opening Titan DB: ");
}
我总是遇到这个异常:
Caused by: com.thinkaurelius.titan.core.TitanException: A Titan graph with the same instance id [c0a838012r] is already open. Might required forced shutdown.
at com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.<init>(StandardTitanGraph.java:133)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:93)
at com.thinkaurelius.titan.core.TitanFactory$Builder.open(TitanFactory.java:134)
at com.ngsoft.security.auth.TitanLoginModule.connectTitanDB(TitanLoginModule.java:119)
... 33 more
主要问题是:
具有相同实例 ID [...] 的 Titan 图已经打开。可能需要强制关机。
重启我的电脑,cassandra 集群没有工作
如何从数据库中删除会话 ID c0a838012r 的示例:
我们需要通过 gremlin 访问管理系统,删除实例并提交。
\,,,/
(o o)
-----oOOo-(_)-oOOo-----
gremlin> g = TitanFactory.open('../conf/titan-db.properties')
==>titangraph[cassandra:[10.20.30.11, 10.20.30.12]]
gremlin> mgmt = g.getManagementSystem()
==>com.thinkaurelius.titan.graphdb.database.management.ManagementSystem@c1fca2a
gremlin> mgmt.getOpenInstances()
==>c0a838019904-Yossi_c-pc1
==>c0a838012r
==>c0a838016736-Yossi_c-pc1
gremlin> mgmt.forceCloseInstance('c0a838012r')
==>null
gremlin> mgmt.commit()
==>null