# Client can not update inventory

**URL:** <https://hub.mender.io/t/client-can-not-update-inventory/4055>\
**Category:** General Discussions\
**Created:** [September 3, 2021, 7:37am UTC](https://hub.mender.io/t/client-can-not-update-inventory/4055 "2021-09-03T07:37:39Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![doganmurat](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/doganmurat/32/573_2.png) [@doganmurat](https://hub.mender.io/u/doganmurat)\
**Post date:** [September 3, 2021, 7:37am UTC](https://hub.mender.io/t/client-can-not-update-inventory/4055/1 "2021-09-03T07:37:39Z")

</div>

Hi,

2 clients (on different locations) can not update inventory list.  
You can find client log below.  
Any comment?

Client Version 2.4  
Server Version 2.6

```auto
Sep 03 07:26:25 node01 systemd[1]: Started Mender OTA update service.
Sep 03 07:26:25 node01 mender[24503]: time="2021-09-03T07:26:25Z" level=info msg="Loaded configuration file: /etc/mender/mender.conf"
Sep 03 07:26:25 node01 mender[24503]: time="2021-09-03T07:26:25Z" level=info msg="Mender running on partition: /dev/mmcblk0p2"
Sep 03 07:26:27 node01 mender[24503]: time="2021-09-03T07:26:27Z" level=info msg="State transition: init [none] -> init [none]"
Sep 03 07:26:27 node01 mender[24503]: time="2021-09-03T07:26:27Z" level=info msg="State transition: init [none] -> idle [Idle]"
Sep 03 07:26:27 node01 mender[24503]: time="2021-09-03T07:26:27Z" level=info msg="authorization data present and valid"
Sep 03 07:26:27 node01 mender[24503]: time="2021-09-03T07:26:27Z" level=info msg="State transition: idle [Idle] -> check-wait [Idle]"
Sep 03 07:26:27 node01 mender[24503]: time="2021-09-03T07:26:27Z" level=info msg="State transition: check-wait [Idle] -> inventory-update [Sync]"

```

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [September 3, 2021, 7:39am UTC](https://hub.mender.io/t/client-can-not-update-inventory/4055/2 "2021-09-03T07:39:16Z")

</div>

Hi @doganmurat

We’re gonna need a bit more information here, the log you posted is cut off, and it looks just fine up until this point for me at least.

---

<div class="post-metadata">

**Author:** ![doganmurat](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/doganmurat/32/573_2.png) [@doganmurat](https://hub.mender.io/u/doganmurat)\
**Post date:** [September 3, 2021, 7:43am UTC](https://hub.mender.io/t/client-can-not-update-inventory/4055/3 "2021-09-03T07:43:29Z")

</div>

Yes you are right, it seems ok. But never logs anything else.  
I guess it can not make the update, so waiting.

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [September 3, 2021, 7:48am UTC](https://hub.mender.io/t/client-can-not-update-inventory/4055/4 "2021-09-03T07:48:40Z")

</div>

Ok, I see.

Let’s start off digging a little bit then.

1. Could you enable the client with `debug` logging?
2. Can you list which inventory scripts are run on the device?

---

<div class="post-metadata">

**Author:** ![doganmurat](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/doganmurat/32/573_2.png) [@doganmurat](https://hub.mender.io/u/doganmurat)\
**Post date:** [September 3, 2021, 7:58am UTC](https://hub.mender.io/t/client-can-not-update-inventory/4055/5 "2021-09-03T07:58:49Z")

</div>

Debug output

```auto
DEBU[0000]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/conf/config.go:175 github.com/mendersoftware/mender/conf.loadConfigFile() Configuration file does not exist: /var/lib/mender/mender.conf 
DEBU[0000]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/conf/config.go:192 github.com/mendersoftware/mender/conf.readConfigFile() Reading Mender configuration from file /etc/mender/mender.conf 
INFO[0000]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/conf/config.go:185 github.com/mendersoftware/mender/conf.loadConfigFile() Loaded configuration file: /etc/mender/mender.conf 
DEBU[0000]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/conf/config.go:124 github.com/mendersoftware/mender/conf.LoadConfig() Loaded 1 configuration file(s)               
DEBU[0000]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/conf/config.go:131 github.com/mendersoftware/mender/conf.LoadConfig() Loaded configuration = &conf.MenderConfig{MenderConfigFromFile:conf.MenderConfigFromFile{ClientProtocol:"", ArtifactVerifyKey:"/etc/mender/artifact-verify-key.pem", HttpsClient:client.HttpsClient{Certificate:"", Key:"", SSLEngine:""}, RootfsPartA:"/dev/mmcblk0p2", RootfsPartB:"/dev/mmcblk0p3", DeviceTypeFile:"/var/lib/mender/device_type", UpdatePollIntervalSeconds:60, InventoryPollIntervalSeconds:60, SkipVerify:false, RetryPollIntervalSeconds:300, StateScriptTimeoutSeconds:0, StateScriptRetryTimeoutSeconds:0, StateScriptRetryIntervalSeconds:0, ModuleTimeoutSeconds:0, ServerCertificate:"/etc/mender/server.crt", ServerURL:"https://XXX.com/", UpdateLogPath:"", TenantToken:"dummy", Servers:[]client.MenderServer(nil)}, ModulesPath:"/usr/share/mender/modules/v3", ModulesWorkPath:"/var/lib/mender/modules/v3", ArtifactInfoFile:"/etc/mender/artifact_info", ArtifactScriptsPath:"/var/lib/mender/scripts", RootfsScriptsPath:"/etc/mender/scripts"} 
DEBU[0000]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/conf/config.go:166 github.com/mendersoftware/mender/conf.(*MenderConfig).Validate() Verified configuration = &conf.MenderConfig{MenderConfigFromFile:conf.MenderConfigFromFile{ClientProtocol:"", ArtifactVerifyKey:"/etc/mender/artifact-verify-key.pem", HttpsClient:client.HttpsClient{Certificate:"", Key:"", SSLEngine:""}, RootfsPartA:"/dev/mmcblk0p2", RootfsPartB:"/dev/mmcblk0p3", DeviceTypeFile:"/var/lib/mender/device_type", UpdatePollIntervalSeconds:60, InventoryPollIntervalSeconds:60, SkipVerify:false, RetryPollIntervalSeconds:300, StateScriptTimeoutSeconds:0, StateScriptRetryTimeoutSeconds:0, StateScriptRetryIntervalSeconds:0, ModuleTimeoutSeconds:0, ServerCertificate:"/etc/mender/server.crt", ServerURL:"https://XXX.com/", UpdateLogPath:"", TenantToken:"dummy", Servers:[]client.MenderServer{client.MenderServer{ServerURL:"https://XXX.com"}}}, ModulesPath:"/usr/share/mender/modules/v3", ModulesWorkPath:"/var/lib/mender/modules/v3", ArtifactInfoFile:"/etc/mender/artifact_info", ArtifactScriptsPath:"/var/lib/mender/scripts", RootfsScriptsPath:"/etc/mender/scripts"} 
DEBU[0000]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/installer/bootenv.go:153 github.com/mendersoftware/mender/installer.getEnvironmentVariable() Have U-Boot variable: mender_check_saveenv_canary=1 
DEBU[0000]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/installer/bootenv.go:176 github.com/mendersoftware/mender/installer.getEnvironmentVariable() List of U-Boot variables:map[mender_check_saveenv_canary:1] 
DEBU[0000]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/installer/bootenv.go:153 github.com/mendersoftware/mender/installer.getEnvironmentVariable() Have U-Boot variable: mender_saveenv_canary=1 
DEBU[0000]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/installer/bootenv.go:176 github.com/mendersoftware/mender/installer.getEnvironmentVariable() List of U-Boot variables:map[mender_saveenv_canary:1] 
DEBU[0000]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/installer/bootenv.go:153 github.com/mendersoftware/mender/installer.getEnvironmentVariable() Have U-Boot variable: mender_boot_part=2     
DEBU[0000]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/installer/bootenv.go:176 github.com/mendersoftware/mender/installer.getEnvironmentVariable() List of U-Boot variables:map[mender_boot_part:2] 
DEBU[0000]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/installer/partitions.go:175 github.com/mendersoftware/mender/installer.(*partitions).getAndCacheActivePartition() Setting active partition from mount candidate: /dev/mmcblk0p2 
INFO[0000]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/cli/cli.go:419 github.com/mendersoftware/mender/cli.(*runOptionsType).commonCLIHandler() Mender running on partition: /dev/mmcblk0p2  
DEBU[0001]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/installer/modules.go:881 github.com/mendersoftware/mender/installer.NewModuleInstallerFactory() ModuleTimeoutSeconds not set. Defaulting to 14400 seconds 
INFO[0001]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/app/mender.go:591 github.com/mendersoftware/mender/app.transitionState() State transition: init [none] -> init [none] 
DEBU[0001]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/app/state.go:269 github.com/mendersoftware/mender/app.(*initState).Handle() No state data stored                         
INFO[0001]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/app/mender.go:591 github.com/mendersoftware/mender/app.transitionState() State transition: init [none] -> idle [Idle] 
DEBU[0001]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/statescript/executor.go:82 github.com/mendersoftware/mender/statescript.Launcher.getTimeout() statescript: The timeout for executing scripts is not defined; using default of 1h0m0s seconds 
INFO[0001]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/app/mender.go:198 github.com/mendersoftware/mender/app.(*Mender).IsAuthorized() authorization data present and valid         
INFO[0001]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/app/mender.go:591 github.com/mendersoftware/mender/app.transitionState() State transition: idle [Idle] -> check-wait [Idle] 
DEBU[0001]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/app/state.go:1120 github.com/mendersoftware/mender/app.(*checkWaitState).Handle() Handle check wait state                      
DEBU[0001]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/app/state.go:1131 github.com/mendersoftware/mender/app.(*checkWaitState).Handle() Check wait state; next checks: (update: 0001-01-01 00:01:00 +0000 UTC) (inventory: 0001-01-01 00:00:00 +0000 UTC) 
DEBU[0001]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/app/state.go:1149 github.com/mendersoftware/mender/app.(*checkWaitState).Handle() Next check: 0001-01-01 00:00:00 +0000 UTC:inventory-update, (2021-09-03 07:51:17.861085567 +0000 UTC m=+1.084216884) 
DEBU[0001]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/app/state.go:1181 github.com/mendersoftware/mender/app.(*checkWaitState).Handle() Check wait returned: inventory-update        
INFO[0001]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/app/mender.go:591 github.com/mendersoftware/mender/app.transitionState() State transition: check-wait [Idle] -> inventory-update [Sync] 
DEBU[0001]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/statescript/executor.go:82 github.com/mendersoftware/mender/statescript.Launcher.getTimeout() statescript: The timeout for executing scripts is not defined; using default of 1h0m0s seconds 
DEBU[0001]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/statescript/executor.go:82 github.com/mendersoftware/mender/statescript.Launcher.getTimeout() statescript: The timeout for executing scripts is not defined; using default of 1h0m0s seconds 
DEBU[0001]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/device/device.go:134 github.com/mendersoftware/mender/device.(*DeviceManager).GetCurrentArtifactName() Returning artifact name from /etc/mender/artifact_info file. 
DEBU[0001]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/device/device.go:80 github.com/mendersoftware/mender/device.GetManifestData() Reading data from the device manifest file: /etc/mender/artifact_info 
DEBU[0001]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/device/device.go:91 github.com/mendersoftware/mender/device.GetManifestData() artifact_name=3.4.0                          
DEBU[0001]/home/nokta/yocto/node-os/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/mender-client/2.4.0-r0/build/src/github.com/mendersoftware/mender/device/device.go:98 github.com/mendersoftware/mender/device.GetManifestData() Current manifest data: 3.4.0 

```

Inventory scripts

```auto
mender-inventory-bootloader-integration mender-inventory-hostinfo mender-inventory-os                     
mender-inventory-geo mender-inventory-network mender-inventory-rootfs-type

```

---

<div class="post-metadata">

**Author:** ![doganmurat](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/doganmurat/32/573_2.png) [@doganmurat](https://hub.mender.io/u/doganmurat)\
**Post date:** [September 3, 2021, 8:00am UTC](https://hub.mender.io/t/client-can-not-update-inventory/4055/6 "2021-09-03T08:00:22Z")

</div>

As I understood mender client uses PATCH method to update inventory.  
Maybe firewall is blocking PATCH method?

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [September 3, 2021, 8:14am UTC](https://hub.mender.io/t/client-can-not-update-inventory/4055/7 "2021-09-03T08:14:20Z")

</div>

I would rather suspect that one of your inventory scripts hangs.  
To begin with, could you move the `mender-inventory-geo` script somewhere else, so that it is not run?

---

<div class="post-metadata">

**Author:** ![doganmurat](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/doganmurat/32/573_2.png) [@doganmurat](https://hub.mender.io/u/doganmurat)\
**Post date:** [September 3, 2021, 8:18am UTC](https://hub.mender.io/t/client-can-not-update-inventory/4055/8 "2021-09-03T08:18:18Z")

</div>

Yes you are right.  
Moving ` mender-inventory-geo` solved the problem.

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [September 3, 2021, 8:25am UTC](https://hub.mender.io/t/client-can-not-update-inventory/4055/9 "2021-09-03T08:25:32Z")

</div>

Glad to hear it!

We had some issues on older clients, with the `geo` script, but it’s now fixed, in `2.5` and newer, also if you’d like, you can get the new and improved version from master, [here](https://github.com/mendersoftware/mender/blob/master/support/mender-inventory-geo)

---

<div class="post-metadata">

**Author:** ![doganmurat](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/doganmurat/32/573_2.png) [@doganmurat](https://hub.mender.io/u/doganmurat)\
**Post date:** [September 3, 2021, 8:28am UTC](https://hub.mender.io/t/client-can-not-update-inventory/4055/10 "2021-09-03T08:28:23Z")

</div>

Good to hear that you solved it for new versions.  
Thank you for helping.

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [September 3, 2021, 8:32am UTC](https://hub.mender.io/t/client-can-not-update-inventory/4055/11 "2021-09-03T08:32:16Z")

</div>

No worries 🙂

Glad it worked out so quick
