Migrating a device from one Mender server to another

Hi,

We were using an instance of Mender server and the devices were getting updated successfully. Now we need to use another Mender server with a different IP and certificate. We have decommissioned the devices from the old server, updated Mender Server URL in mender.conf and placed new server.crt in /etc/mender/.

Now when the device boots up it goes directly to update-check state and do not check authorization status. There is a following message in the log:

INFO[0054] authorization data present and valid, skipping authorization attempt module=mender

Is there a way to reset state on Mender client side so that it starts behaving a new device and sends an authorization request to the new server first? Any other way to achieve this?

Best Regards,
Shakeel

Hi @shakeel and welcome to Mender Hub.

You can use the mender -bootstrap to force the client to re-do the authorization. Will that work for you?

Hi @mirzak

Thanks for your message.

I have already tried mender -bootstrap and mender -forcebootstrap -bootstrap but I still see the following message:

INFO[0000] Issuer: [], Valid from: 2019-03-05 14:38:58 +0000 UTC, Valid to: 2029-03-02 14:38:58 +0000 UTC  module=client
INFO[0000] authorization data present and valid, skipping authorization attempt  module=mender

Ok, if you really want to clean-up all state from the device you can also delete the following files:

/data/mender/mender-store
/data/mender/mender-store-lock
/data/mender/mender-agent.pem

Doing this should re-present a “new” device.

Thanks @mirzak deleting these three files has solved the problem for me.

Best Regards,
Shakeel