MQTT server drops connection after subscribe | ThingSpeak API | Forum

Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
MQTT server drops connection after subscribe
No permission to create posts
February 6, 2018
1:06 am
Avatar
dpolukhin
New Member
Members
Forum Posts: 2
Member Since:
February 6, 2018
sp_UserOfflineSmall Offline

I'm using different MQTT clients but it seems that all of them have similar problems. Server closes connection after subscription. Here is how it looks with mosquitto_sub:

$ mosquitto_sub -d -v -u <USER> -P <TOKEN> -h mqtt.thingspeak.com -p 8883 --capath /etc/ssl/certs -t channels/107178/subscribe/json  -I mqtt

Client mqtt12684 sending CONNECT
Client mqtt12684 received CONNACK
Client mqtt12684 sending SUBSCRIBE (Mid: 1, Topic: channels/107178/subscribe/json, QoS: 0)
Client mqtt12684 received SUBACK
Subscribed (mid: 1): 0
Client mqtt12684 sending CONNECT
Client mqtt12684 received CONNACK
Client mqtt12684 sending SUBSCRIBE (Mid: 2, Topic: channels/107178/subscribe/json, QoS: 0)
Client mqtt12684 received SUBACK
Subscribed (mid: 2): 0
^C

 

It seems that it is somehow related with subscription limits for free account. Few first attempts worked for me but now I get this error even if I don't have active connection. It seems like my old subscriptions that are not active anymore (I terminated mosquitto_sub) are counted as "active" that is not true.

February 6, 2018
10:18 am
Avatar
JasonW

MathWorks
Members
Forum Posts: 34
Member Since:
October 21, 2016
sp_UserOfflineSmall Offline

I'm looking into this.

Do you also have subscriptions on channel 111206?  It looks like those are still marked as active on our side.

February 6, 2018
1:04 pm
Avatar
dpolukhin
New Member
Members
Forum Posts: 2
Member Since:
February 6, 2018
sp_UserOfflineSmall Offline

I used to have 1 active subscription to 111206 from OpenHab. To make sure that it is really only 1 connection I removed OpenHab subscriptions completely and restarted OpenHab. Now it seems that problem is gone so it looks like it was something on my side. Now I can have 3 simultaneous connections with mosquitto_sub. Really sorry for false alarm.

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online:
22 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 261

Vinod: 196

piajola: 85

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

Newest Members:

AlienAboth, KeslarAboth, EnigmBioge, debbiepe18, MatthewmUb, cathrynww1

Administrators: Hans: 387, lee: 457