-
Notifications
You must be signed in to change notification settings - Fork 45
Connection Closed and Error Connection 33 (CA-4) #8
Comments
is there any information related this issue? |
Same problem for me!Does anyone have a solution? |
Your JWT key expired, only lasts an hour. A workaround is to put a |
@meltdown03 That's a good workaround, but I think needs some sort of incremental backoff timer to keep from just spamming the server if it's a different issue. Handling error 33 as a reauth would probably be the correct PR to implement. |
Hello Everyone !!! |
Hi @Gohith, The warning is because of the redundant padding (the '=' signs at the end of the token) in the base 64 URL encoded JWT. |
How is this bug not solved in over 1 year? This is not giving me confidence in this sdk. |
@robotjosh There does not seem to be a lot of effort at the google IOT solution. This isn't technically a bug, it's just that the example code doesn't handle expiring JWT. Of note, there's a bug (I have not yet reported because I don't have enough details) that causes spurious crashes when the server disconnects you (generally when the server shuts down). Doesn't happen 100% of the time, but we have a few dozen devices out right now, and we're finding crashes in the IOT code in the coredumps. Oh, I did report it: #20 My workaround is to just use the JWT code to make the tokens and implement the rest using the stock mqtt library-- that appears to be super solid, it's this wrapper on the IOT that's having issues. |
Thanks for the info. Is it possible to refresh the jwt token without
disconnecting and reconnecting to mqtt?
…On Mon, Jan 18, 2021 at 8:18 AM Ben Peoples Industries, LLC < ***@***.***> wrote:
@robotjosh <https://github.com/robotjosh> There does not seem to be a lot
of effort at the google IOT solution. This isn't technically a bug, it's
just that the example code doesn't handle expiring JWT.
Of note, there's a bug (I have not yet reported because I don't have
enough details) that causes spurious crashes when the server disconnects
you (generally when the server shuts down). Doesn't happen 100% of the
time, but we have a few dozen devices out right now, and we're finding
crashes in the IOT code in the coredumps.
My workaround is to just use the JWT code to make the tokens and implement
the rest using the stock mqtt library-- that appears to be super solid,
it's this wrapper on the IOT that's having issues.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJTXBXS5C3CU22QWQNKNCTS2Q7K3ANCNFSM4JNHJPJQ>
.
|
I don't think so. The JWT is used as the password to the MQTT server, and there isn't really a way to say "hey my password is this now" -- you can make the JWT timeout arbitrarily long and minimize how often the disconnections happen. Here's the Google IOT documentation on refresh: https://cloud.google.com/iot/docs/how-tos/credentials/jwts#refreshing_jwts -- and all the examples are a disconnect-reconnect cycle. |
I have try this sample code for integration with Google IOT Core with IDF versi 3.3rc.
Device send receive command to GCP is no problem.
But when leave it in long time (more than 1 hours and no activity ), device disconnected and i got error log as below :
from iotc error lib, error 17 is IOTC_CONNECTION_RESET_BY_PEER_ERROR.
if anyone has similar issue, please advice for improvement. thank you
The text was updated successfully, but these errors were encountered: