glpi-project / glpi-inventory-plugin

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

Running task Deploy - [error] [http client] Can't decode JSON content, starting with #475

Closed mauriciolamego closed 7 months ago

mauriciolamego commented 7 months ago

Describe the bug

I am trying to use the software deployment module but it is showing the following error in the target asset log. the package has the target and group configured, and the deploy module enabled on the asset agents and on the server. As a result, the installation does not start. image image

To reproduce

enable the client-side deploy module enable the server-side deploy module create computer group create software package Select Deployment Target Go to Target and select the available software package Force client side to start service see the expected results by following the log.

Expected behavior

As a result, the installation does not start.

Operating system

Windows

GLPI Agent version

1.7.1

GLPI version

10.0.11

GLPIInventory plugin

1.3.4

Additional context

LOG:

[Sat Feb 10 09:40:24 2024][info] running task Deploy [Sat Feb 10 09:40:24 2024][error] [http client] Can't decode JSON content, starting with:

<!DOCTYPE html>

Autentica....o - GLPI ... [Sat Feb 10 09:40:24 2024][info] Deploy task not supported by server0
g-bougard commented 7 months ago

Hi @mauriciolamego

you probably set a wrong url on glpi-agent side, check the Caution note on this documentation: https://glpi-agent.readthedocs.io/en/latest/configuration.html#server

mauriciolamego commented 7 months ago

Thanks for the answer! Do you consider it to be wrong even though the inventory is functioning normally?

image

VeniooSEPM commented 7 months ago

I got exactly the same issue. Inventory assets etc. works fine. Only 'GLPI Inventory plugin' Deployment module does not work.

GLPI 10.0.12 (on Ubuntu 22.04, PHP 8.1.2, MariaDB) GLPI Agent 1.7.1 (Win10 64b) GLPI Inventory 1.3.5 (plugin)

mauriciolamego commented 7 months ago

Dear all, I really appreciate your work. I could not review this reported problem, as the URL is working normally, so much so that the inventory is reporting normally.

g-bougard commented 7 months ago

Hi @mauriciolamego

as this is explained in the doc I pointed to you, for some tasks (Collect & Deploy included), the url set on agent for server MUST include /marketplace/glpiinventory/ or /plugins/glpiinventory/ depending on your plugin installation mode: the first if you installed the plugin via marketplace. And in your last screenshot, I see your url is only valid for inventory, netdiscovery and netinventory tasks.

VeniooSEPM commented 7 months ago

@mauriciolamego I resolved this problem Today as follows: you should add another server address in your Windows registry (limited by comma), in my case

image

Now everything works perfect. Remember to restart agent service after registry change!

mauriciolamego commented 7 months ago

Thanks for all. It's Works fine.