You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "Robert Joseph Evans (JIRA)" <ji...@apache.org> on 2015/03/05 15:46:38 UTC

[jira] [Issue Comment Deleted] (STORM-477) Incorrectly set JAVA_HOME is not detected

     [ https://issues.apache.org/jira/browse/STORM-477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Joseph Evans updated STORM-477:
--------------------------------------
    Comment: was deleted

(was: [~oleg.ost],

The file in question is storm in the bin directory https://github.com/apache/storm/blob/master/bin/storm this file really just sets up the environment to call into java and run the storm code there.  But if JAVA_HOME is set incorrectly, or if the java executable cannot be found we get a really odd error that is hard to debug.  The goal here is to output a user readable error if JAVA_HOME is set incorrectly, and if we can manage it to print out a user readable error if JAVA_HOME is not set and java is not on the path.

One of the key parts of this though is that we want it to run on *NIX and Windows.  So using *NIX specific commands like which will not work, unless you can short circuit it for windows.)

> Incorrectly set JAVA_HOME is not detected
> -----------------------------------------
>
>                 Key: STORM-477
>                 URL: https://issues.apache.org/jira/browse/STORM-477
>             Project: Apache Storm
>          Issue Type: Bug
>    Affects Versions: 0.9.2-incubating
>         Environment: Rhel6
>            Reporter: Paul Poulosky
>            Assignee: Oleg Ostashchuk
>            Priority: Minor
>              Labels: newbie
>
> If JAVA_HOME is incorrectly set in a user's environment when launching storm,   
> it fails with an error message that is confusing to end users.
> Traceback (most recent call last):
>   File "/home/y/bin/storm", line 485, in <module>
>     main()
>   File "/home/y/bin/storm", line 482, in main
>     (COMMANDS.get(COMMAND, unknown_command))(*ARGS)
>   File "/home/y/bin/storm", line 225, in listtopos
>     extrajars=[USER_CONF_DIR, STORM_DIR + "/bin"])
>   File "/home/y/bin/storm", line 153, in exec_storm_class
>     ] + jvmopts + [klass] + list(args)
>   File "/home/y/bin/storm", line 97, in confvalue
>     p = sub.Popen(command, stdout=sub.PIPE)
>   File "/usr/lib64/python2.6/subprocess.py", line 642, in __init__
>     errread, errwrite)
>   File "/usr/lib64/python2.6/subprocess.py", line 1234, in _execute_child
>     raise child_exception
> It would be nice if this were either detected and a proper error message printed, or if it warned and fell back to the java found in PATH.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)