glpi-project / glpi-inventory-plugin

GLPI Inventory plugin
GNU Affero General Public License v3.0
46 stars 27 forks source link

Net inventory with switch does not work when only snmpv3 #405

Closed waaalex closed 1 year ago

waaalex commented 1 year ago

Describe the bug

Hello, When i launch net inventory for my switches it does not work when switches are in snmpV3 only.

For working, i have to disable "snmpv3 only" option and put "public" community in snmpV2 on my switches. Even if in IP scope i only have SNMP3, glpiinventory needs snmpv2.

[Fri Sep  8 14:10:06 2023][info] running task NetInventory
[Fri Sep  8 14:10:24 2023][error] [thread 127] #06, [thread 127] SNMP communication error: no response from host 10.0.3.5
[Fri Sep  8 14:10:24 2023][error] [thread 123] #10, [thread 123] SNMP communication error: no response from host 10.0.3.7
.................
[Fri Sep  8 14:10:44 2023][info] running task Deploy

To reproduce

Launch net inventory task on switch with only snmpV3

Expected behavior

working

Operating system

Linux

GLPI Agent version

1.5

GLPI version

10.0.9

GLPIInventory plugin

1.2.3

Additional context

No response

stonebuzz commented 1 year ago

Maybe an agent issue @g-bougard any idea ?

trasher commented 1 year ago

Since agent get no answer from device, this is definitely not a plugin or glpi issue

g-bougard commented 1 year ago

@waaalex You should open a Q&A discussion here: https://github.com/glpi-project/glpi-agent/discussions

waaalex commented 1 year ago

Sorry but there is an issue because i have to have "public" snmpV2 community. Another name does not wxork and with command line

glpi-netinventory.bat --host 10.0.3.3 --credentials version:3,username:snmpV3agent,authprotocol:md5,authpassword:A,privprotocol:aes,privpassword:A --debug

It works. I m pretty sure that there is an issue on plugin or in inventory. Can you reopen this case please?

trasher commented 1 year ago

"SNMP communication error: no response from host 10.0.3.5" means an error from device or agent/device communication. it'll be a plugin issue if information are not correctly sent, but there is nothing in your issue that demonstrate this. for now, you habve to find more information.

stonebuzz commented 1 year ago

@waaalex

Can you retry with 1.2.1 version, after this version we have refactoring all SQL queries (maybe its the problem)

waaalex commented 1 year ago

Ok i will try as soon as possible. Will i have to uninstall plugin and install 1.2.1 or is there a downgrade procedure for plugin?

stonebuzz commented 1 year ago

jsut replace plugin and force install (There have been no database changes between these versions.)

waaalex commented 1 year ago

Same issue with 1.2.1. I do not understand.

waaalex commented 1 year ago

Something new. a clue here : https://github.com/glpi-project/glpi-agent/discussions/477 thanks to @g-bougard

I have deleted two switches, netdiscovery has worked and netinventory is ok for ALL switches. The issue seems to be netinventory that didn't updated switches on database.

This case can be closed if you want. It works on 1.2.1 and 1.2.3.