# Mender client unable to sync with server after device has been preauthorised

**URL:** <https://hub.mender.io/t/mender-client-unable-to-sync-with-server-after-device-has-been-preauthorised/6842>\
**Category:** General Discussions\
**Created:** [May 23, 2024, 10:49am UTC](https://hub.mender.io/t/mender-client-unable-to-sync-with-server-after-device-has-been-preauthorised/6842 "2024-05-23T10:49:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Utsav\_Shah](https://avatars.discourse-cdn.com/v4/letter/u/3ab097/32.png) [@Utsav\_Shah](https://hub.mender.io/u/Utsav_Shah)\
**Post date:** [May 23, 2024, 10:49am UTC](https://hub.mender.io/t/mender-client-unable-to-sync-with-server-after-device-has-been-preauthorised/6842/1 "2024-05-23T10:49:30Z")

</div>

Hello,  
I am using the preauthorising method to register one of my devices on the mender dashboard.  
What I have done is used the mender keygen script to generate the public private key pair and used the public key to successfully pre authorise the device.  
The problem comes when I am restarting the mender client service after the device is already in preauthorised state. Upon restart, I get the following error :

```auto
nfo msg="State transition: check-wait [Idle] -> inventory-update [Sync]"
nfo msg="Device unauthorized; attempting reauthorization"
rror msg="Failed to authorize with \"https://hosted.mender.io\": authentication request rejected server error message: dev auth: unauthorized"
arning msg="Reauthorization failed with error: transient error: authorization request failed"
rror msg="Failed to submit inventory data: transient error: authorization request failed"
rror msg="inventory submit failed: transient error: authorization request failed"
arning msg="Failed to refresh inventory: failed to submit inventory data: inventory submit failed: transient error: authorization request fai>
nfo msg="State transition: inventory-update [Sync] -> inventory-update-retry-wait [Sync]"
nfo msg="Handle update inventory retry state try: 0"
nfo msg="Device unauthorized; attempting reauthorization"

```

On the dashboard a separate pending request is generated for the same device. So I now have a preauthorised request and a pending request for the same device.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/2/227e880992266b6f41d8f5cc828705114e0ce346.png)

Ideally the device should have moved from the preauthorised state to accepted state but that does not happen. What could be the issue here?

---

<div class="post-metadata">

**Author:** ![Utsav\_Shah](https://avatars.discourse-cdn.com/v4/letter/u/3ab097/32.png) [@Utsav\_Shah](https://hub.mender.io/u/Utsav_Shah)\
**Post date:** [June 7, 2024, 10:20am UTC](https://hub.mender.io/t/mender-client-unable-to-sync-with-server-after-device-has-been-preauthorised/6842/2 "2024-06-07T10:20:13Z")

</div>

@TheYoctoJester could you help me out with this?
