Project

General

Profile

Actions

Bug #14991

closed

NullPointerException with hundreds of inventories at once

Added by Nicolas CHARLES almost 5 years ago. Updated almost 2 years ago.

Status:
Released
Priority:
N/A
Category:
Performance and scalability
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Operational - other Techniques | Rudder settings | Plugins
Effort required:
Small
Priority:
83
Name check:
Reviewed
Fix check:
Checked
Regression:

Description

Workaround

- move inventories from /var/rudder/inventories/accepted-nodes-update or /var/rudder/inventories/incoming to a temp directory;
- restart inventory watcher. From rudder server, do:
- in 5.0, use curl -X POST "http://localhost:8080/endpoint/api/watcher/restart
- in 6.0, use curl -H "X-API-Token: $(cat /var/rudder/run/api-token)" -X POST "https://.../api/latest/inventory/watcher/restart
- move back inventories from temp directory to
/var/rudder/inventories/accepted-nodes-update@ by batch of 100.

Description

With 100s of inventories in incoming folder, i got the following error

java.lang.NullPointerException
       at sun.nio.fs.UnixPath.toUnixPath(UnixPath.java:198)
       at sun.nio.fs.UnixPath.resolve(UnixPath.java:397)
       at sun.nio.fs.UnixPath.resolve(UnixPath.java:43)
       at better.files.FileMonitor.$anonfun$process$1(FileMonitor.scala:33)
       at better.files.FileMonitor.$anonfun$process$1$adapted(FileMonitor.scala:31)
       at scala.collection.Iterator.foreach(Iterator.scala:937)
       at scala.collection.Iterator.foreach$(Iterator.scala:937)
       at scala.collection.AbstractIterator.foreach(Iterator.scala:1425)
       at scala.collection.IterableLike.foreach(IterableLike.scala:70)
       at scala.collection.IterableLike.foreach$(IterableLike.scala:69)
       at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
       at better.files.FileMonitor.process(FileMonitor.scala:31)
       at com.normation.inventory.provisioning.endpoint.Watchers$$anon$1$$anon$2.$anonfun$run$3(InventoryFileWatcher.scala:112)
       at com.normation.inventory.provisioning.endpoint.Watchers$$anon$1$$anon$2.$anonfun$run$3$adapted(InventoryFileWatcher.scala:112)
       at scala.collection.Iterator.foreach(Iterator.scala:937)
       at scala.collection.Iterator.foreach$(Iterator.scala:937)
       at scala.collection.AbstractIterator.foreach(Iterator.scala:1425)
       at com.normation.inventory.provisioning.endpoint.Watchers$$anon$1$$anon$2.$anonfun$run$1(InventoryFileWatcher.scala:112)
       at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
       at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53)
       at scala.concurrent.package$.blocking(package.scala:142)
       at com.normation.inventory.provisioning.endpoint.Watchers$$anon$1$$anon$2.run(InventoryFileWatcher.scala:112)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       at java.lang.Thread.run(Thread.java:748)

not sure what triggered it - had a .tar.gz in the folder, the inventories were not automatically consumed by the webapp, so only agent was sending them

Actions

Also available in: Atom PDF