Can't add mongodb to PATH variable on windows 7 - windows

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.

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.

Cannot locate jruby during logstash installation

I am learning something about ElasticSearch Stack and I am having a problem installing Logstash on Windows 10 (windows 10 enterprise N OS build 15063.674).
I installed ElasticSearch and Kibana and these are up and running.
I followed the steps on this page to install Logstash:
Step 1: Download and unzip Logstash
downloaded "logstash-5.6.3.zip" file and unzipped it to: "c:\program files\elastic\"
Step 2: Prepare a logstash.conf config file
as described here, I created a "logstash-simple.conf" in the "c:\program files\elastic\logstash-5.6.3>" folder
Step 3: Run bin/logstash -f logstash.conf
at this point I am having the issue (I tried using both cmd and PowerShell with elevated privileges): the result is:
The system cannot find the path specified.
"could not find jruby in C:\Program Files\Elastic\logstash-5.6.3\vendor\jruby"
Of course, the "vendor" folder exists, and there is a "jruby.bat" file inside. I searched the web and I found something about the JRUBY_BIN environment variable but event after the creation (and the additional reboot) the issue still is there.
Can someone address me to the problem?
I have found this solution: https://discuss.elastic.co/t/logstash-does-not-start-says-could-not-find-jruby-in/113500.
You can also try move logstash folder out of program files direct to C, it might help.

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

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.

Docker quickstart terminal not opening

I am new to this Docker world.I have installed Docker toolbox 1.8.2a on my windows machine.It has created desktop icon of docker terminal,Virtual box and Kitematic.
Now when i click on docker quickstart terminal its not opening giving error.
"C:/Program" is not recognised as internal or external operable program or batch file.
all you need to do is put " around your path, i.e. "C:\Program Files\...\...". The space in Program Files isn't automatically detected as belonging together. C:\Program will be evaluated as a prgram call, which will obviously fail.

How to run bcp utility from root drive?

Machine does not have full sql server installed. but following distributable packages are installed on my machine:-
Microsoft® SQL Server® 2008 R2 Command Line Utilities
Microsoft® SQL Server® 2008 R2 Native Client
I have a batch file that runs bcp utility. If i run this batch file from the folder where bcp.exe is sitting (...tools\binn) it works.
but my dump question is if there is any way i can run this bcp utility from c:\ drive only. Right now if it run from c:\ drive it says:-
bcp is not recognized as an internal or external command,...
If you add the directory (...tools\binn) to your PATH variable or use the full path of the bcp executable this will work.
To add a directory to your PATH Control Panel > System > Advanced System Settings > Environment Variables.
Then find the Path Variable under system variables and add your bcp directory to the list (seperated by ;)
Just copy the bcp.exe from the other SQL Server or from respective SQL Server path
and copy it to batch file path, where you have your script.
While running the batch script, also please run from the same path in command line.

Resources