Mosquitto Error

僤鯓⒐⒋嵵緔 提交于 2019-12-12 04:03:59

问题


I am using Mosquitto for my project. I have installed mosquitto-1.4.8-install-win32.exe and also place the three binary in folder 1. pthreadVC2.dll 2. libeay32.dll 3. ssleay32.dll

And reinstalled the mosquitto after that Started the services for mosquitto broker I entered following commands in cmd

*C:\Users\ravindra-s>netstat -an
Active Connections
  Proto  Local Address          Foreign Address        State
  ...
  TCP    0.0.0.0:912            0.0.0.0:0              LISTENING
  TCP    0.0.0.0:1883           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:2701           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:3306           0.0.0.0:0              LISTENING
  ...
  TCP    [::]:135               [::]:0                 LISTENING
  TCP    [::]:445               [::]:0                 LISTENING
  TCP    [::]:1883              [::]:0                 LISTENING
  TCP    [::]:2701              [::]:0                 LISTENING
 ...
C:\Users\ravindra-s>cd "c:\Program Files"
c:\Program Files>cd mosquitto
c:\Program Files\mosquitto>mosquitto -v
1455619440: mosquitto version 1.4.8 (build date 14/02/2016 15:33:31.09) starting
1455619440: Using default config.
1455619440: Opening ipv6 listen socket on port 1883.
1455619440: Error: Unknown error*

It doesn't show that "Opening ipv4 listen socket on port 1883." and shows error now. Previously my system does not show this error. but Now it is showing and my application is not running properly.

Please tell me to resolve this issue.

Any Help appreciated .

Thanks and Regards, Ravindra


回答1:


Looks like you already have mosquitto broker running and it's failing to open the ports (beacause they are already open).

Those lines shows that the 1883 (mqtt port) is already open...

 TCP    0.0.0.0:1883           0.0.0.0:0              LISTENING
 TCP    [::]:1883              [::]:0                 LISTENING



回答2:


It may be due to windows running services of mosquitto.

First Stop mosquitto from windows services list

1.Press the Windows+R keys to open the Run dialog, type services.msc, press Enter

2.Search for mosquitto broker service

3.Stop the service

Now enter cmd as usual c:\Program Files\mosquitto>mosquitto -v This will Opening ipv6 listen socket on port 1883.

as below

1455619440: Using default config.

1455619440: Opening ipv6 listen socket on port 1883.

1455619440: Opening ipv6 listen socket on port 1883.

Hope this will help you.



来源:https://stackoverflow.com/questions/35430815/mosquitto-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!