【问题标题】:Titan node does not come up泰坦节点没有出现
【发布时间】:2015-03-21 13:45:47
【问题描述】:

我有一个小型 Titan 0.5.0 集群,有 8 个节点。每个节点都在 Rexster 2.5.0 和 Cassandra 中运行 Titan。它们都配置相同。不幸的是,几乎所有时间他们中的一个都无法启动。
在大多数情况下,这是种子节点之一。

使用cassandra 作为存储后端,我在 Rexster/Titan 日志中得到以下信息。

WARN  com.tinkerpop.rexster.config.GraphConfigurationContainer - Could 
  not open global configuration com.thinkaurelius.titan.core.TitanException:
  Could not open global configuration
 at com.thinkaurelius.titan.diskstorage.Backend.
   getStandaloneGlobalConfiguration(Backend.java: 405)
...
Caused by: com.thinkaurelius.titan.diskstorage.TemporaryBackendException: 
  Temporary failure in storage backend
 at com.thinkaurelius.titan.diskstorage.cassandra.astyanax.
   AstyanaxStoreManager.ensureColumnFamilyExists(AstyanaxStoreManager.java:446)
...
Caused by: com.netflix.astyanax.connectionpool.exceptions.BadRequestException: 
  BadRequestException: [host=192.168.0.10(192.168.0.10):9160, latency=496(496),
  attempts=1] InvalidRequestException(why:Cannot add already existing
  column family "system_properties" to keyspace "titan")
 at com.netflix.astyanax.thrift.ThriftConverter.ToConnectionPoolException(
   ThriftConverter.java:159)

Rexster 确实无法启动,因此没有加载图表。 但是,Rexster 无法连接的 Cassandra 节点似乎没问题:nodetool 将该节点列为环的一部分。如果我对剩余的 Rexster 实例发出请求,一切似乎都正常。

我在启动节点之前擦除了所有数据。

我切换到cassandrathrift 导致了类似的异常(由 TimeoutException 引起的 PermanentBackendException 引起的相同 TitanException)。 Rexster 中的存储超时为 30 秒。这可能太低了,因为我目前同时启动所有节点,但没有解释cassandra 的问题。

这里出了什么问题?

编辑

我误用了泰坦。为了不必在启动时处理索引创建——这在我的例子中经常发生——我在 Rexster 扩展中创建了索引。我认为这段代码被多次调用:当我同时启动多个节点时,似乎其中一些节点试图创建索引。

问题:扩展有什么方法可以安全地创建索引?我为此创建了一个单独的线程:What are the methods to create indices?

我将存储超时时间增加到 60 秒,并在从代码中删除索引创建后重试该过程。我仍然同时启动所有节点。一个 Rexstitan 节点(种子节点 #2)再次无法启动。

Cassandra 日志确实包含异常

java.lang.IllegalArgumentException: Unknown keyspace/cf pair (titan.txlog)
    at org.apache.cassandra.db.Keyspace.getColumnFamilyStore(Keyspace.java:166)
    at org.apache.cassandra.db.Keyspace.getRow(Keyspace.java:326)
    at org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:65)
    at org.apache.cassandra.db.ReadVerbHandler.doVerb(ReadVerbHandler.java:47)
    at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:60)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

我可以在两个种子节点中看到。虽然一个种子节点上的 Rexster 似乎并不关心另一个 Rexster 实例无法启动

Caused by: com.netflix.astyanax.connectionpool.exceptions.BadRequestException: BadRequestException: [host=192.168.0.10(192.168.0.10):9160, latency=66(66), attempts=1]InvalidRequestException(why:Cannot add already existing column family "graphindex_lock_" to keyspace "titan")
    at com.netflix.astyanax.thrift.ThriftConverter.ToConnectionPoolException(ThriftConverter.java:159)
    at com.netflix.astyanax.thrift.AbstractOperationImpl.execute(AbstractOperationImpl.java:65)
    at com.netflix.astyanax.thrift.AbstractOperationImpl.execute(AbstractOperationImpl.java:28)
    at com.netflix.astyanax.thrift.ThriftSyncConnectionFactoryImpl$ThriftConnection.execute(ThriftSyncConnectionFactoryImpl.java:151)
    at com.netflix.astyanax.connectionpool.impl.AbstractExecuteWithFailoverImpl.tryOperation(AbstractExecuteWithFailoverImpl.java:119)
    at com.netflix.astyanax.connectionpool.impl.AbstractHostPartitionConnectionPool.executeWithFailover(AbstractHostPartitionConnectionPool.java:338)
    at com.netflix.astyanax.thrift.ThriftClusterImpl.executeSchemaChangeOperation(ThriftClusterImpl.java:146)
    at com.netflix.astyanax.thrift.ThriftClusterImpl.internalCreateColumnFamily(ThriftClusterImpl.java:240)

rexstitan.log。听起来与之前引发的异常非常相似。

只是为了澄清: 失败是指 Rexster 已启动并且可以查询但未能加载 Titan 图“图”。

也许我必须将大小减小到最小,以检查这是否与集群大小有关。

编辑#2

与集群大小无关。它变得非常烦人。 有时是上面的BadRequestException,有时是BadRequestException,因为已经有一个键空间“泰坦”。 或者是IllegalArgumentException

2646 [main] WARN  com.tinkerpop.rexster.config.GraphConfigurationContainer -
  Database has already been initialized but not frozen
  java.lang.IllegalArgumentException: Database has already been initialized but not frozen
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:93)
    at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1294)
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:93)
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:73)
    at com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration.configureGraphInstance(TitanGraphConfiguration.java:33)
    at com.tinkerpop.rexster.config.GraphConfigurationContainer.getGraphFromConfiguration(GraphConfigurationContainer.java:124)
    at com.tinkerpop.rexster.config.GraphConfigurationContainer.<init>(GraphConfigurationContainer.java:54)
    at com.tinkerpop.rexster.server.XmlRexsterApplication.reconfigure(XmlRexsterApplication.java:99)
    at com.tinkerpop.rexster.server.XmlRexsterApplication.<init>(XmlRexsterApplication.java:47)
    at com.tinkerpop.rexster.Application.<init>(Application.java:97)
    at com.tinkerpop.rexster.Application.main(Application.java:189)

不能一次启动多个节点,它们会冲突吗? 这是我能想到的唯一原因,因为我可以得到任何异常,有时它工作正常。

【问题讨论】:

  • 来自 "我在滥用 Titan。""我为此创建了一个单独的线程:" 我似乎得出的结论是,问题应该是删除?介意吗?
  • 老实说我不想删除它。起初可能会有人在同一个问题上运行。更重要的是问题仍然存在,即使现在是由不同的异常引起的。
  • 其他问题不包括这个案子吗?这似乎是一个最初的想法,导致另一个问题很可能会引起人们的注意。
  • 不幸的是它没有。这只是我试图面对上述问题的另一个问题。你是对的,我的尝试导致了一个不同的例外。也许我应该为第二个例外提出一个新问题,但对我来说,它们似乎非常相似并且可能具有相同的原因。

标签: java ubuntu cassandra titan rexster


【解决方案1】:

问题是 Titan 节点同时启动。 (版本0.5.0)
一次启动的节点越多,BadRequestExceptions 的可能性就越大,因为所有节点都尝试同时在 Cassandra 集群中创建相同的键空间/列族。

要克服这个问题,你必须

  1. 启动 Cassandra(一次所有节点都可以)
  2. 启动单个 Titan 节点
  3. 在此节点上打开 Rexster 控制台,创建架构和索引
  4. 启动剩余的 Titan 节点

【讨论】:

    猜你喜欢
    • 2015-02-21
    • 1970-01-01
    • 1970-01-01
    • 2015-08-12
    • 1970-01-01
    • 1970-01-01
    • 2013-09-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多