Opscenter不会使用单独的cassandra集群

时间:2014-11-03 20:01:36

标签: cassandra datastax opscenter

我们正在使用cloudformation来自动设置和拆除我们用于负载测试的几个cassandra集群。在此负载测试期间,我们使用opscenter来监控我们的吞吐量。我发现将opscenter数据存储在我们测试的目标集群中会使我们节点的数据所有权信息发生偏差。因此,我想将opscenter和代理数据移动到它自己的节点。我有一个c3.4xl设置了一个cassandra实例和opscenter。我有以下配置文件。

opscenter服务器

/etc/opscenter/clusters/usergrid.conf

[cassandra]
seed_hosts = ec2-23-22-188-56.compute-1.amazonaws.com,ec2-54-163-164-41.compute-1.amazonaws.com,ec2-54-166-10-160.compute-1.amazonaws.com,ec2-54-166-219-212.compute-1.amazonaws.com,ec2-54-211-181-126.compute-1.amazonaws.com,ec2-54-82-161-157.compute-1.amazonaws.com,ec2-54-82-30-122.compute-1.amazonaws.com,ec2-54-83-98-182.compute-1.amazonaws.com,ec2-54-91-209-251.compute-1.amazonaws.com

[storage_cassandra]
seed_hosts = ec2-54-204-237-40.compute-1.amazonaws.com
api_port = 9160

datastax剂 cat /var/lib/datastax-agent/conf/address.yaml

stomp_interface: ec2-54-204-237-40.compute-1.amazonaws.com

但是在代理中,我在/var/log/datastax-agent/agent.log的日志中看到了这一点。

INFO [thrift-init] 2014-11-03 14:33:41,069 Connected to Cassandra cluster: usergrid
INFO [thrift-init] 2014-11-03 14:33:41,071 in execute with client org.apache.cassandra.thrift.Cassandra$Client@6deebf54


INFO [thrift-init] 2014-11-03 14:33:41,072 Using partitioner: org.apache.cassandra.dht.Murmur3Partitioner
 INFO [pdp-loader] 2014-11-03 14:33:41,072 Attempting to load stored metric values.
ERROR [pdp-loader] 2014-11-03 14:33:41,092 There was an error when attempting to load stored rollups.
me.prettyprint.hector.api.exceptions.HInvalidRequestException: InvalidRequestException(why:Keyspace 'OpsCenter' does not exist)
    at me.prettyprint.cassandra.connection.client.HThriftClient.getCassandra(HThriftClient.java:112)
    at me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:251)
    at me.prettyprint.cassandra.service.KeyspaceServiceImpl.operateWithFailover(KeyspaceServiceImpl.java:132)
    at me.prettyprint.cassandra.service.KeyspaceServiceImpl.getSlice(KeyspaceServiceImpl.java:290)
    at me.prettyprint.cassandra.model.thrift.ThriftSliceQuery$1.doInKeyspace(ThriftSliceQuery.java:53)
    at me.prettyprint.cassandra.model.thrift.ThriftSliceQuery$1.doInKeyspace(ThriftSliceQuery.java:49)
    at me.prettyprint.cassandra.model.KeyspaceOperationCallback.doInKeyspaceAndMeasure(KeyspaceOperationCallback.java:20)
    at me.prettyprint.cassandra.model.ExecutingKeyspace.doExecute(ExecutingKeyspace.java:101)
    at me.prettyprint.cassandra.model.thrift.ThriftSliceQuery.execute(ThriftSliceQuery.java:48)
    at clj_hector.core$execute_query.doInvoke(core.clj:201)
    at clojure.lang.RestFn.invoke(RestFn.java:423)
    at clj_hector.core$get_column_range.doInvoke(core.clj:298)
    at clojure.lang.RestFn.invoke(RestFn.java:587)
    at opsagent.cassandra$scan_pdps$fn__1051.invoke(cassandra.clj:182)
    at opsagent.cassandra$scan_pdps.invoke(cassandra.clj:181)
    at opsagent.cassandra$process_pdp_row$fn__1060.invoke(cassandra.clj:199)
    at opsagent.cassandra$process_pdp_row.invoke(cassandra.clj:197)
    at opsagent.cassandra$process_pdp_row.invoke(cassandra.clj:195)
    at opsagent.cassandra$load_pdps_with_retry$fn__1066.invoke(cassandra.clj:213)
    at opsagent.cassandra$load_pdps_with_retry.invoke(cassandra.clj:210)
    at opsagent.cassandra$setup_cassandra$f__388__auto____1094$fn__1095$f__388__auto____1102.invoke(cassandra.clj:357)
    at clojure.lang.AFn.run(AFn.java:24)
    at java.lang.Thread.run(Thread.java:745)
Caused by: InvalidRequestException(why:Keyspace 'OpsCenter' does not exist)
    at org.apache.cassandra.thrift.Cassandra$set_keyspace_result.read(Cassandra.java:5452)
    at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
    at org.apache.cassandra.thrift.Cassandra$Client.recv_set_keyspace(Cassandra.java:531)
    at org.apache.cassandra.thrift.Cassandra$Client.set_keyspace(Cassandra.java:518)
    at me.prettyprint.cassandra.connection.client.HThriftClient.getCassandra(HThriftClient.java:110)
    ... 22 more

通常这表明客户端无法连接到存储Cassandra节点。但是,从代理节点,我可以执行以下命令。

cassandra-cli -h ec2-54-204-237-40.compute-1.amazonaws.com

然后我可以描述密钥空间,它起作用。

[default@unknown] describe  OpsCenter;

WARNING: CQL3 tables are intentionally omitted from 'describe' output.
See https://issues.apache.org/jira/browse/CASSANDRA-4377 for details.

Keyspace: OpsCenter:
  Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
  Durable Writes: true
    Options: [us-east:1]
  Column Families:
    ColumnFamily: bestpractice_results
    "{"info": "OpsCenter management data.", "version": [5, 0, 1]}"
      Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
      Default column value validator: org.apache.cassandra.db.marshal.BytesType
      Cells sorted by: org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.IntegerType)
      GC grace seconds: 0
      Compaction min/max thresholds: 4/32
      Read repair chance: 0.25
      DC Local Read repair chance: 0.0
      Populate IO Cache on flush: false
      Replicate on write: true
      Caching: KEYS_ONLY
      Bloom Filter FP chance: 0.01
      Built indexes: []
      Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
      Compression Options:
        sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
    ColumnFamily: events
    "{"info": "OpsCenter management data.", "version": [5, 0, 1]}"
      Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
      Default column value validator: org.apache.cassandra.db.marshal.BytesType
      Cells sorted by: org.apache.cassandra.db.marshal.UTF8Type
      GC grace seconds: 864000
      Compaction min/max thresholds: 4/32
      Read repair chance: 0.25
      DC Local Read repair chance: 0.0
      Populate IO Cache on flush: false
      Replicate on write: true
      Caching: KEYS_ONLY
      Bloom Filter FP chance: 0.01
      Built indexes: []
      Column Metadata:
        Column Name: success
          Validation Class: org.apache.cassandra.db.marshal.BooleanType
        Column Name: action
          Validation Class: org.apache.cassandra.db.marshal.LongType
        Column Name: level
          Validation Class: org.apache.cassandra.db.marshal.LongType
        Column Name: time
          Validation Class: org.apache.cassandra.db.marshal.LongType
      Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
      Compression Options:
        sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
    ColumnFamily: events_timeline
    "{"info": "OpsCenter management data.", "version": [5, 0, 1]}"
      Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
      Default column value validator: org.apache.cassandra.db.marshal.BytesType
      Cells sorted by: org.apache.cassandra.db.marshal.LongType
      GC grace seconds: 864000
      Compaction min/max thresholds: 4/32
      Read repair chance: 0.25
      DC Local Read repair chance: 0.0
      Populate IO Cache on flush: false
      Replicate on write: true
      Caching: KEYS_ONLY
      Bloom Filter FP chance: 0.01
      Built indexes: []
      Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
      Compression Options:
        sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
    ColumnFamily: pdps
    "{"info": "OpsCenter management data.", "version": [5, 0, 1]}"
      Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
      Default column value validator: org.apache.cassandra.db.marshal.BytesType
      Cells sorted by: org.apache.cassandra.db.marshal.UTF8Type
      GC grace seconds: 0
      Compaction min/max thresholds: 4/32
      Read repair chance: 0.25
      DC Local Read repair chance: 0.0
      Populate IO Cache on flush: false
      Replicate on write: true
      Caching: KEYS_ONLY
      Bloom Filter FP chance: 0.01
      Built indexes: []
      Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
      Compression Options:
        sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
    ColumnFamily: rollups300
    "{"info": "OpsCenter management data.", "version": [5, 0, 1]}"
      Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
      Default column value validator: org.apache.cassandra.db.marshal.BytesType
      Cells sorted by: org.apache.cassandra.db.marshal.IntegerType
      GC grace seconds: 0
      Compaction min/max thresholds: 4/32
      Read repair chance: 0.25
      DC Local Read repair chance: 0.0
      Populate IO Cache on flush: false
      Replicate on write: true
      Caching: KEYS_ONLY
      Bloom Filter FP chance: 0.01
      Built indexes: []
      Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
      Compression Options:
        sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
    ColumnFamily: rollups60
    "{"info": "OpsCenter management data.", "version": [5, 0, 1]}"
      Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
      Default column value validator: org.apache.cassandra.db.marshal.BytesType
      Cells sorted by: org.apache.cassandra.db.marshal.IntegerType
      GC grace seconds: 0
      Compaction min/max thresholds: 4/32
      Read repair chance: 0.25
      DC Local Read repair chance: 0.0
      Populate IO Cache on flush: false
      Replicate on write: true
      Caching: KEYS_ONLY
      Bloom Filter FP chance: 0.01
      Built indexes: []
      Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
      Compression Options:
        sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
    ColumnFamily: rollups7200
    "{"info": "OpsCenter management data.", "version": [5, 0, 1]}"
      Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
      Default column value validator: org.apache.cassandra.db.marshal.BytesType
      Cells sorted by: org.apache.cassandra.db.marshal.IntegerType
      GC grace seconds: 0
      Compaction min/max thresholds: 4/32
      Read repair chance: 0.25
      DC Local Read repair chance: 0.0
      Populate IO Cache on flush: false
      Replicate on write: true
      Caching: KEYS_ONLY
      Bloom Filter FP chance: 0.01
      Built indexes: []
      Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
      Compression Options:
        sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
    ColumnFamily: rollups86400
    "{"info": "OpsCenter management data.", "version": [5, 0, 1]}"
      Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
      Default column value validator: org.apache.cassandra.db.marshal.BytesType
      Cells sorted by: org.apache.cassandra.db.marshal.IntegerType
      GC grace seconds: 0
      Compaction min/max thresholds: 4/32
      Read repair chance: 0.25
      DC Local Read repair chance: 0.0
      Populate IO Cache on flush: false
      Replicate on write: true
      Caching: KEYS_ONLY
      Bloom Filter FP chance: 0.01
      Built indexes: []
      Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
      Compression Options:
        sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
    ColumnFamily: settings
    "{"info": "OpsCenter management data.", "version": [5, 0, 1]}"
      Key Validation Class: org.apache.cassandra.db.marshal.BytesType
      Default column value validator: org.apache.cassandra.db.marshal.BytesType
      Cells sorted by: org.apache.cassandra.db.marshal.BytesType
      GC grace seconds: 864000
      Compaction min/max thresholds: 4/32
      Read repair chance: 1.0
      DC Local Read repair chance: 0.0
      Populate IO Cache on flush: false
      Replicate on write: true
      Caching: KEYS_ONLY
      Bloom Filter FP chance: 0.01
      Built indexes: []
      Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
      Compression Options:
        sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
[default@unknown]

这告诉我目标Cassandra节点已启动并正在运行,并且具有键空间+列族。它还表明我在代理之间没有任何类型的网络防火墙问题 - >卡桑德拉。我无法解释为什么我收到此错误消息。我仍然在配置中遗漏了什么,或者这是一个错误?

Cassandra:1.2.19 Opscenter:5.0.1 DS代理:5.0.1

非常感谢任何帮助!

谢谢, 托德

更新

这是代理日志。请注意,我的IP已更改,因为这是一个新环境。它似乎正在尝试连接到10.81.168.96:9160,这不是我在ec2-174-129-181-123.compute-1.amazonaws.com设置中设置的ec2 IP。不知道它来自哪里,但它不是opscenter服务器上设置的。

agent.log

https://gist.github.com/tnine/f509c120465eb80ade92

对于要点很抱歉,但我已经超出了字符数限制。

1 个答案:

答案 0 :(得分:0)

如果您查看opscenter实例的日志,您应该看到:

exceptions.Exception: Storing data in a separate cluster is only supported when managing DSE clusters.

虽然在OpsCenter文档中它有这个:

  

[storage_cassandra] seed_hosts   在为OpsCenter存储使用其他群集时使用。卡桑德拉   种子节点用于确定环形拓扑并获得八卦   有关群集中节点的信息。这应该是一样的   以逗号分隔的种子节点列表,作为为您配置的种子节点    Cassandra或 DataStax Enterprise集群中的种子属性   cassandra.yaml配置文件。

所以你会认为这是可能的,但显然不是。