java - Apache Storm 安装 OS X 中的 ExceptionInInitializerError

标签 java macos apache-storm macos-high-sierra

我尝试在 high Sierra 的 Mac 操作系统中安装 Apache Storm,并遵循教程。我按照文章中的步骤操作,下面提供了步骤,

i.  Install Zookeeper using the brew 

    $ brew install zookeeper

 To have launched start zookeeper now and restart at login:

    $ brew services start zookeeper

 If you don't want/need a background service you can just run:

    $ zkServer start

 Zookeeper installation directory, /usr/local/Cellar/zookeeper/3.4.12


 ii. Install ZeroMQ using the brew

    $ brew install zeromq 

 ZeroMQ installation directory, /usr/local/Cellar/zeromq/4.2.5


 iii. Install Apache storm using the brew

    $ brew install storm

 Storm installation directory, /usr/local/Cellar/storm/1.2.2 and will have a symlink in ‘/usr/local/opt/storm’ 
 folder.


 iv. Update the storm config file storm.yaml located in the /usr/local/opt/storm/libexec/conf folder. After 
 opening this file add the following:

     storm.zookeeper.servers: – “localhost” # – “server2” # nimbus.host: “localhost” nimbus.thrift.port: 6627 
     ui.port: 8772 storm.local.dir: “/Users/chaklader/storm/data” java.library.path: /usr/lib/jvm” 
     supervisor.slots.ports: – 6700 – 6701 – 6702 – 6703

 v. Start zookeeper, nimbus, supervisor and UI in the given sequence,


        $ zkServer start

        $ /usr/local/opt/storm/libexec/bin/storm nimbus 

        $ /usr/local/opt/storm/libexec/bin/storm supervisor 

        $ /usr/local/opt/storm/libexec/bin/storm ui



 When I run the second command (for the nimbus), I get the following error message, 


$ /usr/local/opt/storm/libexec/bin/storm nimbus


Exception in thread "main" java.lang.ExceptionInInitializerError
    at org.apache.storm.config$read_storm_config.invoke(config.clj:78)
    at org.apache.storm.config$fn__906.invoke(config.clj:100)
    at org.apache.storm.config__init.load(Unknown Source)
    at org.apache.storm.config__init.<clinit>(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at clojure.lang.RT.classForName(RT.java:2154)
    at clojure.lang.RT.classForName(RT.java:2163)
    at clojure.lang.RT.loadClassForName(RT.java:2182)
    at clojure.lang.RT.load(RT.java:436)
    at clojure.lang.RT.load(RT.java:412)
    at clojure.core$load$fn__5448.invoke(core.clj:5866)
    at clojure.core$load.doInvoke(core.clj:5865)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:5671)
    at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
    at clojure.core$load_lib.doInvoke(core.clj:5710)
    at clojure.lang.RestFn.applyTo(RestFn.java:142)
    at clojure.core$apply.invoke(core.clj:632)
    at clojure.core$load_libs.doInvoke(core.clj:5753)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:634)
    at clojure.core$use.doInvoke(core.clj:5843)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at org.apache.storm.command.config_value$loading__5340__auto____12530.invoke(config_value.clj:16)
    at org.apache.storm.command.config_value__init.load(Unknown Source)
    at org.apache.storm.command.config_value__init.<clinit>(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at clojure.lang.RT.classForName(RT.java:2154)
    at clojure.lang.RT.classForName(RT.java:2163)
    at clojure.lang.RT.loadClassForName(RT.java:2182)
    at clojure.lang.RT.load(RT.java:436)
    at clojure.lang.RT.load(RT.java:412)
    at clojure.core$load$fn__5448.invoke(core.clj:5866)
    at clojure.core$load.doInvoke(core.clj:5865)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.lang.Var.invoke(Var.java:379)
    at org.apache.storm.command.config_value.<clinit>(Unknown Source)
Caused by: mapping values are not allowed here
 in 'reader', line 111, column 30:
    ui.port: 8772 storm.local.dir: “/Users/chaklader/storm/data”  ... 
                                 ^

    at org.apache.storm.shade.org.yaml.snakeyaml.scanner.ScannerImpl.fetchValue(ScannerImpl.java:866)
    at org.apache.storm.shade.org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:360)
    at org.apache.storm.shade.org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:226)
    at org.apache.storm.shade.org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:558)
    at org.apache.storm.shade.org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158)
    at org.apache.storm.shade.org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:143)
    at org.apache.storm.shade.org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
    at org.apache.storm.shade.org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:159)
    at org.apache.storm.shade.org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122)
    at org.apache.storm.shade.org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
    at org.apache.storm.shade.org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:120)
    at org.apache.storm.shade.org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:481)
    at org.apache.storm.shade.org.yaml.snakeyaml.Yaml.load(Yaml.java:424)
    at org.apache.storm.utils.Utils.findAndReadConfigFile(Utils.java:367)
    at org.apache.storm.utils.Utils.readStormConfig(Utils.java:468)
    at org.apache.storm.utils.Utils.<clinit>(Utils.java:178)
    ... 39 more

下面提供了更多错误输出,

Running: /Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home/bin/java -server -Ddaemon.name=nimbus -Dstorm.options= -Dstorm.home=/usr/local/Cellar/storm/1.2.2/libexec -Dstorm.log.dir= -Djava.library.path= -Dstorm.conf.file= -cp /usr/local/Cellar/storm/1.2.2/libexec/*:/usr/local/Cellar/storm/1.2.2/libexec/lib/*:/usr/local/Cellar/storm/1.2.2/libexec/extlib/*:/usr/local/Cellar/storm/1.2.2/libexec/extlib-daemon/*:/usr/local/opt/storm/libexec/conf -Dlogfile.name=nimbus.log -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dlog4j.configurationFile=/usr/local/Cellar/storm/1.2.2/libexec/cluster.xml org.apache.storm.daemon.nimbus
    ERROR StatusLogger File not found in file system or classpath: /usr/local/Cellar/storm/1.2.2/libexec/cluster.xml
    ERROR StatusLogger Reconfiguration failed: No configuration found for 'AsyncContext@45ee12a7' at 'null' in 'null'

我阅读了错误消息,但没有任何经验,很难找到演练。这里有什么问题?

顺便说一句,该位置没有文件夹,storm.local.dir:“/Users/chaklader/storm/data”。我是否需要创建它并提供 chmod -R 777 权限?

最佳答案

看看异常,它就指出了问题

Caused by: mapping values are not allowed here
 in 'reader', line 111, column 30:
    ui.port: 8772 storm.local.dir: “/Users/chaklader/storm/data”  ... 
                                 ^

我认为您对链接文章的格式感到困惑

配置文件应该是有效的 YAML 语法

尝试

storm.zookeeper.servers: 
    - "localhost"
    # – "server2"
# nimbus.host: "localhost" 
nimbus.thrift.port: 6627 
ui.port: 8772 
storm.local.dir: "/Users/chaklader/storm/data" 
java.library.path: /usr/lib/jvm
supervisor.slots.ports: 
    - 6700
    - 6701
    - 6702
    - 6703

Btw, There is no folder in the location, storm.local.dir

数据目录不必是 User 文件夹,但如果您确实希望将数据放入其中,请确保 User 目录是您的用户,而不是从随机博客复制

关于java - Apache Storm 安装 OS X 中的 ExceptionInInitializerError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51909621/

相关文章:

java - 如何在进行异步 RPC 时调用 GWT 方法

java - Spring Security 注销未命中 success-handler-ref

macos - 为什么我的应用程序将二进制文件标记为隔离?

python - 如何从 Python 将 "dot"作为命令运行?

apache-storm - Apache Storm : Topology submission exception: [x] subscribes from non-existent stream

apache-storm - Storm 场分组

java - Storm 攻击和失败

java - 如何转换/日期(-6847824600000+0530)/到日期时间

java - 如何在网页上设置数值和按下按钮?

ios - ld : library not found for -lstdc++. 6