• Exception in thread "main" expected '<document start>', but found BlockMappingStart in 'reader', line 23, column 2: nimbus.host: "master"


    平台:centos-6.3-i386

       jdk-7u51

            storm 0.9.1

       python 2.6.6

         hadoop 1.2.1

      启动storm的时候,遇到这个问题,百度之后,看到大家的解决方案是在 nimbus.host: "master"前加上空格,但是,我的已经加上空格。还是出错。

    # Licensed to the Apache Software Foundation (ASF) under one
    # or more contributor license agreements.  See the NOTICE file
    # distributed with this work for additional information
    # regarding copyright ownership.  The ASF licenses this file
    # to you under the Apache License, Version 2.0 (the
    # "License"); you may not use this file except in compliance
    # with the License.  You may obtain a copy of the License at
    #
    # http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    ########### These MUST be filled in for a storm configuration
    # storm.zookeeper.servers:
         - "master"
         - "slave1"
         - "slave2"
    #
     nimbus.host: "master"
     storm.local.dir: "/home/hadoop/apache-storm-0.9.1-incubating/data"
     supervisor.slots.ports:
        - 6700
        - 6701
        - 6702
        - 6703
    #
    #
    # ##### These may optionally be filled in:
    #
    ## List of custom serializations
    # topology.kryo.register:
    #     - org.mycompany.MyType
    #     - org.mycompany.MyType2: org.mycompany.MyType2Serializer
    #
    ## List of custom kryo decorators
    # topology.kryo.decorators:
    #     - org.mycompany.MyDecorator
    #
    ## Locations of the drpc servers
    # drpc.servers:
    #     - "server1"
    #     - "server2"
    
    ## Metrics Consumers
    # topology.metrics.consumer.register:
    #   - class: "backtype.storm.metrics.LoggingMetricsConsumer"
    #     parallelism.hint: 1
    #   - class: "org.mycompany.MyMetricsConsumer"
    #     parallelism.hint: 1
    #     argument:
    #       - endpoint: "metrics-collector.mycompany.org"

    启动 storm nimbus &

    Exception in thread "main" expected '<document start>', but found BlockMappingStart
     in 'reader', line 23, column 2:
         nimbus.host: "master"
         ^
    
            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 backtype.storm.utils.Utils.findAndReadConfigFile(Utils.java:138)
            at backtype.storm.utils.Utils.readStormConfig(Utils.java:178)
            at backtype.storm.config$read_storm_config.invoke(config.clj:116)
            at backtype.storm.command.config_value$_main.invoke(config_value.clj:22)
            at clojure.lang.AFn.applyToHelper(AFn.java:161)
            at clojure.lang.AFn.applyTo(AFn.java:151)
            at backtype.storm.command.config_value.main(Unknown Source)
    Exception in thread "main" expected '<document start>', but found BlockMappingStart
     in 'reader', line 23, column 2:
         nimbus.host: "master"
         ^
    
            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 backtype.storm.utils.Utils.findAndReadConfigFile(Utils.java:138)
            at backtype.storm.utils.Utils.readStormConfig(Utils.java:178)
            at backtype.storm.config$read_storm_config.invoke(config.clj:116)
            at backtype.storm.command.config_value$_main.invoke(config_value.clj:22)
            at clojure.lang.AFn.applyToHelper(AFn.java:161)
            at clojure.lang.AFn.applyTo(AFn.java:151)
            at backtype.storm.command.config_value.main(Unknown Source)
    Running: java -server -Dstorm.options= -Dstorm.home=/home/hadoop/apache-storm-0.9.1-incubating -Djava.library.path= -Dstorm.conf.file= -cp /home/hadoop/apache-storm-0.9.1-incubating/lib/ring-core-1.1.5.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/tools.cli-0.2.2.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/compojure-1.1.3.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/jgrapht-core-0.9.0.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/json-simple-1.1.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/commons-io-1.4.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/objenesis-1.2.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/servlet-api-2.5.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/ring-servlet-0.3.11.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/httpclient-4.1.1.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/clout-1.0.1.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/disruptor-2.10.1.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/commons-fileupload-1.2.1.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/ring-jetty-adapter-0.3.11.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/curator-client-1.0.1.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/netty-3.6.3.Final.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/meat-locker-0.3.1.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/clj-time-0.4.1.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/commons-codec-1.4.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/slf4j-api-1.6.5.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/clojure-1.4.0.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/joda-time-2.0.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/commons-lang-2.5.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/kryo-2.17.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/commons-logging-1.1.1.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/carbonite-1.3.2.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/tools.macro-0.1.0.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/clj-stacktrace-0.2.4.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/log4j-over-slf4j-1.6.6.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/commons-exec-1.1.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/storm-core-0.9.1-incubating.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/jetty-util-6.1.26.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/guava-13.0.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/core.incubator-0.1.0.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/snakeyaml-1.11.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/ring-devel-0.3.11.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/minlog-1.2.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/logback-core-1.0.6.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/servlet-api-2.5-20081211.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/reflectasm-1.07-shaded.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/logback-classic-1.0.6.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/math.numeric-tower-0.0.1.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/hiccup-0.3.6.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/httpcore-4.1.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/asm-4.0.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/zookeeper-3.3.3.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/curator-framework-1.0.1.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/junit-3.8.1.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/jline-2.11.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/tools.logging-0.2.3.jar:/home/hadoop/apache-storm-0.9.1-incubating/lib/jetty-6.1.26.jar:/home/hadoop/apache-storm-0.9.1-incubating/conf -Dlogfile.name=nimbus.log -Dlogback.configurationFile=/home/hadoop/apache-storm-0.9.1-incubating/logback/cluster.xml backtype.storm.daemon.nimbus

    查看报警信息标识是在nimbus的n上,经试验原来是这几个配置名称前需要加空格。即:

    空格nimbus.host: "192.168.1.101"
    空格storm.zookeeper.port: 2181
    空格storm.local.dir: "home/hadoop/storm-0.9.1/data"
    空格supervisor.slots.ports:
     
    大家配置storm.yaml时一定要注意了。少一个空格竟然就启动不了,真是不可思议。
  • 相关阅读:
    Oracle中的substr()函数详解案例
    servlet中通过getWriter()获取out返回给浏览器出现中文乱码问题
    linux系统644、755、777权限详解
    bootstrap select多选
    $(window).on("load",function(){} 和 $(document).ready(function() {}
    bootstrap 鼠标悬停显示
    redis 常用操作
    SpringMVC 集成redis
    linux安装redis-3.0.7
    mysql 外键的几种约束
  • 原文地址:https://www.cnblogs.com/zhaoyan001/p/7910192.html
Copyright © 2020-2023  润新知