当前位置:   article > 正文

启动zookeeper报Error: JAVA_HOME is not set and java could not be found in PATH错误处理方法

error: java_home is not set and java could not be found in path.

[root@zook_node1 bin]# service zookeeper start
----------zookeeper启动----------
Error: JAVA_HOME is not set and java could not be found in PATH.

在启动zookeeper 会调用到java环境,在zkEnv.sh文件中,有一段代码将检查JAVA_HOME, 配置文件路径和文件zookeeper/bin/zkEnv.sh 环境下进行配置,添加java环境变量:

vi zkEnv.sh

启动查看,成功

[root@zook_node1 bin]# service zookeeper start
----------zookeeper启动----------
ZooKeeper JMX enabled by default
Using config: /home/bigdata/zookeeper/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED

查看启动状态
[root@zook_node1 bin]# service zookeeper status
---------- zookeeper 状态------------
ZooKeeper JMX enabled by default
Using config: /home/bigdata/zookeeper/bin/../conf/zoo.cfg

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/416378
推荐阅读
相关标签
  

闽ICP备14008679号