如何配置和运行Reaper来修复linux中的cassandra(centos环境)

问题描述 投票:0回答:1

我正在尝试在我的centos VM上安装和运行Reaper 1.4。并遵循与给定视频(https://www.youtube.com/watch?v=0dub29BgwPI)相同的安装步骤,但仍然没有成功开始收割机。任何人都可以帮助我正确/完整的文件。但是我已经阅读并关注了http://cassandra-reaper.io/docs/download/

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

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登录

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登录

        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"
    ^
cassandra cassandra-3.0 repair reaper
1个回答
0
投票
  • 格式错误的YAML在第27行,第11列;扫描下一个标记时;找到无法启动任何令牌的字符'\ t';在'reader',第27行,第1列:clusterName:“dc1”

您需要删除yaml文件中的任何制表符空格,并将其替换为4个空格。

请参阅此处的答案,了解操作YAML文件时常见的原因。 A YAML file cannot contain tabs as indentation

© www.soinside.com 2019 - 2024. All rights reserved.