This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

MQTT Port ( 1883 ) is always closed
#1
Hi,
We have 2 Logic Machine. Both of them same firmware. Same project. Same MQTT scripts. Same MQTT settings ( without encryption and anonymous connection ).
One of them 192.168.1.80 other 192.168.1.81 ip address.
I can communicate via MQTT Explorer with 81 address. But i cannot communicate with 80 address.
I scan with advanced port scanner. 
LM with IP Add 81 has http and 1883 port those are open.
LM with IP Add 80 has only http port. 1883 is not open.
I disabled and enabled and save everytime Enable MQTT broker without encryption setting.
I unistalled and installed MQTT Broker App. 
But everytime  1883 port looks closed in 192.168.1.80 LM

How can i open 1883 port , what can i do ?
Reply
#2
MQTT with encryption use 8883 port
------------------------------
Ctrl+F5
Reply
#3
8883 and encrypton is not working also. 8883 is closed. 1883 and 8883 is both close. I cannot open anyhow
Reply
#4
Hey guys, what's new here, we also use controllers where port 8883 doesn't work to the outside. How can this be resolved?
Reply
#5
Run this script and post what you get in logs:
Code:
res = io.readproc('netstat -pln | grep mosquitto')
log(res)

res = io.readfile('/tmp/mosquitto.conf')
log(res)
Reply
#6
I think I might experience the same issue here.

I was using 2 LM5's with an external MQTT broker, using the client scripts that circulate in this forum. This works just fine.

Now, I wanted to use one of the devices as a broker. So I've installed the broker app and the config page appears do do what it's supposed to, but the broker is actually never started. The "mosquitto -d -c /tmp/mosquitto.conf" command is never executed. I tried just about everything, including rebooting, factory resetting, updating to the latest firmware, re-injecting the firmware and so on. I even tried to use the broker on the second LM5, and the results were identical: The broker isn't started, no ports are opened. These devices both run the 20211215 firmware, which is the latest if I'm not mistaking.

The system log on both devices gives me a hint of what's wrong: "LogicMachine user.info sysinit: chown: unknown user mosquitto". 

Now for the kicker: I tried it on a third device, exactly the same firmware and type of device... and that one actually does work. The only meaningful difference I can think of, is that this device never ran the MQTT client scripts. I checked all of the installed package versions between the devices, and there is no difference whatsoever.

I would really appreciate your help on this.

Thanks in Advance!

Greets,

Cedric


Just to be complete, even though the results are as expected, the output of the suggested commands:

netstat output: * string: 
mosquitto.conf: * string: allow_anonymous true
password_file /tmp/mosquitto.users
sys_interval 0
user mosquitto
listener 1883
listener 8883
certfile /tmp/mosquitto.crt
keyfile /tmp/mosquitto.key
skip_ca true
Reply
#7
Install these updated packages (System config > System > Packages > Add (+) button) and see if they work for you:
https://dl.openrb.com/pkg/libmosquitto_2...2_imx6.ipk
https://dl.openrb.com/pkg/mosquitto_2.0.14-2_imx6.ipk
Reply
#8
(01.07.2022, 10:57).admin Wrote: Run this script and post what you get in logs:
Code:
res = io.readproc('netstat -pln | grep mosquitto')
log(res)

res = io.readfile('/tmp/mosquitto.conf')
log(res)

There is no difference if port 8883 is opened or closed. I checked with telnet ... 8883
Code:
check_MQTT 06.07.2022 09:02:01
* string:
check_MQTT 06.07.2022 09:02:01
* nil


Installation of the packages mosquitto_2.0.14-2_imx6.ipk and libmosquitto_2.0.14-2_imx6.ipk is not successfull. Checked with lm5m3ex-20180828.img
Reply
#9
These packages are for 2021.12 firmware. It might not work on older firmwares.
Reply
#10
(04.07.2022, 07:51)admin Wrote: Install these updated packages (System config > System > Packages > Add (+) button) and see if they work for you:
https://dl.openrb.com/pkg/libmosquitto_2...2_imx6.ipk
https://dl.openrb.com/pkg/mosquitto_2.0.14-2_imx6.ipk

This did the trick for me, MQTT broker seems to be running fine now. I also tested multiple clients including the internal LM scripts, this works.

Thanks a lot, you made my day  Big Grin
Reply


Forum Jump: