开发者社区> 问答> 正文

storm.yaml应该如何配置?

执行jstorm nimbus 命令时报错
vincent@ubuntu:~/RJT/jstorm-2.1.1$ jstorm nimbus
/home/vincent/Java/jdk1.8/bin/java
Exception in thread "main" java.lang.ExceptionInInitializerError
    at backtype.storm.command.config_value.main(config_value.java:40)
Caused by: expected '<document start>', but found BlockMappingStart
in 'reader', line 44, column 1:
    topology.enable.classloader: false
    ^

    at org.yaml.snakeyaml.parser.ParserImpl$ParseDocumentStart.produce(ParserImpl.java:225)
    at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158)
    at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:143)
    at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:108)
    at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:120)
    at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:481)
    at org.yaml.snakeyaml.Yaml.load(Yaml.java:424)
    at com.alibaba.jstorm.utils.LoadConf.findAndReadYaml(LoadConf.java:53)
    at backtype.storm.utils.Utils.readStormConfig(Utils.java:359)
    at backtype.storm.utils.Utils.<clinit>(Utils.java:65)
    ... 1 more
Failed to get config nimbus.classpath
None
21:16:42.228 [main] INFO  com.alibaba.jstorm.utils.LoadConf - Using defaults.yaml from resources
21:16:42.423 [main] INFO  com.alibaba.jstorm.utils.LoadConf - Using storm.yaml from resources

Exception in thread "main" java.lang.ExceptionInInitializerError
    at backtype.storm.command.config_value.main(config_value.java:40)
Caused by: expected '<document start>', but found BlockMappingStart
in 'reader', line 44, column 1:
    topology.enable.classloader: false
    ^

    at org.yaml.snakeyaml.parser.ParserImpl$ParseDocumentStart.produce(ParserImpl.java:225)
    at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158)
    at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:143)
    at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:108)
    at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:120)
    at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:481)
    at org.yaml.snakeyaml.Yaml.load(Yaml.java:424)
    at com.alibaba.jstorm.utils.LoadConf.findAndReadYaml(LoadConf.java:53)
    at backtype.storm.utils.Utils.readStormConfig(Utils.java:359)
    at backtype.storm.utils.Utils.<clinit>(Utils.java:65)
    ... 1 more
Failed to get config nimbus.childopts
None
21:16:42.679 [main] INFO  com.alibaba.jstorm.utils.LoadConf - Using defaults.yaml from resources
21:16:42.875 [main] INFO  com.alibaba.jstorm.utils.LoadConf - Using storm.yaml from resources

Exception in thread "main" java.lang.ExceptionInInitializerError
    at backtype.storm.command.config_value.main(config_value.java:40)
Caused by: expected '<document start>', but found BlockMappingStart
in 'reader', line 44, column 1:
    topology.enable.classloader: false
    ^

    at org.yaml.snakeyaml.parser.ParserImpl$ParseDocumentStart.produce(ParserImpl.java:225)
    at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158)
    at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:143)
    at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:108)
    at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:120)
    at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:481)
    at org.yaml.snakeyaml.Yaml.load(Yaml.java:424)
    at com.alibaba.jstorm.utils.LoadConf.findAndReadYaml(LoadConf.java:53)
    at backtype.storm.utils.Utils.readStormConfig(Utils.java:359)
    at backtype.storm.utils.Utils.<clinit>(Utils.java:65)
    ... 1 more
Failed to get config jstorm.log.dir
None
21:16:43.138 [main] INFO  com.alibaba.jstorm.utils.LoadConf - Using defaults.yaml from resources
21:16:43.327 [main] INFO  com.alibaba.jstorm.utils.LoadConf - Using storm.yaml from resources

coercing to Unicode: need string or buffer, NoneType found
Syntax: [jstorm nimbus]

    Launches the nimbus daemon. This command should be run under
    supervision with a tool like daemontools or monit.

    See Setting up a JStorm cluster for more information.
    (https://github.com/alibaba/jstorm/wiki/JStorm-Chinese-Documentation)

这是我的storm.yaml文件:
########### These MUST be filled in for a storm configuration
storm.zookeeper.servers:
     - "localhost"

storm.zookeeper.root: "/jstorm"

# cluster.name: "default"

#nimbus.host/nimbus.host.start.supervisor is being used by $JSTORM_HOME/bin/start.sh
#it only support IP, please don't set hostname
# For example
# nimbus.host: "10.132.168.10, 10.132.168.45"
nimbus.host: "localhost"
#nimbus.host.start.supervisor: false

# %JSTORM_HOME% is the jstorm home directory
storm.local.dir: "%JSTORM_HOME%/data"
# please set absolute path, default path is JSTORM_HOME/logs
# jstorm.log.dir: "absolute path"

# java.library.path: "/usr/local/lib:/opt/local/lib:/usr/lib"



# if supervisor.slots.ports is null,
# the port list will be generated by cpu cores and system memory size
# for example,
# there are cpu_num = system_physical_cpu_num/supervisor.slots.port.cpu.weight
# there are mem_num = system_physical_memory_size/(worker.memory.size * supervisor.slots.port.mem.weight)
# The final port number is min(cpu_num, mem_num)
# supervisor.slots.ports.base: 6800
# supervisor.slots.port.cpu.weight: 1.2
# supervisor.slots.port.mem.weight: 0.7
# supervisor.slots.ports: null
# supervisor.slots.ports:
   # - 6800
   # - 6801
   # - 6802
   # - 6803

# Default disable user-define classloader
# If there are jar conflict between jstorm and application,
# please enable it
topology.enable.classloader: false

# enable supervisor use cgroup to make resource isolation
# Before enable it, you should make sure:
#     1. Linux version (>= 2.6.18)
#     2. Have installed cgroup (check the file's existence:/proc/cgroups)
#    3. You should start your supervisor on root
# You can get more about cgroup:
#   http://t.cn/8s7nexU
# supervisor.enable.cgroup: false


### Netty will send multiple messages in one batch  
### Setting true will improve throughput, but more latency
# storm.messaging.netty.transfer.async.batch: true

### if this setting  is true, it will use disruptor as internal queue, which size is limited
### otherwise, it will use LinkedBlockingDeque as internal queue , which size is unlimited
### generally when this setting is true, the topology will be more stable,
### but when there is a data loop flow, for example A -> B -> C -> A
### and the data flow occur blocking, please set this as false
# topology.buffer.size.limited: true

### default worker memory size, unit is byte
# worker.memory.size: 2147483648

# Metrics Monitor
# topology.performance.metrics: it is the switch flag for performance
# purpose. When it is disabled, the data of timer and histogram metrics
# will not be collected.
# topology.alimonitor.metrics.post: If it is disable, metrics data
# will only be printed to log. If it is enabled, the metrics data will be
# posted to alimonitor besides printing to log.
# topology.performance.metrics: true
# topology.alimonitor.metrics.post: false

# UI MultiCluster
# Following is an example of multicluster UI configuration
# ui.clusters:
#     - {
#         name: "jstorm",
#         zkRoot: "/jstorm",
#         zkServers:
#             [ "localhost"],
#         zkPort: 2181,
#       }




展开
收起
葛星辰 2016-07-03 12:19:28 5771 0
0 条回答
写回答
取消 提交回答
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
Deploy Apache Flink Natively on YARN_Kubernetes 立即下载
基于Docker on Yarn系统的微服务实践 立即下载
Kubernetes日志采集与分析 立即下载