首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在linux( centos环境)中配置和运行Reaper以修复cassandra

如何在linux( centos环境)中配置和运行Reaper以修复cassandra
EN

Stack Overflow用户
提问于 2019-03-08 06:28:46
回答 1查看 780关注 0票数 0

我正在我的centos上安装并运行Repae1.4。并遵循相同的安装步骤,在给定的视频(https://www.youtube.com/watch?v=0dub29BgwPI),但仍然没有成功地获得收割started.Can任何人请帮助我正确/完整的文件。然而,我阅读并跟踪了http://cassandra-reaper.io/docs/download/

下面给出的是我的cassandra-reaper.yaml设置:

代码语言:javascript
复制
segmentCountPerNode: 16
repairParallelism: DATACENTER_AWARE
repairIntensity: 0.9
scheduleDaysBetween: 7
repairRunThreadCount: 15
hangingRepairTimeoutMins: 30
storageType: cassandra
enableCrossOrigin: true
incrementalRepair: false
blacklistTwcsTables: false
enableDynamicSeedList: true
repairManagerSchedulingIntervalSeconds: 10
activateQueryLogger: false
jmxConnectionTimeoutInSeconds: 5
useAddressTranslator: false
# purgeRecordsAfterInDays: 30
# numberOfRunsToKeepPerUnit: 10
jmxPorts:
        #127.0.0.1: 7100
        #10.X.X.X: 7199
        #127.0.0.2: 7200
        #127.0.0.3: 7300
        #127.0.0.4: 7400
        #127.0.0.5: 7500
        #127.0.0.6: 7600
        #127.0.0.7: 7700
        #127.0.0.8: 7800

jmxAuth:
        username: *****
        password: *****

server:
  type: default
  applicationConnectors:
    - type: http
      port: 8080
      bindHost: 0.0.0.0
  adminConnectors:
    - type: http
      port: 8081
      bindHost: 0.0.0.0
  requestLog:
    appenders: []
cassandra:
  clusterName: "dc1"
  contactPoints: ["10.X.X.1","10.X.X.2","10.X.X.3","10.X.X.4","10.X.X.5"]
  #contactPoints: ["127.0.0.1"]
  keyspace: "reaper_db"
  loadBalancingPolicy:
    type: tokenAware
    shuffleReplicas: true
    subPolicy:
      type: dcAwareRoundRobin
      localDC:
      usedHostsPerRemoteDC: 0
      allowRemoteDCsForLocalConsistencyLevel: false
  authProvider:
    type: plainText
    username: cass
    password: cass
  ssl:
    type: jdk

autoScheduling:
  enabled: false
  initialDelayPeriod: PT15S
  periodBetweenPolls: PT10M
  timeBeforeFirstSchedule: PT5M
  scheduleSpreadPeriod: PT6H
  excludedKeyspaces:
    - keyspace1
    - keyspace2
accessControl:
  sessionTimeout: PT10M
  shiro:
    iniConfigs: ["classpath:shiro.ini"]

来自/var/log/cassandra-reaper/reaper.log的日志

代码语言:javascript
复制
INFO   [main] i.c.ReaperApplication - initializing runner thread pool with 15 threads
INFO   [main] i.c.ReaperApplication - initializing storage of type: cassandra
INFO   [main] c.d.d.core - DataStax Java driver 3.5.0 for Apache Cassandra
INFO   [main] c.d.d.c.GuavaCompatibility - Detected Guava >= 19 in the classpath, using modern compatibility layer
INFO   [main] c.d.d.c.ClockFactory - Using native clock to generate timestamps.
INFO   [main] c.d.d.c.NettyUtil - Found Netty's native epoll transport in the classpath, using it
INFO   [main] o.a.s.c.ReflectionBuilder - An instance with name 'authc' already exists.  Redefining this object as a new instance of type org.apache.shiro.web.filter.authc.PassThruAuthenticationFilter

日志来自/var/log/cassandra-reaper.err

代码语言:javascript
复制
        at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:415)
        at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:226)
        at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingValue.produce(ParserImpl.java:586)
        at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158)
        at org.yaml.snakeyaml.parser.ParserImpl.getEvent(ParserImpl.java:168)
        at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:347)
        ... 11 more
ls: cannot access server/target/cassandra-reaper-*.jar: No such file or directory
io.dropwizard.configuration.ConfigurationParsingException: /etc/cassandra-reaper/cassandra-reaper.yaml has an error:
  * Malformed YAML at line: 27, column: 11; while scanning for the next token; found character  '\t' that cannot start any token;  in 'reader', line 27, column 1:
        clusterName: "dc1"
    ^
 at [Source: (ByteArrayInputStream); line: 26, column: 10]

        at io.dropwizard.configuration.ConfigurationParsingException$Builder.build(ConfigurationParsingException.java:279)
        at io.dropwizard.configuration.BaseConfigurationFactory.build(BaseConfigurationFactory.java:96)
        at io.dropwizard.cli.ConfiguredCommand.parseConfiguration(ConfiguredCommand.java:126)
        at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:74)
        at io.dropwizard.cli.Cli.run(Cli.java:78)
        at io.dropwizard.Application.run(Application.java:93)
        at io.cassandrareaper.ReaperApplication.main(ReaperApplication.java:99)
Caused by: com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.MarkedYAMLException: while scanning for the next token; found character        '\t' that cannot start any token;  in 'reader', line 27, column 1:
        clusterName: "dc1"
    ^
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-03-12 03:40:56

  • 格式错误的YAML行: 27,列: 11;在扫描下一个令牌时,找到不能启动任何标记的字符'\t‘;在'reader’中,第27行,第1列: clusterName:"dc1“

您需要删除yaml文件中的任何选项卡空白空间,并将其替换为4个空格。

有关操作YAML文件时这种情况常见的原因,请参见这里的答案。A YAML file cannot contain tabs as indentation

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55057845

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档