Closed GuidoWilden closed 2 months ago
Hi @GuidoWilden
We've already come across this case. It turned out that the workstation had both the FusionInventory agent and the GLPI inventory agent.
When the FusionInventory agent did the invetary, it deleted the GLPI agent connected to this workstation (and vice versa).
So if a task was prepared with the GLPI agent, the actor was deleted.
perhaps this is the case for you?
Hi @stonebuzz, thank you for your response but this is not my case no.
The server is fairly new and never had the fusion inventory plugin installed. Sorry ...
And the computer in question has only one agent installed ?
Can you check in the agent (history tab on glpi) whether he keeps changing PCs?
That is indeed a little confusing. If I list it on command line I get:
apt list --installed | grep glpi-agent
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
glpi-agent-task-esx/now 1:1.11-git7b8a5f0b all [installed,local]
glpi-agent-task-network/now 1:1.11-git7b8a5f0b all [installed,local]
glpi-agent/now 1:1.11-git7b8a5f0b all [installed,local]
However in the GUI it appears to flip flop or am I missing something?
Here you are on a computer
can you click here
and then look here
OK is this what you are after?
if the linked PC does not change to another
this is not the case here
and I can't see what would cause the agent to be removed from the task
task entity is the same as computer entity ?
It is yes, and currently the Actor is also listed. Not sure if this is still true on Monday.
Just like I thought: I just checked the Tasks and the Actors have vanished again.
Wouldn't the agent in question be deleted and then recreated at some point?
That's not the behaviour I would expect tot see. There is only one Agent on our whole estate and its running on the server or am I missing something?
Hi @GuidoWilden
did you try to install glpi-agent with AppImage or snap before using rpm package ? If such a installation still exists on the computer, it may also produce such a comportment.
You still can check if you have another glpi-agent process running.
The server runs Ubuntu so no rpm. We always install via
perl <PACKAGE_NAME> --install --verbose
I can not see any other agent process running
ps -ef | grep agent
root 94086 1 0 Aug29 ? 00:16:36 glpi-agent (tag ldnaz): waiting
root 294118 94086 12 10:17 ? 00:02:18 glpi-agent (tag ldnaz): processing OOB VLAN network scan request
root 298109 3191 0 10:35 pts/3 00:00:00 grep --color=auto agent
I think the agent is deleted then recreated, if I go back to your screenshot we can see that it was created on the 29th.
can you show me the agent's history
Is that not the moment I installed the latest update?
It looks like this now
So yes, the agent was deleted and then recreated.
Can you run the agent to see if it switches to GLPI?
Sorry I don't think I follow. Do you want me to run the agent on command line? And the observe what exactly?
Weird, you first screenshot is showing a different deviceid than the second: timestamp is different
ldnaz-wiki01-2024-04-09-11-46-05
vs ldnaz-wiki01-2024-06-19-09-30-16
This means you effectively have 2 agents, one installed in april and one in june which are claiming the same computer.
Are you using VM or Containers ? If yes, are you using a clone which may have the same S/N and/or UUID ?
Do you want me to run the agent on command line?
Yes
And the observe what exactly?
I Agent ID change
and if you get errors in the GLPI log files (/glpi/files/_log/ php-errors.log or sql-errors.log)
what is the result of the following commands :
sudo updatedb
locate agent.cgf
Wouldn't you have cloned the server?
OK its a Hyper V VM running Ubuntu so no container.
Commands:
sudo updatedb
sudo: updatedb: command not found
locate agent.cgf
retuns nothing.
When you say cloned server I'm not too sure what you mean. The server has been restored from a snapshot when I broke things. Not sure if this is what you mean.
When I run the agent on command line the ID does indeed change:
What could be the cause for this?
either it actually has 2 agents on the same machine, or it has 2 cloned machines with the same S/N and or UUID
I can see only one Agent:
root@ldnaz-wiki01:/var/log/glpi# apt list --installed | grep agent
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
glpi-agent-task-esx/now 1:1.11-git7b8a5f0b all [installed,local]
glpi-agent-task-network/now 1:1.11-git7b8a5f0b all [installed,local]
glpi-agent/now 1:1.11-git7b8a5f0b all [installed,local]
gpg-agent/jammy-updates,jammy-security,now 2.2.27-3ubuntu2.1 amd64 [installed,automatic]
libpolkit-agent-1-0/jammy,now 0.105-33 amd64 [installed,automatic]
lxd-agent-loader/jammy,now 0.5 all [installed,automatic]
It finds only one machine against the serial number and from what I can see I can not search by UUID.
[...] This means you effectively have 2 agents, one installed in april and one in june which are claiming the same computer.
This does not seems to be a bug, I close
Today I restored a backup/snapshot from July 27th that was seemingly not affected by the problem, however, now about four hours later I am faced with the exact same problem. I have been singing the praises for GLPI for quite some time now but am close to giving up on the product. Its just too fragile and temperamental to be used in production as it stands.
This sounds like a fairly complex problem to solve, perhaps you should consider a professional subscription, which would allow us (under contract) to have access to your GLPI / infrastructure etc ... and be able to help you in better conditions.
do you have errors in the GLPI log files (/glpi/files/_log/ php-errors.log or sql-errors.log) when the agent pushes the inventory?
I have been searching for clones with UUID and serial no. but even if I use only snippets of the two I can't find anything. There is guaranteed only one agent installed.
I tried tracing the logs but nothing sticks out to me. Filtered logs only for today attached. Archive.zip
Today I restored a backup/snapshot from July 27th that was seemingly not affected by the problem, however, now about four hours later I am faced with the exact same problem. I have been singing the praises for GLPI for quite some time now but am close to giving up on the product. Its just too fragile and temperamental to be used in production as it stands.
If the issue is caused by a dual agent installation on one or several computer, you can restore GLPI database, that won't change anything.
From the information you provided, there is no bug plugin or inventory side; but rather something wrong on your infrastructure setup. There are a lot of errors in your logs, but nothing that seems directly related to your initial issue.
Also, you affirm there is no duplicate don your side, but @g-bougard stated:
Weird, you first screenshot is showing a different deviceid than the second: timestamp is different ldnaz-wiki01-2024-04-09-11-46-05 vs ldnaz-wiki01-2024-06-19-09-30-16
So it seems there is something wrong/changed on your side.
Describe the bug
We set the target as an IP range for both the network discovery and network inventory task, as an Actor a single glpi-agent runs on the server that handles both remote inventory as well as network discovery and network inventory tasks. This has worked reliably for months, however, currently the Actor keeps disappearing from the Task. We have not yet figured out what triggers the disappearance.
To reproduce
Expected behavior
Once the Task is defined the parameters should remain unchanged.
Operating system
Linux
GLPI Agent version
Nightly build (git version in additional context below)
GLPI version
Other (See additional context below)
GLPIInventory plugin
1.3.5
Additional context
GLPI version 10.0.16, GLPI agent nightly build v1.11-git7b8a5f0b