MQTT server drops connection after subscribe | ThingSpeak API | Forum

Avatar

Please consider registering
Guest

Search

— Forum Scope —






— Match —





— Forum Options —





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

Register Lost password?
sp_Feed sp_TopicIcon
MQTT server drops connection after subscribe
Avatar
dpolukhin
New Member
Forum Posts: 2
sp_UserOfflineSmall Offline
1
February 6, 2018 - 1:06 am
sp_Permalink sp_Print

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.

Avatar
JasonW

Forum Posts: 24
sp_UserOfflineSmall Offline
2
February 6, 2018 - 10:18 am
sp_Permalink sp_Print

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.

Avatar
dpolukhin
New Member
Forum Posts: 2
sp_UserOfflineSmall Offline
3
February 6, 2018 - 1:04 pm
sp_Permalink sp_Print

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:
36 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 252

Vinod: 164

cstapels: 96

piajola: 75

vespapierre: 63

Adarsh_Murthy: 59

Newest Members:

ibgedubo

aogomaeqaza

ureomug

itixuwidouzuv

eilimir

memozupi

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

 

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Administrators: Hans, lee