[
https://issues.apache.org/jira/browse/ZOOKEEPER-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14483872#comment-14483872
]
Raul Gutierrez Segales commented on ZOOKEEPER-2156:
---------------------------------------------------
Hi [~andreina],
If JAVA_HOME isn't set, we default to whatever is available in $Path. See:
https://github.com/apache/zookeeper/commit/90ef80c0a2593207be5436acf0270c1e160f0c78
Maybe your patch should only error out if JAVA_HOME isn't set *and* there's no
java in the $PATH?
> If JAVA_HOME is not set zk startup and fetching status command execution
> result misleads user.
> ----------------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-2156
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2156
> Project: ZooKeeper
> Issue Type: Bug
> Reporter: J.Andreina
> Assignee: J.Andreina
> Fix For: 3.6.0
>
> Attachments: ZOOKEEPER-2156.1.patch, ZOOKEEPER-2156.2.patch
>
>
> If JAVA_HOME is not set, zk startup and fetching status command execution
> result misleads user.
> 1. Eventhough zk startup has failed since JAVA_HOME is not set , on CLI it
> displays that zk STARTED.
> {noformat}
> #:~/Apr3rd/zookeeper-3.4.6/bin> ./zkServer.sh start
> JMX enabled by default
> Using config: /home/REX/Apr3rd/zookeeper-3.4.6/bin/../conf/zoo.cfg
> Starting zookeeper ... STARTED
> {noformat}
> 2. Fetching zk status when JAVA_HOME is not set displays that process not
> running .
> {noformat}
> #:~/Apr3rd/zookeeper-3.4.6/bin> ./zkServer.sh status
> JMX enabled by default
> Using config: /home/REX/Apr3rd/zookeeper-3.4.6/bin/../conf/zoo.cfg
> Error contacting service. It is probably not running.
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)