New Contributor
Posts: 1
Registered: ‎03-20-2019

Flume cannot find teh flume-ng.ps1 file

I am new to Hadoop and Flume and I am trying to set up my environments and fetch data from twitter using flume. But I am stuck at a place and have no idea what can be done about this.


This is what I did on my terminal-


C:\apache-flume-1.9.0-bin\bin>flume-ng agent -c C:\apache-flume-1.9.0-bin\conf -f C:\apache-flume-1.9.0-bin\conf\flume.conf -n TwitterAgent


 And here is teh response from the system-


C:\apache-flume-1.9.0-bin\bin>powershell.exe -NoProfile -InputFormat none -ExecutionPolicy unrestricted -File C:\apache-flume-1.9.0-bin\bin\flume-ng.ps1 agent -c C:\apache-flume-1.9.0-bin\conf -f C:\apache-flume-1.9.0-bin\conf\flume.conf -n TwitterAgent

WARN: Config directory not set. Defaulting to C:\apache-flume-1.9.0-bin\conf
Sourcing environment configuration script C:\apache-flume-1.9.0-bin\conf\flume-env.ps1
Including Hadoop libraries found in (C:\Hadoop-2.8.0) for DFS access
WARN: HBASE_HOME not found
WARN: HIVE_HOME not found

Running FLUME agent :
class: org.apache.flume.node.Application
arguments: -n TwitterAgent -f "C:\apache-flume-1.9.0-bin\conf\flume.conf"


This is the error that was shown-


Start-Process : This command cannot be run due to the error: The system cannot find the file specified.
At C:\apache-flume-1.9.0-bin\bin\flume-ng.ps1:189 char:10
+ $x = Start-Process $javaPath -ArgumentList "$fullJavaCommand" -Wa ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand


Can someone please help me regarding the error

Posts: 1,886
Kudos: 425
Solutions: 300
Registered: ‎07-31-2013

Re: Flume cannot find teh flume-ng.ps1 file

Flume scripts need to be run under a Bash shell environment, but it appears
that you are trying PowerShell in Windows.
New solutions