Skip to main content
1-Visitor
November 22, 2016
Solved

MQTT connection Issue

  • November 22, 2016
  • 4 replies
  • 5485 views

I have created two MQTT things. I have connected both to a public MQBroker -say Mosquito. Some times only one "thing" connection is true, the other "thing" gets disconnected. This happens often. Is there any issue in using same broker/servername for two mqtt thing.

Best answer by drichter

I have the same "Persistence already in use"-problem. I found only two very dirty way to fix that.

  1. Copy the thing that make problems and rename it.
  2. Delete the ValueStream and create a new one.

4 replies

5-Regular Member
November 23, 2016

Hi Anitha Am,

Is there any error received in the logs when one of the thing gets disconnected? And does the thing is in edit mode when it gets disconnected?

aam1-VisitorAuthor
1-Visitor
December 6, 2016

Yes Ankit. I am trying to set a property with a json string '[{"id": "DP2.wer.ias_Start","v": 0}]' in the data change event of  a property using subscription. When event gets triggered a lck file is generated in  Tom Cat log for the thing. Thingworx doesnt allows to update the thing. So I need tomcat to be restarted. The same property assignation works well on a button click.

aam1-VisitorAuthor
1-Visitor
December 6, 2016

Ignore the previous answer. Persistence already in use was the error received in Application log.

drichter1-VisitorAnswer
1-Visitor
July 25, 2017

I have the same "Persistence already in use"-problem. I found only two very dirty way to fix that.

  1. Copy the thing that make problems and rename it.
  2. Delete the ValueStream and create a new one.
1-Visitor
August 6, 2018

I am trying to implement MQTT using the extension but in my MQTT thing template the "isConnected" never turn "True" it's always "False". I have changed the MQTT servers as well as used the local MQTT server but the issue remains.