I am using mender-convert to create the image of Ubuntu 20 for Raspberry Pi 3. The device can successfully authenticate to the server. However, after the first checkin, mender server keeps returning 405 Method Not Allowed when calling API “PUT /api/devices/v1/inventory/device/attributes” to update inventory. The followings are the error logs captured in both mender client and mender server:
Mender Client Logs:
Nov 17 02:37:37 ubuntu mender[1148]: time="2020-11-17T02:37:37Z" level=info msg="State transition: inventory-update [Sync] -> check-wait [Idle]"
Nov 17 02:37:38 ubuntu mender[1148]: time="2020-11-17T02:37:38Z" level=info msg="State transition: check-wait [Idle] -> update-check [Sync]"
Nov 17 02:37:38 ubuntu mender[1148]: time="2020-11-17T02:37:38Z" level=info msg="State transition: update-check [Sync] -> check-wait [Idle]"
Nov 17 02:37:40 ubuntu mender[1148]: time="2020-11-17T02:37:40Z" level=info msg="State transition: check-wait [Idle] -> inventory-update [Sync]"
Nov 17 02:37:42 ubuntu mender[1148]: time="2020-11-17T02:37:42Z" level=warning msg="Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 3"
Nov 17 02:37:42 ubuntu mender[1148]: time="2020-11-17T02:37:42Z" level=warning msg="Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 3"
Nov 17 02:37:42 ubuntu mender[1148]: time="2020-11-17T02:37:42Z" level=error msg="Got unexpected HTTP status when submitting to inventory: 405"
Nov 17 02:37:42 ubuntu mender[1148]: time="2020-11-17T02:37:42Z" level=error msg="Got unexpected HTTP status when submitting to inventory: 405"
Nov 17 02:37:42 ubuntu mender[1148]: time="2020-11-17T02:37:42Z" level=warning msg="Failed to refresh inventory: failed to submit inventory data: (request_id: ): inventory submit failed, bad status 405 server error message: Method not allowed"
Nov 17 02:37:42 ubuntu mender[1148]: time="2020-11-17T02:37:42Z" level=warning msg="Failed to refresh inventory: failed to submit inventory data: (request_id: ): inventory submit failed, bad status 405 server error message: Method not allowed"
I am also facing the issue of update inventory data fails on mender server UI inventory after removing script mender-inventory-geo ( /usr/share/mender/inventory/mender-inventory-geo ) and getting error (journalctl -f -u mender-client.service) in below screenshot.
Any suggestion or workaround to resolve this issue of “waiting for inventory data from the device”.
We also face exactly the same behaviour with the same journalctl log messages !
Remote updates are successful, typing “sudo mender -show-artifact” on the device’s console correctly outputs the new artifact name.
But on the Mender Demo Server Website (https://IPv4addr/ui/#/devices) in the column “Current software” there is a minus shown instead of the corresponding artifact name.
Also in the Device inventory “Waiting for inventory data” is shown …
Whenever we repeat the above procedure the behaviour is the same: update successful, correct artifact name shown on the device but it doesn’t find its way to the Mender Server Website GUI.
We need urgent advice how to get inventory updated immediately after updates/reboot so that above information is shown correctly …
We also get thew same ouput on “mender --version”.
But: We are using mender-convert to generate full images and mender-artifacts…
“483c605 runtime: go1.11.5” is exactly the version which mender-convert seems to install …
@mirzak Can we really just remove this script (/usr/share/mender/inventory/mender-inventory-geo) ? What is it used for ?
Ah, sorry: Now i saw in https://tracker.mender.io/browse/MEN-4085
that this is considered bug: “I moved the bug to Mender project, as by now we have proved there is a product issue.”
An interesting fact may be, that everything worked fine a few days ago.
We didn’t change anything, neither in the mender-toolchain nor on the Mender Demo Server.
We only did an apt update + full-upgrade on our Golden Device.
After that, we supplied the Golden Image to mender-convert and updated the device with the full-image and/or the mender-artifact for remote updates.
Since then, the above behaviour occured. Maybe there is an issue with dependencies of the script which changed due to update/upgrade ? Especially because this thread is very new …
Originally we had "MENDER_CLIENT_VERSION=“master” in our configs/mender_convert_config file.
With that setting the issue occured recently.
Then I changed it to "MENDER_CLIENT_VERSION=“latest” where, as you mentioned, an error in mender-convert occures with wget.
Now I changed it to "MENDER_CLIENT_VERSION=“2.4.0” acc. your proposal and the infos are shown again on the Mender Demo Server GUI
Nevertheless there is a msg: level=warning msg=“Inventory tool /usr/share/mender/inventory/mender-inventory-geo wait failed: exit status 3” but i can regard this as a minor issue.
After changing the version of mender client to 2.4.0, the error log of 405 error disappears. Although the warning about mender-inventory-geo still exists, the client can send inventory info to server now. I changed the line in the following file:
I have hosted a mender server (Version: integration-2.1.0) on our EC2 instance with the region “US East (N. Virginia)us-east-1”.
OS & Architecture: Ubuntu18.04 (X86) MENDER_CLIENT_VERSION=“2.4.0”
Issue: long time mender artifacts deployment in different network
I have observed that the Mender OTA deployment (on our device) time in my office (India) is taking around ~1hrs but the image of the same mender artifact (with same mender server UI) is taking time around (~4hrs) 4 times in my other office location device (US) network. There is no error observe in journalctl logs on the device.
I have verified internet speed as well ~87 mbps on both locations/networks.
Could anyone please assist/suggestion me that why is it taking a long time (4 times) instead of ~1 hrs here.??
It’s hard to say. Do you have the same polling intervals in each of the devices? Can you tell from the logs where the delay is introduced? By that I mean is it a long delay before the device starts the download or is it once it starts downloading? Do you see any retries reported in the logs?
Is it possible that you have some kind of throttling implemented in the server or the local infrastructure of your US based devices?