Apache pig on windows gives "hadoop-config.cmd' is not recognized as an internal or external command" error when running "pig -x local" - windows

If you are stuck at running Apache Pig on windows due to an error like
hadoop-2.4.0\bin\hadoop-config.cmd' is not recognized as an internal or external command,
operable program or batch file.
though you are having Hadoop running perfectly on windows

Answer, which was originally added by the asker inside the quesiton.
These steps may help you.
Troubleshooting steps
open the file pig.cmd in any editor like notpad / notepad++
look for the line set HADOOP_BIN_PATH=%HADOOP_HOME%\bin
replace this with set HADOOP_BIN_PATH=%HADOOP_HOME%\libexec
What we did was that hadoop-config.cmd file was not being found by pig so we pointed it with the correct one. You may first find where the hadoop-config.cmd file is and replace it with appropriate path. This was what my hadoop-2.4.0 was having.

Related

" 'hdfs' is not recognized as an internal or external command, operable program or batch file"

I am on the final stage of installing hadoop and when I try to run the commands this error occurs. Can anyone help me solve this?
This is a Windows error that indicates your PATH doesn't properly have %HADOOP_HOME%\bin defined
Personally, my recommendation is to always use Linux environments for Hadoop since this is almost always what it'll be if you used it for a job.

"Error 7: Hardlock not found" when starting CANape from command line via Jenkins

Trying to launch Vector CANape via the command line canape32 command, and it works perfectly in the windows command prompt. When attempting to run a windows batch command in our Jenkins multibranch pipeline to do the same thing, it successfully loads the remote client DLL file and then gets stops on "Error 7: Hardlock not found." This error persists in a freestyle project as well, any clues as to what the difference in the environments is? I would expect since it runs the canape32 command just like in the regular command prompt it would work just fine, but I must be missing something.
This is a due to Jenkins redirecting the consule output. When using Vector's ASAP2 Toolset instead of CANape to generate A2L files you can disable the output via the INI files so this doesn't occur.

Can't add mongodb to PATH variable on windows 7

I tried to add the mongodb programs on my windows 7 latop to run a few programs I'm working on.
I added the mongodb path to the end of windows PATH variable in system properties / advanced. This is what I have:
C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\RSA SecurID Token Common;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Dell\Dell Data Protection\Encryption\;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\tdunphy\bin;C:\Python27;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%systemroot%\System32\WindowsPowerShell\v1.0\;C:\Python27\Scripts;C:\Users\tdunphy\bin\;C:\HashiCorp\Vagrant\bin;C:\Program Files (x86)\Skype\Phone;C:\Program Files\MongoDB\Server\3.4\bin
And when I try to run the mongo programs, this is what I get:
mongod' is not recognized as an internal or external command,
operable program or batch file.
mongo
'mongo' is not recognized as an internal or external command,
operable program or batch file.
What am I doing wrong?
I was facing the same situation moments ago. What I did was backup my PATH variable and put only the MongoDB path there. Restarted CLI and it worked. Then I added the deleted paths. Don't know why this worked.
By the way, 'mongodb' will not work, it's mongo or mongod depending what you want to call.

Windows Script Host JScript Scripting Engine Difficulty

I am attempting to run a JScript script using Windows Script Host 5.8 on a 32-bit Windows 7 PC. This script is part of a larger build effort for an open source software project, where an ActiveXObject is being created as part of the script. This has failed to run, but I suspect that the specific script is not at fault, but rather my local Windows Scripting Host (WSH) setup.
I have inferred this based on the following 'bare bones' tests that I have run with a one line test script:
I prepare a script using Notepad which is saved as 'test.js' and contains the following line:
var strLit = "This is a string literal.";
I then execute the above script using the following command:
cscript /e:jscript test.js
This seems to run successfully, of course returning no output, but critically no error message.
I then change the script to contain just the following line:
print("Hello World!");
When run with the same command as above, the following error message is received:
Microsoft JScript runtime error: Object expected
I then change the script to contain just the following line:
var fso = new ActiveXObject("Scripting.FileSystemObject");
When run with the same command as above, the following error message is received:
Microsoft JScript runtime error: Automation server can't create object
It is this third version of the script that contains the line failing in the open source software script mentioned above. However, based on the creation of a string variable script succeeding, I would infer that WSH is to some extent functioning. However, the fact that the 'hello world' script has failed, as well as the failure of the ActiveXObject would indicate that WSH with the JScript engine may not be correctly set-up on my computer or otherwise functioning.
I would also infer that this likely has nothing to do with Internet Explorer security levels due to this script being run from the command line with no link to Internet Explorer.
I have done the following to try to resolve this problem:
Ensured that Windows associates files with extension '.js' with WSH, although by using the '/e:' switch when calling the script as above, this is not an issue anyway.
Re-registered scripting components on my computer using an administrator elevated command prompt with the following commands:
regsvr32 %systemroot%\system32\vbscript.dll
regsvr32 %systemroot%\system32\jscript.dll
regsvr32 %systemroot%\system32\dispex.dll
regsvr32 %systemroot%\system32\scrobj.dll
regsvr32 %systemroot%\system32\scrrun.dll
regsvr32 %systemroot%\system32\wshext.dll
regsvr32 %systemroot%\system32\wshom.ocx
All of the above commands work successfully, except for the last two, where the following errors are received:
The module "C:\Windows\system32\wshext.dll" was loaded but the call to DllRegisterServer failed with error code 0x80040201
The module "C:\Windows\system32\wshom.ocx" was loaded but the call to DllRegisterServer failed with error code 0x80040201
Attemped to run the script with my virus protection (F-Secure) completely disabled and there being no internet connection.
I would infer the following from the tests above:
Script one: This is a simple script declaring and initializing a variable and doing nothing else, meaning that it is no surprise that it should run and perhaps confirms that the JScript engine is at least present and working fundamentally.
Script two: This is again a simple script but that may make use of additional functionality (I. e. 'print').
Script three: This is a simple script, but seeks to create an object of a specific type, by means of recourse to an application (identified as 'Scripting') to achieve this. This 'Scripting' application is supplied as a parameter when creating a new ActiveXObject which in the Microsoft JScript reference is identified as a 'servername'. Generically, the 'servername' is defined by the Microsoft JScript reference in this context as being 'the name of the application providing the object'. I note that the error message for script three makes reference to an 'automation server' and therefore wonder if there is a link here.
Would anybody have any ideas as to what may be the problem here, specifically with script three? The error message in script three above has been widely discussed online in the context of Internet Explorer security levels, but due to this being a script run on the command line, I cannot see how this solution would relate this problem.
Any ideas would be much appreciated.
Thanks
Jason

Beginner GWAS topic: virtual box command line can't find .ped file?

I am new to GWAS analysis and I've been trying to run the PLINK tutorial sample datasets (hapmap 80K loci) on gPLINK to do some exclusions. I am currently working on a Mac OSX 10.10. I've applied the threshold settings (high missing rate, low MAF etc.) to my file "hapmap1.ped" and prepared to execute the command through gPLINK, however it keeps giving me the error prompt "can not execute command locally".
Is there something wrong with my library or directory settings?
gPlink runs in two modes a remote mode and a local one. It seems you are running the local one. Please check if you are specifying the correct path where PLINK is installed when cofiguring gPlink. For more details refer to gPlink configuration

Resources