Bug #1130
Launch the agent n-times in parallel multiply n-times the information in the components, volumes, connections, etc. tabs in the server.
| Status: | Closed | Start date: | 08/31/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% | ||
| Category: | Communication | |||
| Target version: | 0.80+1.1 | |||
| For junior contributor: | No | Found in version: |
Description
.- The server
.- Ubuntu 10.04.3 LTS (Lucid Lynx) - Architecture AMD64
.- OCS Inventory NG Management Server v2.0
.- GLPI v0.78.5
.- GLPI v0.78.5 Agents
.- FusionInventory for GLPI v2.3.6 SnapShot 0.78-20110808-1005
.- FusionInventory v2.3.6
.- FusionInventory INVENTORY v2.3.6-1
.- FusionInventory SNMP v2.3.6-1
.- Shell Commands v1.3.0
.- Bays Management v1.1.0
.- The agents
.- FusionInventory-Agent v2.1.9-3 (for Windows)
.- FusionInventory-Agent v2.1.9-3 (for Ubuntu Desktop 10.04/11.04 and Ubuntu Server 10.04) (FusionInventory Repository)
.- FusionInventory-Agent v2.1.9-1 (for Red Hat Enterprise Linux 5.x) (Remi Repository)
This problem occurs with all agents.
Work arround:
1) From the server, delete and purge the computer with duplicate information.
2) From the agent, launch fusioninventory-agent --force
History
#1
Updated by David Durieux over 1 year ago
You mean when run 2 agents inventory in same time and send to server in the same time, it duplicates informations?
#2
Updated by Tomás Abad over 1 year ago
The agent duplicate information but I explain it more later because the environment is not exactly that I have said to you.
I have test this some minutes ago:
- fusioninventory-agent --force &
- fusioninventory-agent --force &
and
- when the client was inventoried previously, all is Ok
- when the client wasn't inventoried previously (is a new client) then
the server creates two different computer's registries with the same information.
I think the parallel execution of the agent should not be allowed.
The problem related with bug #1130 happen when I do the agent installation. I explain it more later.
#3
Updated by Tomás Abad over 1 year ago
I managed to reproduce the error. All my Windows and Unix installations of the agents end up as follows:
NOTE: The computer isn't inventoried previously.
service fusioninventory-agent start sleep 5 fusioninventory-agent --force
Sometimes, due to problems with proxy settings, the agent can not connect to the server.
[Wed Aug 31 10:42:12 2011][info] PROLOG_FREQ has been set: 1 [Wed Aug 31 10:42:12 2011][info] PROLOG_FREQ has been set: 1 [Wed Aug 31 10:42:12 2011][info] RPC service started at: http://127.0.0.1:62354 [Wed Aug 31 10:42:17 2011][error] Cannot establish communication with `https://ecumene.sociedad.imaginaria.es/ocsinventory: 500 Can't connect to ecumene.sociedad.imaginaria.es:443 (Bad service '8080/')` [Wed Aug 31 10:42:17 2011][error] No anwser from the server [Wed Aug 31 10:42:17 2011][error] Cannot establish communication with `https://ecumene.sociedad.imaginaria.es/glpi/plugins/fusioninventory: 500 Can't connect to ecumene.sociedad.imaginaria.es:443 (Bad service '8080/')` [Wed Aug 31 10:42:17 2011][error] No anwser from the server
When this occurs, seconds after, I launch back the agent as follows
fusioninventory-agent --force
and then is when the information is duplicated in the server.
#4
Updated by Tomás Abad over 1 year ago
#5
Updated by Gonéri Le Bouder over 1 year ago
Even with a lock mechanism it will still be possible to push simultaneously two time the same inventory.
- users can push inventory with fusioninventory-injector
- the agent can be used by a normal user and so, it won't be possible to create a lock file
What about a lock table on the server side with the HARDWARE/DEVICEID of the machine being processed?
#6
Updated by Gonéri Le Bouder over 1 year ago
- Project changed from FusionInventory Agent to 18
#7
Updated by Tomás Abad over 1 year ago
I don't know anything about the structure, schemes and design of FusionInventory project. Perhaps I should have written this 'bug' into the forum, like I have done with others before. I hope you excuse me.
But once I have made the mistake, I prefer continue here; if there is no problems.
I have some questions about this 'bug'.
a) In your opinion, there is actually a bug?.
I think it exist; it's no critical but there is.
b) Does this error is caused by the agent or the server?
I think that is due to both.
The agent must not allow parallel execution with the same parameters. It should allow it on the other hand if, for example, the destination of the inventories are different servers.
The server should serialize the input. Thus no difference between using fusioninventory-injector or receive data from the agents. All inputs are processed in the order received.
For my particular problem there is a simple solution, I think so. Instead of end up the agents installation like this
service fusioninventory-agent start sleep 5 fusioninventory-agent --force
end up like this
service fusioninventory-agent stop sleep 5 fusioninventory-agent --force sleep 5 service fusioninventory-agent start
I think this has its importance. What if while doing the inventory agent on a computer, you force a new inventory remotely from the server?
#8
Updated by David Durieux over 1 year ago
- Target version set to 0.80+1.1
#9
Updated by David Durieux over 1 year ago
- Project changed from 18 to FusionInventory for GLPI
#10
Updated by David Durieux over 1 year ago
- Category set to Communication
- Status changed from New to Closed
- Assignee set to Gonéri Le Bouder
#11
Updated by Gonéri Le Bouder over 1 year ago
Hi Tomás. This should won't append anymore with in incoming FusionInventory for GLPI.
#12
Updated by Tomás Abad over 1 year ago
Thanks Gonéri.