Mender dashboard : 404 on /inventory/filters and /api/management/v1/useradm/roles causing accepting device and deprovisionning fails

Since i upgraded to mender 2.5, i cannot accept/refuse/dismiss a device (nor can i decomission).
I noticed that i get 404 error on console with theses 2 calls :

https://mender.mapado.net/api/management/v2/inventory/filters
https://mender.mapado.net/api/management/v1/useradm/roles

Any advice ?
Regards

Are you using the Open Source version of the Server?

https://mender.mapado.net/api/management/v2/inventory/filters
https://mender.mapado.net/api/management/v1/useradm/roles

These services are not available on the Open Source server, so not sure what is going on.

Do you see any other errors?

@mzedel @tranchitella, might be able to shed some light on this.

Yes, i’m using community server (i pulled the 2.5 tag version of https://github.com/mendersoftware/integration)

When i try to dissmiss on device, i get an error :
“There was a problem updating the device authorization status: Cannot read property ‘status’ of undefined…”
This call is cancelled in console :
https://mender.mapado.net/api/management/v2/devauth/devices/5fad698e3077640001363a62/auth/b9993ddd-8093-4973-b6b2-f7abe2dc07b9

Another thing (perhaps all comes from same bug) : i have a “pending” device waiting for approval (i see (1) on pending tab. But when open the pending tag, there is nothing in it.

Hello @Jerry, you can ignore the 404 error codes for those API calls: the UI detects if those features are available in the back-end (opensource vs. enterprise), no harm there.

Can you please try to follow these instructions?

The command “deviceauth propagate-inventory” gave me a lot of 404 errors like :

INFO[2020-11-19T09:57:28Z] propagating device 5fb3cd3b3077640001364606 file=entry.go func=“logrus.(*Entry).Infof” line=346
ERRO[2020-11-19T09:57:28Z] request PATCH http://mender-inventory:8080/api/internal/v2/inventory/devices/5fb3cd3b3077640001364606 failed with status 404 Not Found, response: {“error”:“Resource not found”} file=entry.go func=“logrus.(*Entry).Errorf” line=362
ERRO[2020-11-19T09:57:28Z] FAILED: PATCH http://mender-inventory:8080/api/internal/v2/inventory/devices/5fb3cd3b3077640001364606 request failed with status 404 Not Found file=entry.go func=“logrus.(*Entry).Errorf” line=362

The two others did well.
When i got back to dashboard, i can see the missing device in “pending” but when i clic on it, i got this :

mender-error

I tried to make it workd be force refreshing page (F5).
I “accepted” the pending device and got this error in console :
mender-error2

The device is kept on a “pending” state “Waiting for inventory data from the device”

@tranchitella @ckelloug2 : new information that can help you diagnose :
When i “accept” a device, the authorization modal is kept open but the device is “accepted” (as you can see in capture below).

If i refresh the page, the corresponding device stays in the “pending” view, even if it is accepted.
If i launch the 3 following commands in docker, the device disapear from “pending” and move to main list
deviceauth propagate-inventory
deviceauth propagate-inventory-statuses
deviceauth propagate-inventory-id-data

Thanks for your help

@mirzak i rebuilded installation from scratch restoring data from backup and i still have above error with 2.5.0 (community)
Do you have any advice / fix to help me deploy artifacts again ?
Thank you very much for your help

If someone is having the same problem : i figured out a way to fix this :
I decommisionned all devices with the problem above by issuing manual curl calls (DELETE) on following endpoint :
/api/management/v2/devauth/devices/[ID OF THE DEVICE]

Corresponding devices came back on “pending”, i accepted them and all went back to normal.
So it seems that the corresponding entries where messed up in database

1 Like