I try to install the Apache Storm in the Mac OS run of high Sierra
and was following a tutorial. I follow the steps from an article and The steps are provided below,
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
There some more error output provided below,
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'
I read the error message but not having any experience, it's hard to find a walkthrough. What's the issue here?
Btw, There is no folder in the location, storm.local.dir: “/Users/chaklader/storm/data”
. Do I need to create that and provide chmod -R 777
permission?
Looking at the exception, it points right at the problem
Caused by: mapping values are not allowed here
in 'reader', line 111, column 30:
ui.port: 8772 storm.local.dir: “/Users/chaklader/storm/data” ...
^
I think you're confused about the formatting of the linked article
The config file should be valid YAML syntax
Try
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
The data directory does not need to be a User folder, but make sure that User directory is your user, not copied from a random blog, if you did want data to go there