"Bad Handshake" with mender-cli

I recently started seeing the “Bad Handshake” issue with mender-connect terminal connections. Interestingly it only seems to happen when using mender-cli and not when using the web UI. I was able to reproduce it with both the 1.7.0 and master pre-release versions. Any ideas why this would happen?

Drew

1 Like

@merlin this one’s for you :slight_smile:

this one’s for you

much appreciated :slight_smile:

1 Like

Hey Drew!

we are talking about hosted Mender, or some other installation? if the former, then could you share with me privately the device id and account name? if latter, then could you show me the logs from deviceconnect?

pg

Hey Peter,

It’s hosted. I’ll retest this morning and send you details.

Drew

thank you!

pg

We are also experiencing the same issue with hosted mender.

It’s usually the case when we reboot the device.

To close the loop here, it turns out I just needed to redo the “mender-cli login” step. I guess my JWT was somehow corrupt and didn’t report an obvious error.

Drew

On our side we have found that it doesn’t happen through the web terminal.

@Austriker can you try to run “mender-cli login” when it fails and see if that resolves it?

Created this ticket to fix the confusing error message when not logged in: [MEN-5428] mender-cli: improve auth error messages - Northern.tech AS

Hey @eystein thank you for your feedback.

I didn’t manage to get the error again just yet. But I will try that. Does it change something to have a configuration file ? eg .mender-clirc

We also get a bad handshake error when the device is offline. Would it be possible to get an offline message instead ?