Closed troloff closed 1 month ago
I did an inventory run on two machines which show up as different versions. This is the output of the example software above:
Agent 1:
<SOFTWARES>
<ARCH>x86_64</ARCH>
<FROM>registry</FROM>
<GUID>Camunda Modeler</GUID>
<INSTALLDATE>15/06/2024</INSTALLDATE>
<NAME>Camunda Modeler</NAME>
<PUBLISHER>Camunda</PUBLISHER>
<SYSTEM_CATEGORY>application</SYSTEM_CATEGORY>
<UNINSTALL_STRING>C:\Program Files\Camunda Modeler\uninstall.bat</UNINSTALL_STRING>
<URL_INFO_ABOUT>https://camunda.com/de/download/modeler/</URL_INFO_ABOUT>
<VERSION>5.24.0</VERSION>
</SOFTWARES>
Agent 2:
<SOFTWARES>
<ARCH>x86_64</ARCH>
<FROM>registry</FROM>
<GUID>Camunda Modeler</GUID>
<INSTALLDATE>14/06/2024</INSTALLDATE>
<NAME>Camunda Modeler</NAME>
<PUBLISHER>Camunda</PUBLISHER>
<SYSTEM_CATEGORY>application</SYSTEM_CATEGORY>
<UNINSTALL_STRING>C:\Program Files\Camunda Modeler\uninstall.bat</UNINSTALL_STRING>
<URL_INFO_ABOUT>https://camunda.com/de/download/modeler/</URL_INFO_ABOUT>
<VERSION>5.24.0</VERSION>
</SOFTWARES>
As far as I can see, the only difference is the install date.
Maybe related: https://forum.glpi-project.org/viewtopic.php?id=290215
Could this https://github.com/glpi-project/glpi/pull/16598 be the cause? Maybe, another "version" (in terms of glpi) gets added, if installation dates differ? (no developer here, so just a guess...)
CSV export of the glpi_softwareversions table (filtered according to the example above): glpi_softwareversions_202406180753.csv
We need inventory file(s) in order to reproduce from a fresh install.
Do you mean the complete xml produced on clients after installation of software? What do you mean by "fresh install" - glpiinventory agent?
Just upgraded to glpi 10.0.16, and we are still seeing duplicate software versions. I even purged glpi_softwareversion and glpi_item_softwareversion tables to make sure there is no conflict because of already existing duplicates. Please find attached the software inventories of two hosts in question. roloffvm2020-2024-07-01-12-57-04.xml.txt ernstvm2022-2024-07-10-21-16-50.xml.txt
Hi @troloff
After importing (several times) your files, I do not reproduce
Camunda Modeler
software does not have a duplicated
version
When importing XML files, do you see errors in GLPI logs (php-error.log
/ sql-error.log
)?
One clue could be an inconsistent state in your database data.
The presence of several identical versions (name
, arch
, os
, linked software
) should not be possible.
GLPI cannot find a single version and therefore adds it by default (1 +1 +1 +1 ....)
You can try to clean up the software with the following SQL queries
DELETE FROM glpi_softwares;
DELETE FROM glpi_softwareversion;
DELETE FROM glpi_items_softwareversions;
Software information will be updated as and when the inventory is updated.
Deleted the three tables as suggested. Now, software inventory rebuilds, but we have duplicate versions for every software/version installed on every computer.
There are no errors in sql-error.log
Only error in php-errors.log (but only <10 times a day) is
[2024-06-28 16:27:45] glpiphplog.WARNING: *** PHP Warning (2): Undefined array key "HTTP_REFERER" in /var/www/inventory.net.adk.de/plugins/glpiinventory/inc/deploypackage.class.php at lin>
Backtrace :
src/MassiveAction.php:842 PluginGlpiinventoryDeployPackage->getForbiddenStandardMassiveAction()
src/Search.php:1835 MassiveAction::getAllMassiveActions()
src/Search.php:213 Search::displayData()
src/Search.php:177 Search::showList()
...s/glpiinventory/inc/deploypackage.class.php:454 Search::show()
plugins/glpiinventory/front/deploypackage.php:48 PluginGlpiinventoryDeployPackage->showList()
public/index.php:82 require()
We did not see this behaviour before update to GLPI 10.0.15 / GLPI-Agent 1.9 (which we unfortunately did in the same run...).
Maybe, I can add some debugging output to /src/Inventory/Asset/Software.php (line 410 ff?) to see what is happening, if new software "arrives" from the GLPI agents?
Just to be sure:
root@glpi:/var/www/glpi # php bin/console database:check_schema_integrity
Das Datenbankschema ist in Ordnung.
(which reads "database schema is ok")
Do you have several entities?
Are the PCs in different entities?
How is software management configured in the entity?
Software management looks the same to me:
There is only one "root" entity,
and all computers belong to this entity (did a search for "entity is not root" and received an empty result).
Are inventories processed in parallel? If so, might there be a race condition in https://github.com/glpi-project/glpi/blob/d721c1f0734f979eea24d024153269429fa82363/src/Inventory/Asset/Software.php#L247 ?
Like:
Same problem with two different installations. GLPI 10.0.16, Agent 1.10, GLPI Inventory plugin 1.3.5. Some versions are without OS, some are I guess from different OS version. But this is the same software and version i.e. 7-zip 23.01 x86_64
Operating System is part of the dedup key; as it already was in the plugin. As already said, we need a way to reproduce on a fresh GLPI instance, so please provide related inventories files and detailed steps to do so.
Same problem here. Any ideas?
Same issue here, Server version 10.0.16 and clients on version 1.10 (both Windows and MacOS) . I have even deleted the software tables from the glpi database and allowed the agents to repopulate the tables and I am getting single entries for every installed application despite the fact that most of them are the same version See screenshots below, in some cases, it is the same version of the software and yet it is listed 20 times
Any ideas of what the issue might be?
Not reproducible on our side. Feel free to reopen with a reproducble use case on a fresh GLPI latest stable release installation.
Code of Conduct
Is there an existing issue for this?
Version
10.0.15 / GLPI Agent 1.9
Bug description
After update to 10.0.15, we are seeing multiple (duplicate) entries of the same software version. Example screenshot:
Relevant log output
No response
Page URL
No response
Steps To reproduce
Your GLPI setup information
Informationen über das System, die Installation und die Konfiguration
Server
GLPI constants
Libraries
SQL replicas
Notifications
Plugins list
Anything else?
No response