mosquitto (on windows) command not found

11,835

Solution 1

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?

Solution 2

As per the readme-windows.txt file (found under the installation director), the dependencies (OpenSSL abd Pthread) are not provided with the installer and needs to be installed separately:

  • libeay32.dll ssleay32.dll from open ssl (Download the OpenSSL from here and copy/paste these two dlls under mosquitto installation director)
  • pthreadVC2.dll (download the dll from here and paste under mosquitto installation director)

Solution 3

do not install win64openSSL, even you do have 64bit OS :) as far as mosquitto is 32bit app, it will work with Win32OpenSSL only ...

Share:
11,835
avelampudi
Author by

avelampudi

Updated on June 04, 2022

Comments

  • avelampudi
    avelampudi about 2 years

    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!

  • avelampudi
    avelampudi about 9 years
    Thank you! I'd not copied all the dlls properly.
  • saurabh kamble
    saurabh kamble over 8 years
    @ralight i am getting this error followed your steps , the ordinal 314 could not be located in the dynamic link library mosquitto
  • ralight
    ralight over 8 years
    Make sure you have all of the most up to date libraries and that you have the Visual Studio 2013 redistributables installed.
  • SteckDEV
    SteckDEV over 7 years
    Make sure you use the Win32OpenSSL_Light-1_0_2j.exe otherwise it will not contain: libeay32.dll ssleay32.dll Step 8: sivatechworld.wordpress.com/2015/06/11/…