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

wztqucjr  于 2021-06-10  发布在  Cassandra
关注(0)|答案(1)|浏览(548)

我正在尝试在centos虚拟机上安装并运行收割者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"
    ^
kwvwclae

kwvwclae1#

第27行第11列yaml格式错误;扫描下一个令牌时;找到无法启动任何令牌的字符'\t';在“reader”第27行第1列中:clustername:“dc1”
您需要删除yaml文件中的所有制表符空白,并将其替换为4个空格。
请参阅这里的答案,了解在操作yaml文件时为什么这是常见的。yaml文件不能将制表符包含为缩进

相关问题