Author Topic: [SOLVED] Re-Post "mcGateway 0.6-355 broke MQTT"  (Read 173 times)

mcThings

  • We Connect Things To The Internet... That Can't Be Plugged In.
  • Administrator
  • Jr. Member
  • *****
  • Posts: 68
    • View Profile
    • www.mcthings.com
[SOLVED] Re-Post "mcGateway 0.6-355 broke MQTT"
« on: June 06, 2016, 10:58:31 am »
kristofferis2din Support
mcGateway 0.6-355 broke MQTT
0
After the update of my mcGateway from 0.6-354 to 0.6-355 my MQTT broker did not longer receive any beacons and i could not send any messages with Lplan.Publish, i tried several reboots and also deleted in config the MQTT server and added it again but with no success.
I then rolled back to version 0.6-354 and the beacons start working right away and i could also publish with Lplan.Publish.
So something in the 0.6-355 broke MQTT at least for me.
« Last Edit: June 23, 2016, 11:01:02 pm by mc-Abe »

Social Buttons


kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: Re-Post "mcGateway 0.6-355 broke MQTT"
« Reply #1 on: June 07, 2016, 01:53:37 am »
From old forum:

mc-abeAdmin
We enabled use of the DNS server in the configuration of the gateway in version 0.6-355. Do you have a DNS server in there that cannot resolve your MQTT broker name? I explicitly tested the MQTT functionality before releasing version 0.6-355. I will do a test again and see if I have different results.Like

kristofferis
Iam using IP address so there is no issue with DNS, I noticed in the release notes that in 0.6-355 you enabled support for ip address, but that was working in 0.6-354.

mc-Abe

  • Full Member
  • ***
  • Posts: 167
    • View Profile
    • mc-Things
Re: Re-Post "mcGateway 0.6-355 broke MQTT"
« Reply #2 on: June 07, 2016, 09:57:24 am »
V0.6-354 might work depending on your DNS server (which I assume is your router in this case). This version would have erroneously sent a DNS query for the IP address as a domain name and it appears some DNS servers send a response back to that with the IP itself.

Could you look at the logs on your broker to see if a connection is opened to the MQTT broker? There could be a 5 to 10s delay added between opening a connection to the server and actually making an MQTT connection. I wonder if this is causing problems with your broker. I am testing against a cloud hosted mosquitto version 1.4.8 and everything seems to be fine with V0.6-355.

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: Re-Post "mcGateway 0.6-355 broke MQTT"
« Reply #3 on: June 07, 2016, 10:08:10 am »
Thanks for information, I will make some more tests and I am also planning to change to a new MQTT broker, now is a good time to test :)

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: Re-Post "mcGateway 0.6-355 broke MQTT"
« Reply #4 on: June 07, 2016, 12:35:42 pm »
Okey, I have now made some tests. Upgraded the mcGateway to 355 and tested against online mosquitto broker (test.mosquitto.org) did not work. I installed latest mosquitto on a Windows server and same issue here. I installed latest emqtt server and it did not work.
Rolled back to 354 and everything started to work again.

So something does not feel ok with version 355.
It seems that the connection not is established to the broker.

mc-Abe

  • Full Member
  • ***
  • Posts: 167
    • View Profile
    • mc-Things
Re: Re-Post "mcGateway 0.6-355 broke MQTT"
« Reply #5 on: June 07, 2016, 04:05:12 pm »
Just wanted to let you know I am working on this. Trying to figure out what can be going on here. The changes between 354 and 355 were very small. But then again sometimes small changes break things.

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: Re-Post "mcGateway 0.6-355 broke MQTT"
« Reply #6 on: June 07, 2016, 04:10:53 pm »
Let me know if I could help in any way. I could make my broker available for you if you want to test against the latest mosquitto for Windows broker.
Or if you have any other ideas, I will test it, no problem.

mc-Abe

  • Full Member
  • ***
  • Posts: 167
    • View Profile
    • mc-Things
Re: Re-Post "mcGateway 0.6-355 broke MQTT"
« Reply #7 on: June 07, 2016, 04:12:26 pm »
That sounds great! My broker seems to work fine. I am using cloudmqtt.com and it is using mosquitto as the actual broker. If you don't mind making your broker available, I can test against it.

Artanicus

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Re-Post "mcGateway 0.6-355 broke MQTT"
« Reply #8 on: June 07, 2016, 04:48:05 pm »
I can confirm that against my own Mosquitto it seems the connection never happens.

mosquitto version 1.4.8 (build date Fri, 19 Feb 2016 12:03:16 +0100)

I'll priv message test server details.

mc-Abe

  • Full Member
  • ***
  • Posts: 167
    • View Profile
    • mc-Things
Re: Re-Post "mcGateway 0.6-355 broke MQTT"
« Reply #9 on: June 07, 2016, 05:23:36 pm »
Thanks guys for providing your test servers. I have found the cause of this problem. Since you have no authentication setup, I assume you didn't have a username or password set for you MQTT configuration. The gateway is erroneously considering this an invalid configuration and not moving forward with connecting to the MQTT broker. I will address this in the next version but for now just enter a dummy username and password and you should be able to move forward.
Like Like x 1 Useful Useful x 1 View List

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: Re-Post "mcGateway 0.6-355 broke MQTT"
« Reply #10 on: June 07, 2016, 05:59:33 pm »
Perfect, great work  :)

mc-Abe

  • Full Member
  • ***
  • Posts: 167
    • View Profile
    • mc-Things
Re: Re-Post "mcGateway 0.6-355 broke MQTT"
« Reply #11 on: June 17, 2016, 08:53:53 pm »
This issue has been resolved in v0.6-356 of the gateway. The firmware now allows for non-authenticated connections to a MQTT broker.

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: Re-Post "mcGateway 0.6-355 broke MQTT"
« Reply #12 on: June 18, 2016, 02:46:22 am »
Verified and working, great work.