如何修复 apache 风暴中的错误 java 虚拟机未找到错误?

How to fix error java virtual machine not found error in apache storm?

我正在分布式模式下设置 apache 风暴。我的动物园管理员工作正常。我什至无法启动 apache storm nimbus。

我正在关注:http://chennaihug.org/knowledgebase/storm-multinode-installation/

Zookeeper 配置文件:

tickTime=2000
dataDir=/data/zookeeper
clientPort=2181
initLimit=5
syncLimit=2
server.1=scarlet:2888:3888
server.2=plum:2888:3888
server.3=peacock:2888:3888
server.4=green:2888:3888
server.5=mustard:2888:3888
server.6=white:2888:3888

Storm.yaml:

storm.zookeeper.servers:
     - "scarlet"
     - "plum"
     - "green"
     - "white"
     - "mustard"
     - "peacock"

nimbus.host: "scarlet"
storm.zookeeper.port: 2181
java.library.path: "/usr/lib/jvm/java-8-oracle"
storm.local.dir: "/app/storm"

我开始使用 zookeeper:

/opt/zookeeper-3.4.10/bin/zkCli.sh -server scarlet:2181,plum:2181,peacock:2181,green:2181,mustard:2181,white:2181

检查了动物园管理员的状态。 5 个追随者和 1 个领导者。一切正常。

我使用以下方式启动 apache 风暴:

bin/storm nimbus

它给出错误的地方:

Unrecognized option: -client
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Unrecognized option: -client
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Unrecognized option: -client
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Unrecognized option: -client
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Running: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -server -Ddaemon.name=nimbus -Dstorm.options= -Dstorm.home=/opt/apache-storm-1.2.2 -Dstorm.log.dir= -Djava.library.path= -Dstorm.conf.file= -cp /opt/apache-storm-1.2.2/*:/opt/apache-storm-1.2.2/lib/*:/opt/apache-storm-1.2.2/extlib/*:/opt/apache-storm-1.2.2/extlib-daemon/*:/opt/apache-storm-1.2.2/conf -Dlogfile.name=nimbus.log -DLog4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector -Dlog4j.configurationFile=/opt/apache-storm-1.2.2/cluster.xml org.apache.storm.daemon.nimbus
2019-01-14 17:20:21,591 main ERROR Unable to create file /nimbus.log java.io.IOException: Permission denied

原来是 java 安装问题。清除完整的 openjdk 并重新安装它。

apt purge default-jdk default-jdk-headless openjdk-8-jdk openjdk-8-jdk-headless openjdk-8-jre openjdk-8-jre-headless
apt install openjdk-8-jdk