Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mosquitto » Newbee queston: unable to connect to broker using ip address.(Unable to connect to broker on local PC if uising NIC ip, no firewall.)
Newbee queston: unable to connect to broker using ip address. [message #1851257] Thu, 31 March 2022 20:10 Go to next message
John Gijs is currently offline John GijsFriend
Messages: 2
Registered: March 2022
Junior Member
Hello,

I am able to run the mosquitto_pub & mosquitto_sub examples as presented in the mosquitto.org/download page.

However all other ways to connect using IP addresses or via my Arduino PUB SUB lib fail.

Q1: Is there somewhere a "getting started" manual that explains the required steps to get the software operational in a windows environment? (including firewal & .conf) settings? (prevent newbee questions as mine :))

Q2: What could be the cause of failure connection in the following setup:
- config file:
listener 1883
allow_anonymous

mosquitto_pub -t 'test/topic' -m "hello world" => works properly.
mosquitto_pub -t 'test/topic' -m "hello world" -h 192.168.0.237 => works not.
mosquitto_pub -t 'test/topic' -m "hello world" -h '192.168.0.237' => works not.
mosquitto_pub -t 'test/topic' -m "hello world" -h "192.168.0.237" => works not.

(ip 192.168.0.237 is my ip, firewall is off)
Best regards,
Johi.




Re: Newbee queston: unable to connect to broker using ip address. [message #1851316 is a reply to message #1851257] Sat, 02 April 2022 06:56 Go to previous messageGo to next message
John Gijs is currently offline John GijsFriend
Messages: 2
Registered: March 2022
Junior Member
Found the solution.
Mosquitto is not binding to NIC IP unless you specify
listener 1883
allow_anonymous true

In the configuration file
On top you need to start
Mosquitto -c config_file -v

-v is the verbose mode.
I hope this can help others trying to get mosquitto up and running.

[Updated on: Sat, 02 April 2022 06:57]

Report message to a moderator

Re: Newbee queston: unable to connect to broker using ip address. [message #1851661 is a reply to message #1851316] Tue, 12 April 2022 06:57 Go to previous message
Rahul Soni is currently offline Rahul SoniFriend
Messages: 1
Registered: April 2022
Junior Member
Hello, I have been using mosquitto from 7 years, It always worked . I used same installation and configuration process, applied above fix also yet I am unable to connect remotely. with localhost I can always connect.

I have opened firwall, tried re-installing os and mosquitto several times and spent a couple of hours before giving up.

I am now certain that there is something wrong with the version installing with apt-get.
Previous Topic:Mosquitto Broker Windows Service Does not start after configuring for TLS/SSL
Next Topic:Bridge connection to remote broker fails and doesn't try to reconnect
Goto Forum:
  


Current Time: Thu Apr 25 16:12:33 GMT 2024

Powered by FUDForum. Page generated in 0.03487 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top