mosquitto (on windows) command not found

avelampudi picture avelampudi · May 29, 2015 · Viewed 9.7k times · Source

I'm a newbie to MQTT and mosquitto. I recently installed mosquitto on my Windows OS using the Windows binary installation file on the website (http://www.eclipse.org/downloads/download.php?file=/mosquitto/binary/win32/mosquitto-1.4.2-install-win32.exe).

However, when I try to run the mosquitto commands, it displays an error saying that the command is not found. Upon Googling this, I found the same instructions to download the binary installation.

Even when I open the mosquitto folder saved in my Program Files and try to run the broker application, the window opens for a split second and then shuts off. I also have HiveMQ downloaded. Could that be the issue?

I cannot understand what I might have done wrong during the installation otherwise. Please help!

Answer

ralight picture ralight · May 29, 2015

None of mosquitto, mosquitto_pub nor mosquitto_pub are gui programs. You will need to run them through cmd.exe or powershell or similar. So for example:

run cmd.exe
cd <path to executables>
mosquitto_sub -h test.mosquitto.org -t '#'

On the "command not found" error, did you follow the instructions in the installer for installing dependencies?