Timeout while waiting for CONNACK

29 views
Skip to first unread message

Kedar Undale

unread,
Jul 7, 2021, 9:41:04 AM7/7/21
to vernemq-users
1. Enabled plugin webhooks for auth
2. Auth is success
3. Custom erl plugin is enabled with on_register, on_client_gone, on_client_offline hooks
(Custom erl plugin just publishes a message to topic java client listens and updates the internal cache)

Issue : When I try to connect from mqtt cli with username and password I get Timeout while waiting for CONNACK in cli

VMQ-ADMIN CLIENT TRACE : 

2021-07-07T13:33:04Z Starting trace for 1 existing sessions for client "staging12345" with PIDs
    [<9320.4470.0>]
2021-07-07T13:33:12Z New session with PID <9320.4577.0> found for client "staging12345"
2021-07-07T13:33:12Z <9320.4577.0> MQTT RECV: CID: "staging12345" CONNECT(c: staging12345, v: 4, u: staging, p: staging, cs: 1, ka: 60)
2021-07-07T13:33:12Z <9320.4577.0> Calling auth_on_register({{52,72,196,22},
                                                             58824},{[],
                                                                     <<"staging12345">>},staging,staging,true) 
2021-07-07T13:33:12Z <9320.4577.0> Hook returned "ok"


VMQ-ADMIN SESSION SHOW --ISONLINE
/opt/vernemq/bin$ ./vmq-admin session show --client_id --is_online
+---------------------------------------------------+-----------+
| client_id                                         | is_online |
+---------------------------------------------------+-----------+
| 27da7d07-ce13-4e3c-912d-2916ab8624db1625663326471 | true      |
+---------------------------------------------------+-----------+
| i-002554206d8a41d96_Hubble_MQTT_client            | true      |
+---------------------------------------------------+-----------+
| staging12345                                      | true      |
+---------------------------------------------------+-----------+
| i-002554206d8a41d96                               | true      |
+---------------------------------------------------+-----------+


Please help me resolve this issue, not sure where I am going wrong
Anything is really helpful, I am on a time based task.

André Fatton

unread,
Jul 7, 2021, 10:14:48 AM7/7/21
to vernemq-users
Hi,
you should see a trace line like "MQTT SEND: CID: "staging12345" CONNACK(sp: 0, rc: 0)" or similar there. You don't hence your question.
Is it happening just for this Client? all? is that ClientID your custom plugin coming in?
What is your VerneMQ version?
Best,
André

Kedar Undale

unread,
Jul 7, 2021, 1:59:39 PM7/7/21
to vernemq-users

I had a prerequisite to start the erl plugin and the client before enabling the auth. Once i followed that i was able to auth as well as connect. 
Thanks Andre for your time :)
Appreciate it  
Reply all
Reply to author
Forward
0 new messages