【问题标题】:ValueError when trying to start carbon-cache尝试启动 carbon-cache 时出现 ValueError
【发布时间】:2013-06-23 09:16:50
【问题描述】:

我对 Graphite 有疑问,特别是 carbon-cache。在某个时候,我让它运行了。现在几周后回来时,我试图再次开始使用石墨。 django-webapp 运行良好,但似乎我的 carbon-cache 后端有问题。 Graphite 安装在 /opt/graphite 中,我运行 /opt/graphite/bin/carbon-cache.py start。这是我得到的错误:

root@stfutm01:/opt/graphite/bin# ./carbon-cache.py start
Starting carbon-cache (instance a)
Traceback (most recent call last):
  File "./carbon-cache.py", line 30, in <module>
    run_twistd_plugin(__file__)
  File "/opt/graphite/lib/carbon/util.py", line 92, in run_twistd_plugin
    runApp(config)
  File "/usr/local/lib/python2.7/dist-packages/twisted/scripts/twistd.py", line 23, in runApp
    _SomeApplicationRunner(config).run()
  File "/usr/local/lib/python2.7/dist-packages/twisted/application/app.py", line 386, in run
    self.application = self.createOrGetApplication()
  File "/usr/local/lib/python2.7/dist-packages/twisted/application/app.py", line 446, in createOrGetApplication
    ser = plg.makeService(self.config.subOptions)
  File "/opt/graphite/lib/twisted/plugins/carbon_cache_plugin.py", line 21, in makeService
    return service.createCacheService(options)
  File "/opt/graphite/lib/carbon/service.py", line 127, in createCacheService
    from carbon.writer import WriterService
  File "/opt/graphite/lib/carbon/writer.py", line 34, in <module>
    schemas = loadStorageSchemas()
  File "/opt/graphite/lib/carbon/storage.py", line 123, in loadStorageSchemas
    archives = [ Archive.fromString(s) for s in retentions ]
  File "/opt/graphite/lib/carbon/storage.py", line 107, in fromString
    (secondsPerPoint, points) = whisper.parseRetentionDef(retentionDef)
  File "/usr/local/lib/python2.7/dist-packages/whisper.py", line 76, in parseRetentionDef
    (precision, points) = retentionDef.strip().split(':')
ValueError: need more than 1 value to unpack

我认为这是拆分 retentionDef.strip().split(':') 的问题。我的存储架构配置文件(/opt/graphite/conf/storage-schemas.conf)如下所示:

[stats]
priority = 110
pattern = ^stats\..*
retentions = 10s:6h,1m:7d,10m:1y
[ts3]
priority = 100
pattern = ^skarp\.ts3\..*
retentions = 60s:1y,1h,:5y

我应该在哪里寻找任何提示?或者有人知道我在这里缺少什么吗?

【问题讨论】:

    标签: graphite


    【解决方案1】:

    我认为问题在于 [ts3] 租用。 "The retentions line can specify multiple retentions. Each retention of frequency:history is separated by a comma."

    在 ts3 中,它似乎是 3 次保留(以逗号分隔),第二次未指定历史记录,最后一次未指定频率。

    retentions = 60s:1y,1h,:5y
    

    我想你的意思可能是:

    retentions = 60s:1y,1h:5y
    

    这将是 1 年的 60 秒数据和 5 年后的 1 小时数据。

    【讨论】:

    • 杰普,就是这样。不知何故,我在那里得到了那个逗号,但没有看到它。非常感谢解决它。
    猜你喜欢
    • 1970-01-01
    • 2017-01-09
    • 1970-01-01
    • 2017-11-21
    • 1970-01-01
    • 1970-01-01
    • 2022-01-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多