You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "BELUGA BEHR (JIRA)" <ji...@apache.org> on 2015/11/23 21:26:10 UTC
[jira] [Created] (FLUME-2843) Improve Error Message For Windows
Command Line
BELUGA BEHR created FLUME-2843:
----------------------------------
Summary: Improve Error Message For Windows Command Line
Key: FLUME-2843
URL: https://issues.apache.org/jira/browse/FLUME-2843
Project: Flume
Issue Type: Improvement
Components: Windows
Affects Versions: v1.6.0
Reporter: BELUGA BEHR
Priority: Minor
Hello,
I am a first time FLUME user and I was immediately tripped up, out of the gate, trying to setup the simple tutorial test environment.
{code:title=Cmd|borderStyle=solid}
F:\hadoop\flume\apache-flume-1.6.0\bin>set JAVA_HOME="C:\Program Files\Java\jdk1.8.0_45\jre"
F:\hadoop\flume\apache-flume-1.6.0\bin>flume-ng.cmd agent -conf f:/hadoop/flume/apache-flume-1.6.0/conf --conf-file ../conf/flume-conf.properties.template --name agent
F:\hadoop\flume\apache-flume-1.6.0\bin>powershell.exe -NoProfile -InputFormat none -ExecutionPolicy unrestricted -File F:\hadoop\flume\apache-flume-1.6.0\bin\flume-ng.ps1 agent -conf f:/hadoop/flume/apache-flume-1.6.0/conf --conf-file ../conf/flume-conf.properties.template --name agent
Sourcing environment configuration script f:/hadoop/flume/apache-flume-1.6.0/conf\flume-env.ps1
WARN: HADOOP_PREFIX or HADOOP_HOME not found
WARN: HADOOP_PREFIX not set. Unable to include Hadoop's classpath & java.library.path
WARN: HBASE_HOME not found
WARN: HIVE_HOME not found
Running FLUME agent :
class: org.apache.flume.node.Application
arguments: -n agent -f "F:\hadoop\flume\apache-flume-1.6.0\conf\flume-conf.properties.template"
Start-Process : This command cannot be executed due to the error: The parameter is incorrect.
At F:\hadoop\flume\apache-flume-1.6.0\bin\flume-ng.ps1:189 char:23
+ $x = Start-Process <<<< $javaPath -ArgumentList "$fullJavaCommand" -Wait -NoNewWindow
+ CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
F:\hadoop\flume\apache-flume-1.6.0\bin>
{code}
Did you catch the problem there? No? Neither did I at first. The error message is pretty cryptic and I thought it was complaining about the "StartProcess" command specifically.
The problem is that I included double-quotes around my JAVA_HOME path value. The double-quotes are erroneously inserted literally onto the command line and the Java executable file path stored in "$javaPath" understandably cannot be found on the local file system. I was finally able to diagnose with a dry-run where I could visually inspect the javaPath variable.
Can you please add JAVA_HOME to list of environment variables presented onto the screen at startup?
Can you please add a "file exists and is executable" check in the batch script? If the java executable cannot be found, simply print a nice error messages stating the problem and the value of "$javaPath"
Thanks!
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)