OpsCenter无法从单个群集中获取密钥空间

时间:2015-08-26 09:16:31

标签: cassandra datastax opscenter

有一个OpsCenter监控3个集群,现在无法显示它的密钥空间,因此我无法对其进行操作f.ex.压缩否则监控对于相同的集群似乎很好,所有代理都连接等。

我在opscenterd.log中找到了这个:

2015-08-26 11:03:47+0200 [] ERROR: An error occurred while retrieving all keyspaces.  Traceback (most recent call last):
          File "/usr/lib/python2.6/site-packages/opscenterd/WebServer.py", line 933, in InspectKeyspaceController
          File "/usr/lib/python2.6/site-packages/opscenterd/CassandraService.py", line 406, in keyspaces_as_data
          File "/usr/lib/python2.6/site-packages/opscenterd/CassandraService.py", line 406, in <genexpr>
          File "/usr/lib/python2.6/site-packages/opscenterd/CassandraService.py", line 360, in _to_table_bools
          File "/usr/share/opscenter/lib/py/cassandra/metadata.py", line 963, in export_as_string
            ret += "\nApproximate structure, for reference:\n(this should not be used to reproduce this schema)\n\n%s" % self.all_as_cql()
          File "/usr/share/opscenter/lib/py/cassandra/metadata.py", line 969, in all_as_cql
            ret = self.as_cql_query(formatted=True)
          File "/usr/share/opscenter/lib/py/cassandra/metadata.py", line 1000, in as_cql_query
            columns.append("%s %s%s" % (protect_name(col.name), col.typestring, ' static' if col.is_static else ''))
          File "/usr/share/opscenter/lib/py/cassandra/metadata.py", line 1089, in protect_name
            return maybe_escape_name(name)
          File "/usr/share/opscenter/lib/py/cassandra/metadata.py", line 1118, in maybe_escape_name
            return escape_name(name)
          File "/usr/share/opscenter/lib/py/cassandra/metadata.py", line 1122, in escape_name
            return '"%s"' % (name.replace('"', '""'),)
        AttributeError: 'NoneType' object has no attribute 'replace'
2015-08-26 11:03:47+0200 []  WARN: InternalError while calling InspectKeyspaceController: An error occurred while retrieving all keyspaces. 

虽然它自己的群集给了我这个,但在群集日志中没什么可看的:

[cqlsh 4.1.1 | Cassandra 2.0.16 | CQL spec 3.1.1 | Thrift protocol 19.39.0]
Use HELP for help.
cqlsh> describe keyspaces;

KeyspaceMetadata  system  OpsCenter  system_traces

cqlsh> select * from system.schema_keyspaces;

 keyspace_name    | durable_writes | strategy_class                                       | strategy_options
------------------+----------------+------------------------------------------------------+----------------------------
 KeyspaceMetadata |           True | org.apache.cassandra.locator.NetworkTopologyStrategy |             {"SPRAWL":"2"}
        OpsCenter |           True |          org.apache.cassandra.locator.SimpleStrategy | {"replication_factor":"2"}
           system |           True |           org.apache.cassandra.locator.LocalStrategy |                         {}
    system_traces |           True |          org.apache.cassandra.locator.SimpleStrategy | {"replication_factor":"2"}

(4 rows)

想知道从哪里开始,其他2个群集不显示问题,自上次操作后未进行任何更改。 尝试按节点重启节点。数据存储代理程序和OPsCenter也没有更改,仍然无法从这个集群中获取密钥空间。

提示赞赏,TIA!

1 个答案:

答案 0 :(得分:0)

此问题的根源是此处描述的驱动程序中的错误:https://datastax-oss.atlassian.net/browse/PYTHON-192。你有一些复杂的节俭表吗?可能值得将/ usr / share / opscenter / lib / py / cassandra的内容更新为带有修复程序的驱动程序的最新版本或