glpi-project / glpi-inventory-plugin

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

ESXI inventory does not work #456

Closed waaalex closed 10 months ago

waaalex commented 10 months ago

Describe the bug

Hello, Unable to work with esxi inventory. With glpi-esx and glpi-injector command lines, it is ok. I can make a script but i would like to use glpi agent. You will see error in attachment. I can't find log. Regards. Alex.

To reproduce

  1. make authentication for remote Vmware
  2. remote device for inventoring (vmware)
  3. make a job and start it

Expected behavior

It should work with that settings.

Operating system

Linux

GLPI Agent version

1.6.1

GLPI version

10.0.10

GLPIInventory plugin

1.3.3

Additional context

errreur ESXI

stonebuzz commented 10 months ago

Hi @waaalex

Can you activate the agent's debug mode 2 and retry? (then provide us with the agent's logs)

Can you also look in the GLPI logs You can find them in GLPI/files/_log/ (sql-error.log and php-error.log)

Best regards

waaalex commented 10 months ago

Hello, OK, thanks, nothing to use in sql-erro and php-error. I put a summary of inventory. It has worked, i can find my esxi. I had to search by name and not by IP (my custom view was not good). Job shows me an error but it seems to be a bug with WebUI.

In agent log : [Tue Dec 19 15:17:38 2023][debug2] [http client] 401B4497: received message: {"expiration":"24","status":"ok"}

Regards. INV.txt

stonebuzz commented 10 months ago

Unfortunately I don't have any ESX at hand.

I won't be able to debug.

Perhaps you could send me an SQL dump of the tables prefixed with glpi_plugin_glpiinventory

I could then have a look at

Best regards

waaalex commented 10 months ago

Hello, Here is tables you want. Thanks !

Glpi_inv.zip

stonebuzz commented 10 months ago

I can't find this task

image

I only have "CARQ_ESXI" without any error from job log tab

waaalex commented 10 months ago

Yes i have renamed ESXI task. Now it is CARQ_ESXI. I still have error on web_ui Capture

EDIT: Job is working well. I think it something with WEbUI or with my configuration.

stonebuzz commented 10 months ago

I can't make it work on my environment, I'm missing data (agent, asset etc...).

Job is working well. I think it something with WEbUI or with my configuration.

I also think, but as it is, I'm stuck (no remote acces, no ESX) .

Best regards

stonebuzz commented 10 months ago

Perhaps you have the development skills to debug

waaalex commented 10 months ago

Perhaps you have the development skills to debug

Unfortunately no :/

g-bougard commented 10 months ago

Hi @waaalex

checking your inventory log and the code, it appears to me this can be a problem with last glpi-agent version:

Can you test with glpi-agent 1.5 ?

g-bougard commented 10 months ago

I was about to release glpi-agent 1.7 tomorrow. You can wait for it as it will include a fix. You can also validate the fixed development build before the release as you can get it from here: https://github.com/glpi-project/glpi-agent/actions/runs/7273593913

waaalex commented 10 months ago

Hello @g-bougard I will test tomorrow with 1.7 agent. Thanks.

waaalex commented 10 months ago

Hello, Updated to 1.7 but ssl seems to block

`[Thu Dec 21 16:20:21 2023][info] sending prolog request to server0
[Thu Dec 21 16:20:21 2023][error] [http client] internal response: 500 Can't connect to glpi:443 (Bad file descriptor), SSL connect attempt failed error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
[Thu Dec 21 16:20:21 2023][error] No supported answer from server at https://glpi/glpi/plugins/glpiinventory/
[Thu Dec 21 16:20:21 2023][info] target server0: next run: Thu Dec 21 16:36:21 2023 - https://glpi/glpi/plugins/glpiinventory/`

Back to 1.6.1 : It works with n/a error message. Server plugin is 1.3.3, shall i have to update this too?

PS : Tomorrow i will test an update glpi 10.0.11 with updated plugins and newer agent. Thanks.

g-bougard commented 10 months ago

Hi @waaalex you may have failed to update the agent. Here you have an error on not verified certificate and this is just probably a misconfiguration issue.

waaalex commented 10 months ago

Hello, Tested with glpi 10.0.11, inventory 1.3.4 and agent 1.7 For ESXi bug >>> OK! no more issue on Web UI. For ssl >>> KO. same issue

It is working with no-ssl-check to 0 but agent will not check ssl cert when shift registry key to 1. Maybe it the same issue as (agent seems to not verify on windows keystore) : https://github.com/glpi-project/glpi-agent/issues/105 https://github.com/glpi-project/glpi-agent/issues/108

I have just updated agent with msi package. When i come back to 1.6.1, it is ok. Regards.

stonebuzz commented 10 months ago

For ESXi bug >>> OK! no more issue on Web UI.

:+1: