# Device goes into pending state again

**URL:** <https://hub.mender.io/t/device-goes-into-pending-state-again/6998>\
**Category:** General Discussions\
**Created:** [July 8, 2024, 7:48pm UTC](https://hub.mender.io/t/device-goes-into-pending-state-again/6998 "2024-07-08T19:48:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![livelove1987](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/livelove1987/32/2188_2.png) [@livelove1987](https://hub.mender.io/u/livelove1987)\
**Post date:** [July 8, 2024, 7:48pm UTC](https://hub.mender.io/t/device-goes-into-pending-state-again/6998/1 "2024-07-08T19:48:25Z")

</div>

Hi, i notice one more problem, when my device goes offline for some time ( like one day ) and I enable it than i get new device pending to be authorization, will same device was authorized by me like 20h ago and i didnt touch the device, what could be the reason of that problem?  
Device authorized 20h ago

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/d/dc065a13c956ac537c9d584678674f8a19f798bd.png)  
And same device waiting for authorization  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/7/76496a8bf50fd2469ac3ca68206ce71331d237f5.png)

This bug appears every time when i enable device after some time ( like day or something like that )

---

<div class="post-metadata">

**Author:** ![livelove1987](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/livelove1987/32/2188_2.png) [@livelove1987](https://hub.mender.io/u/livelove1987)\
**Post date:** [July 8, 2024, 8:25pm UTC](https://hub.mender.io/t/device-goes-into-pending-state-again/6998/2 "2024-07-08T20:25:57Z")

</div>

![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/5/56b76c99aaa5415c7fab6e65cff762cf5f8df22e.png)  
Here are some logs from authd which are around time which that pending request came ( im in GMT + 2 so ignore timezone differences in logs )

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [July 9, 2024, 7:33am UTC](https://hub.mender.io/t/device-goes-into-pending-state-again/6998/3 "2024-07-09T07:33:21Z")

</div>

Hi @livelove1987,

If you look at your screenshot, then you can see that the MAC address changes, from `c0:74:2b:ff:22:26` to `c0:74:2b:ff:22:27`. By default the MAC address is used as the device identity, and hence if it changes the devices is understood as a new one.

Solutions:

- either make sure that the MAC address is assigned permanently
- or choose some other unique identifier for the device ID. You can do this through the device identity script hook, as documented here: [Identity | Mender documentation](https://docs.mender.io/client-installation/identity)

Greets,  
Josef

---

<div class="post-metadata">

**Author:** ![livelove1987](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/livelove1987/32/2188_2.png) [@livelove1987](https://hub.mender.io/u/livelove1987)\
**Post date:** [July 9, 2024, 1:37pm UTC](https://hub.mender.io/t/device-goes-into-pending-state-again/6998/4 "2024-07-09T13:37:51Z")

</div>

Oh okay it makes sens, im just curios why is it used as default identifier while it can be dynamically rotated while there ids like the one from `cat /proc/cpuinfo | grep Serial` Which make those number always unique for device

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [July 9, 2024, 1:44pm UTC](https://hub.mender.io/t/device-goes-into-pending-state-again/6998/5 "2024-07-09T13:44:10Z")

</div>

@livelove1987 that’s why we encourage people to use a unique identifier for their product.

Two comments:

- the MAC address is by definition unique, and for real hardware assigned by the manufacturer. The manufacturer has to buy dedicated addresses from the [IEEE](https://standards.ieee.org/products-programs/regauth/), so it’s technically a really sound choice. If your device, which is possibly a virtual one chooses one dynamically, then it’s up to you to either make it fixed or provide a different unique identifier.
- the `/proc/cpuinfo` serial is by no means unique, see for example [https://forums.raspberrypi.com/viewtopic.php?t=183474](https://forums.raspberrypi.com/viewtopic.php?t=183474)

Greets,  
Josef

---

<div class="post-metadata">

**Author:** ![livelove1987](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/livelove1987/32/2188_2.png) [@livelove1987](https://hub.mender.io/u/livelove1987)\
**Post date:** [July 9, 2024, 1:47pm UTC](https://hub.mender.io/t/device-goes-into-pending-state-again/6998/6 "2024-07-09T13:47:34Z")

</div>

Okay that make sens, btw im no using raspberry pi but orange pi i will check if `/proc/cpuinfo` is not unique as well. Are there any different id’s stored on device which should be unique?

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [July 9, 2024, 2:04pm UTC](https://hub.mender.io/t/device-goes-into-pending-state-again/6998/7 "2024-07-09T14:04:02Z")

</div>

Very technically speaking, I personally consider it a bug if a device is not shipped with a fixed MAC address assigned.

What else might be there on the Orange Pis, I don’t know as I have no experience with that platform. I gave [SID Register Guide - linux-sunxi.org](https://linux-sunxi.org/SID_Register_Guide) a quick skim, and it does not seem to have a unique identifier.

In a product use case, it would be up to you now to create one and store it in an appropriate place. It might be some EEPROM, fuse bits of the SoC, or similar. This must be part of the device provisioning process, and it’s up to the device manufacturer respectively integrator to figure it out.

Like said, the MAC address is a technically sound choice for the vast majority of cases. If you need something else, please work with your hardware supplier and provisioning process and then add an adjusted identity script as documented.

Greets,  
Josef

---

<div class="post-metadata">

**Author:** ![livelove1987](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/livelove1987/32/2188_2.png) [@livelove1987](https://hub.mender.io/u/livelove1987)\
**Post date:** [July 9, 2024, 2:50pm UTC](https://hub.mender.io/t/device-goes-into-pending-state-again/6998/8 "2024-07-09T14:50:03Z")

</div>

I found also one weird think about that MAC addresses, `enP3p49s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500` - Mac address: `c0:74:2b:ff:22:27`  
`enP4p65s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500` - Mac address `c0:74:2b:ff:22:26` so it’s not like the Address aren’t static but mender just chooses once to use first one and then to use second one …

---

<div class="post-metadata">

**Author:** ![livelove1987](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/livelove1987/32/2188_2.png) [@livelove1987](https://hub.mender.io/u/livelove1987)\
**Post date:** [July 9, 2024, 2:53pm UTC](https://hub.mender.io/t/device-goes-into-pending-state-again/6998/9 "2024-07-09T14:53:28Z")

</div>

And thats because my controller has two netwok interfaces ( because it has two ethernet connectors )

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [July 9, 2024, 2:53pm UTC](https://hub.mender.io/t/device-goes-into-pending-state-again/6998/10 "2024-07-09T14:53:53Z")

</div>

If there are multiple interfaces, then you might need to adjust [mender/support/mender-device-identity at master · mendersoftware/mender · GitHub](https://github.com/mendersoftware/mender/blob/master/support/mender-device-identity) to always choose the same one, indeed.

Greets,  
Josef
