【问题标题】:OpsCenter fails to fetch keyspaces from single clusterOpsCenter 无法从单个集群中获取键空间
【发布时间】:2015-11-20 06:05:15
【问题描述】:

有一个 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 个集群没有显示问题,自上次运行以来没有进行任何更改。 尝试按节点重启节点,包括。 datastax 代理和 OPsCenter 也是如此,但没有变化,仍然无法从这一集群中获取密钥空间。

提示,TIA!

【问题讨论】:

  • 您运行的是什么版本的 OpsCenter?

标签: cassandra datastax opscenter


【解决方案1】:

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

【讨论】:

  • 我不知道有任何复杂的 thrift tabels 和 ImHO 在它工作的时间和现在之间没有任何变化,另外两个实例在同一个 OpsCenter 上工作正常......
  • 这个驱动程序的最新版本是什么?在哪里可以找到它?顺便说一句,此后更新到 OpsCenter 5.2.2,但问题仍然存在于三分之一的集群中,因此问题似乎出在集群端而不是 OpsCenter 端。
  • 2016-02-01 11:41:31+0100 [] 错误:检索所有键空间时出错。回溯(最后一次调用):文件“/usr/lib/python2.6/site-packages/opscenterd/WebServer.py”,第 942 行,在 InspectKeyspaceController 文件“/usr/lib/python2.6/site-packages/ opscenterd/CassandraService.py”,第 445 行,在 keyspaces_as_data 文件中“/usr/lib/python2.6/site-packages/opscenterd/CassandraService.py”,第 445 行,在 文件中“/usr/lib/python2. 6/site-packages/opscenterd/CassandraService.py",第 399 行,在 _to_table_bools ...
  • 通过 cql 仍然有问题:[cqlsh 4.1.1 |卡桑德拉 2.0.17 | CQL 规范 3.1.1 | Thrift 协议 19.39.0] 使用 HELP 寻求帮助。 cqlsh> 描述键空间;键空间元数据系统 OpsCenter system_traces
猜你喜欢
  • 2021-09-18
  • 1970-01-01
  • 1970-01-01
  • 2017-01-30
  • 2013-09-15
  • 2014-02-22
  • 1970-01-01
  • 2022-01-08
  • 2014-12-30
相关资源
最近更新 更多