Closed waaalex closed 1 year ago
Hi @waaalex
about
[2023-09-06 17:16:41] glpiphplog.WARNING: *** PHP User Warning (512): Invalid relations declared for "glpi_plugin_accounts_accountstates" table. Target table "glpi_plugin_accounts_mailingstates" does not correspond to a known itemtype. in /var/www/html/glpi/src/DbUtils.php at line 2111
Can you open an issue here -> https://github.com/InfotelGLPI/accounts/issues
about
Key error is not handled in network devices conversion
An issue is already open here
https://github.com/glpi-project/glpi/issues/14943
is the agent configured to send inventory to GLPI or to the GLPIInventory plugin?
(server
arg from agent.cfg
)
As said in GLPI ticket, this is a plugin issue, so we'll keep this one open. As far as I see in logs, this attempt has been made against glpiinventory plugin (please confirm @waaalex )
@trasher yes I confirm. Thanks.
Hi @waaalex
about
[2023-09-06 17:16:41] glpiphplog.WARNING: *** PHP User Warning (512): Invalid relations declared for "glpi_plugin_accounts_accountstates" table. Target table "glpi_plugin_accounts_mailingstates" does not correspond to a known itemtype. in /var/www/html/glpi/src/DbUtils.php at line 2111
Can you open an issue here -> https://github.com/InfotelGLPI/accounts/issues
Ok I will make another issue
As said in GLPI ticket, this is a plugin issue, so we'll keep this one open. As far as I see in logs, this attempt has been made against glpiinventory plugin (please confirm @waaalex )
The clue is, even on errors, the agent submits a XML that looks like an inventory (sorry for that, this is historic): as the test l.48 in front/communication.php is still false in that case, the plugin will default to pass the request to native inventory on l.72 same file. If we decide to handle the problem on the plugin, this means we will most of the time (when not an error) decode the XML 2 times: one time in the plugin to check if we have an error, and when not an error, one more time in native inventory. Do we really want to use that not optimized path ?
As far as I remember, plugin should have handled those errors. But debugging all this stuff is a nightmare, I've not been able to have something working (as usual...).
Native inventory does not handle newtork inventories/discoveries communication. Until this changes, all related stuff must be handled plugin side.
@waaalex
can you try this :
inventory_format
to allow <ERROR>
node from netinventory
you need to update this file
GLPI/vendor/glpi-project/inventory_format/inventory.schema.json
according to this -> https://github.com/glpi-project/inventory_format/pull/121
update glpiinventory
plugin according to this -> https://github.com/glpi-project/glpi-inventory-plugin/pull/402/files1
reset OPCache if needed (php bin/console cache:clear
)
Then retry =)
Best regards
I have updated inventory.schema.json according to point 1. But i don't understand what to do for point 2. Link is the same as point 1 and there is no update for glpiinventory plugin.
EDIT : Do i have to update inc/communicationnetworkinventory.class.php according to this > https://github.com/glpi-project/glpi-inventory-plugin/pull/402/files ?
Regards.
Yes (sorry)
I've updated my comment
and added command to reset OPCache
Done. I also restarted apache but same error on agent log.
[Fri Sep 8 09:50:46 2023][info] running task NetInventory
[Fri Sep 8 09:51:03 2023][error] [thread 62] #04, [thread 62] SNMP communication error: no response from host 10.0.3.13
[Fri Sep 8 09:51:03 2023][error] [thread 61] #09, [thread 61] SNMP communication error: no response from host 10.0.3.8
[Fri Sep 8 09:51:03 2023][error] [thread 57] #01, [thread 57] SNMP communication error: no response from host 10.0.3.14
[Fri Sep 8 09:51:03 2023][error] [thread 64] #05, [thread 64] SNMP communication error: no response from host 10.0.3.6
[Fri Sep 8 09:51:03 2023][error] [thread 60] #03, [thread 60] SNMP communication error: no response from host 10.0.3.12
[Fri Sep 8 09:51:03 2023][error] [thread 56] #10, [thread 56] SNMP communication error: no response from host 10.0.3.7
[Fri Sep 8 09:51:03 2023][error] [thread 62] #04, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 09:51:03 2023][error] [thread 65] #06, [thread 65] SNMP communication error: no response from host 10.0.3.5
[Fri Sep 8 09:51:03 2023][error] [thread 63] #07, [thread 63] SNMP communication error: no response from host 10.0.3.3
[Fri Sep 8 09:51:04 2023][error] [thread 58] #08, [thread 58] SNMP communication error: no response from host 10.0.3.4
[Fri Sep 8 09:51:04 2023][error] [thread 61] #09, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 09:51:04 2023][error] [thread 57] #01, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 09:51:04 2023][error] [thread 64] #05, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 09:51:04 2023][error] [thread 58] #08, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 09:51:04 2023][error] [thread 60] #03, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 09:51:04 2023][error] [thread 56] #10, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 09:51:04 2023][error] [thread 65] #06, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 09:51:04 2023][error] [thread 63] #07, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 09:51:16 2023][error] [thread 59] #11, [thread 59] SNMP communication error: no response from host 10.0.3.11
[Fri Sep 8 09:51:16 2023][error] [thread 59] #11, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 09:51:18 2023][error] [thread 62] #12, [thread 62] SNMP communication error: no response from host 10.0.3.1
[Fri Sep 8 09:51:19 2023][error] [thread 61] #13, [thread 61] SNMP communication error: no response from host 10.0.3.23
[Fri Sep 8 09:51:19 2023][error] [thread 62] #12, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 09:51:19 2023][error] [thread 61] #13, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 09:51:21 2023][info] running task Deploy
[Fri Sep 8 09:51:21 2023][info] No Deploy job enabled or Deploy support disabled server side.
is the agent configured to send inventory to GLPI or to the GLPIInventory plugin?
(server arg from agent.cfg)
It seems that the changes made by
https://github.com/glpi-project/inventory_format/pull/121
Are not applied correctly
to the to the GLPIInventory plugin https://glpi/glpi/plugins/glpiinventory/
Ho sorry I forgot a commit
same issue. I cleared chace and restart httpd.
[Fri Sep 8 10:03:44 2023][info] running task NetInventory
[Fri Sep 8 10:04:02 2023][error] [thread 75] #03, [thread 75] SNMP communication error: no response from host 10.0.3.12
[Fri Sep 8 10:04:02 2023][error] [thread 81] #05, [thread 81] SNMP communication error: no response from host 10.0.3.6
[Fri Sep 8 10:04:02 2023][error] [thread 78] #04, [thread 78] SNMP communication error: no response from host 10.0.3.13
[Fri Sep 8 10:04:02 2023][error] [thread 77] #10, [thread 77] SNMP communication error: no response from host 10.0.3.7
[Fri Sep 8 10:04:02 2023][error] [thread 72] #01, [thread 72] SNMP communication error: no response from host 10.0.3.14
[Fri Sep 8 10:04:02 2023][error] [thread 75] #03, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 10:04:02 2023][error] [thread 73] #06, [thread 73] SNMP communication error: no response from host 10.0.3.5
[Fri Sep 8 10:04:02 2023][error] [thread 76] #09, [thread 76] SNMP communication error: no response from host 10.0.3.8
[Fri Sep 8 10:04:02 2023][error] [thread 80] #08, [thread 80] SNMP communication error: no response from host 10.0.3.4
[Fri Sep 8 10:04:02 2023][error] [thread 81] #05, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 10:04:02 2023][error] [thread 79] #07, [thread 79] SNMP communication error: no response from host 10.0.3.3
[Fri Sep 8 10:04:02 2023][error] [thread 78] #04, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 10:04:02 2023][error] [thread 77] #10, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 10:04:02 2023][error] [thread 72] #01, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 10:04:02 2023][error] [thread 73] #06, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 10:04:02 2023][error] [thread 76] #09, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 10:04:02 2023][error] [thread 80] #08, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 10:04:02 2023][error] [thread 79] #07, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 10:04:11 2023][error] [thread 74] #11, [thread 74] SNMP communication error: no response from host 10.0.3.11
[Fri Sep 8 10:04:11 2023][error] [thread 74] #11, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 10:04:17 2023][error] [thread 75] #12, [thread 75] SNMP communication error: no response from host 10.0.3.1
[Fri Sep 8 10:04:17 2023][error] [thread 81] #13, [thread 81] SNMP communication error: no response from host 10.0.3.23
[Fri Sep 8 10:04:17 2023][error] [thread 75] #12, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 10:04:17 2023][error] [thread 81] #13, [http client] communication error: 500 Internal Server Error, Key error is not handled in network devices conversion
[Fri Sep 8 10:04:22 2023][info] running task Deploy
[Fri Sep 8 10:04:22 2023][info] No Deploy job enabled or Deploy support disabled server side.
[Fri Sep 8 10:04:24 2023][info] target server0: next run: Sat Sep 9 09:23:24 2023 - https://glpi/glpi/plugins/glpiinventory/
I'm really running out of coffee !!
Can you revert last change and apply this
Not the same error but it does not work.
[Fri Sep 8 10:17:39 2023][info] running task NetInventory
[Fri Sep 8 10:17:57 2023][error] [thread 88] #03, [thread 88] SNMP communication error: no response from host 10.0.3.12
[Fri Sep 8 10:17:57 2023][error] [thread 89] #01, [thread 89] SNMP communication error: no response from host 10.0.3.14
[Fri Sep 8 10:17:57 2023][error] [thread 94] #07, [thread 94] SNMP communication error: no response from host 10.0.3.3
[Fri Sep 8 10:17:57 2023][error] [thread 91] #10, [thread 91] SNMP communication error: no response from host 10.0.3.7
[Fri Sep 8 10:17:57 2023][error] [thread 92] #06, [thread 92] SNMP communication error: no response from host 10.0.3.5
[Fri Sep 8 10:17:57 2023][error] [thread 93] #04, [thread 93] SNMP communication error: no response from host 10.0.3.13
[Fri Sep 8 10:17:57 2023][error] [thread 96] #05, [thread 96] SNMP communication error: no response from host 10.0.3.6
[Fri Sep 8 10:17:57 2023][error] [thread 95] #09, [thread 95] SNMP communication error: no response from host 10.0.3.8
[Fri Sep 8 10:17:57 2023][error] [thread 89] #01, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep 8 10:17:57 2023][error] [thread 88] #03, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep 8 10:17:57 2023][error] [thread 97] #08, [thread 97] SNMP communication error: no response from host 10.0.3.4
[Fri Sep 8 10:17:57 2023][error] [thread 94] #07, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep 8 10:17:57 2023][error] [thread 93] #04, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep 8 10:17:57 2023][error] [thread 91] #10, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep 8 10:17:57 2023][error] [thread 96] #05, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep 8 10:17:57 2023][error] [thread 95] #09, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep 8 10:17:57 2023][error] [thread 92] #06, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep 8 10:17:57 2023][error] [thread 97] #08, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep 8 10:18:07 2023][error] [thread 90] #11, [thread 90] SNMP communication error: no response from host 10.0.3.11
[Fri Sep 8 10:18:07 2023][error] [thread 90] #11, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep 8 10:18:12 2023][error] [thread 88] #13, [thread 88] SNMP communication error: no response from host 10.0.3.23
[Fri Sep 8 10:18:12 2023][error] [thread 89] #12, [thread 89] SNMP communication error: no response from host 10.0.3.1
[Fri Sep 8 10:18:12 2023][error] [thread 88] #13, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep 8 10:18:12 2023][error] [thread 89] #12, [http client] communication error: 500 Internal Server Error, Glpi\Toolbox\Sanitizer::isNsClassOrCallableIdentifier(): Argument #1 ($value) must be of type string, stdClass given, called in /var/www/html/glpi/src/DBmysql.php on line 1287
[Fri Sep 8 10:18:17 2023][info] running task Deploy
[Fri Sep 8 10:18:17 2023][info] No Deploy job enabled or Deploy support disabled server side.
[Fri Sep 8 10:18:19 2023][info] target server0: next run: Sat Sep 9 09:57:30 2023 - https://glpi/glpi/plugins/glpiinventory/
[Fri Sep 8 10:18:19 2023][info] GLPI Agent memory usage: WSS=3395584 PFU=262148096
OK, the XML is correctly converted and sent to the plugin
But the plugin can't handle the error
I look at
Ok
can you revert changes from glpiinventory plugin and apply this
https://github.com/glpi-project/glpi-inventory-plugin/pull/402/files
I go to a meeting. I'm taking the test this afternoon. thanks.
Ok, one of switches have made a report. For others :
[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
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.
It was working with fusioninventory agent and plugin. Have you got an idea about that?
For me it's another problm, please open new issue to close this one
Describe the bug
When i launch netinventory from web ui, inventory does not work.
From this command it works :
C:\Program Files\GLPI-Agent>glpi-netinventory.bat --host 10.0.3.2 --credentials version:3,username:snmp,authprotocol:md5,authpassword:a,privprotocol:aes,privpassword:a
Log from glpi agent:
In php error log :
To reproduce
Expected behavior
Should work without error messages.
Operating system
Linux
GLPI Agent version
1.5
GLPI version
10.0.9
GLPIInventory plugin
1.2.3
Additional context
same as : https://github.com/glpi-project/glpi/issues/15534 this does not helped me : https://github.com/glpi-project/glpi/issues/14943