You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2023-03-15 14:12:34

PhilSupex
Member
Registered: 2023-03-15
Posts: 1

Plugin Proxy de l'agent 1.4 sur Windows : erreur 404 Unknown status

Bonjour, Je fais actuellement des tests sur le plugIn Proxy et ça ne fonctionne pas correctement.

J'ai 3 ordinateurs:
•    GLPI Serveur :  MyGLPIserver  (sous Linux, pas de problèmes pour la remontée des inventaires depuis des Windows)
•    Ordi avec le plugin Proxy activé : MyGLPIProxy (Sous Windows)
•    Ordi Test client  : MyClient (10.2.58.10) (Sous Windows)
Pour mon test, les 3 ordinateurs se "voient" d'un point de vue réseau.

versions GLPI:
•    GLPI Serveur version :  10.0.3
•    GlpiAgent Version 1.4

Sur MyGLPIProxy, les paramètres du fichier proxy-server-plugin sont laissés par défaut (hors activation):

Sur la config de l'agent sur MyGLPIProxy on a : server = https://MyGLPIserver ->    l'inventaire de MyGLPIProxy remonté sur MyGLPIserver est OK

Si sur la config de l'agent sur MyClient on a : server = https://MyGLPIserver (c'est à dire sans passer par le proxy) ->    l'inventaire de MyClient remonté sur MyGLPIserver est OK

Mais si sur la config de l'agent sur MyClient on a : server = http://MyGLPIProxy:62354/proxy/glpi -> l'inventaire de MyClient n'est pas remonté sur MyGLPIserver :

Le client et le proxy on d'abord l'air de vouloir discuter, puis ça fini systématiquement par une erreur 404 Unknown status

Voici le log coté MyClient :

[Fri Mar 10 13:08:16 2023][info] target server0: server http://MyGLPIProxy:62354/proxy/glpi
[Fri Mar 10 13:08:16 2023][debug] [http client] Using Compress::Zlib for compression
[Fri Mar 10 13:08:16 2023][info] sending prolog request to server0
[Fri Mar 10 13:08:16 2023][debug2] [http client] sending message:
<?xml version="1.0" encoding="UTF-8" ?>
<REQUEST>
  <DEVICEID>MyClient-2023-03-09-15-03-51</DEVICEID>
  <QUERY>PROLOG</QUERY>
  <TOKEN>12345678</TOKEN>
</REQUEST>
[Fri Mar 10 13:08:17 2023][debug2] format: JSON
[Fri Mar 10 13:08:17 2023][debug2] [http client] receiving message:
{
   "expiration": 0,
   "status": "pending"
}
[Fri Mar 10 13:08:17 2023][debug] Got GLPI CONTACT pending answer
[Fri Mar 10 13:08:17 2023][info] server0 answer shows it supports GLPI Agent protocol
[Fri Mar 10 13:08:17 2023][info] target server0: server http://MyGLPIProxy:62354/proxy/glpi
[Fri Mar 10 13:08:17 2023][debug] [http client] 5EBED0E7: Using Compress::Zlib for compression
[Fri Mar 10 13:08:17 2023][info] sending contact request to server0
[Fri Mar 10 13:08:17 2023][debug2] [http client] 5EBED0E7: sending message:
{
   "action": "contact",
   "deviceid": "MyClient-2023-03-09-15-03-51",
   "enabled-tasks": [
      "collect",
      "deploy",
      "inventory",
      "remoteinventory"
   ],
   "httpd-plugins": {
      "inventory": "disabled",
      "proxy": "disabled",
      "secondaryproxy": "disabled",
      "ssl": "disabled",
      "test": "disabled",
      "toolbox": "disabled"
   },
   "httpd-port": "62354",
   "installed-tasks": [
      "collect",
      "deploy",
      "inventory",
      "remoteinventory"
   ],
   "name": "GLPI-Agent",
   "version": "1.4"
}
[Fri Mar 10 13:08:17 2023][debug2] [http client] 5EBED0E7: received message:
{
   "expiration": "10s",
   "status": "pending"
}
[Fri Mar 10 13:08:27 2023][debug2] [http client] 5EBED0E7: retry request after pending status
[Fri Mar 10 13:08:27 2023][error] [http client] communication error: 404 Unknown status
[Fri Mar 10 13:08:27 2023][debug2] [http client] received message:
Unknown status
[Fri Mar 10 13:08:27 2023][error] [http client] unexpected content, starting with: Unknown status
[Fri Mar 10 13:08:27 2023][error] No answer from server at http://MyGLPIProxy:62354/proxy/glpi
[Fri Mar 10 13:08:27 2023][info] target server0: next run: Fri Mar 10 14:08:27 2023 - http://MyGLPIProxy:62354/proxy/glpi
[Fri Mar 10 13:08:27 2023][debug] Agent memory usage before freeing memory: WSS=19865600 PFU=115437568



Et voici le log coté MyGLPIProxy:

[Fri Mar 10 13:08:16 2023][debug] [http server] POST request /proxy/glpi from client 10.2.58.10
[Fri Mar 10 13:08:16 2023][debug2] [proxy server plugin] application/x-compress-zlib type request from 10.2.58.10
[Fri Mar 10 13:08:16 2023][debug] [proxy server plugin] Got legacy PROLOG request from b48d5619-6d06-1014-ac35-884b10188ed5@10.2.58.10
[Fri Mar 10 13:08:16 2023][debug] [proxy server plugin] Answering to b48d5619-6d06-1014-ac35-884b10188ed5@10.2.58.10 client to immediatly use GLPI protocol
[Fri Mar 10 13:08:16 2023][debug] [http server] response status 202
[Fri Mar 10 13:08:17 2023][debug] [http server] POST request /proxy/glpi from client 10.2.58.10
[Fri Mar 10 13:08:17 2023][debug2] [proxy server plugin] 5EBED0E7: application/x-compress-zlib type request from 10.2.58.10
[Fri Mar 10 13:08:17 2023][debug] [proxy server plugin] 5EBED0E7: contact proxy request from 10.2.58.10, agentid is b48d5619-6d06-1014-ac35-884b10188ed5
[Fri Mar 10 13:08:17 2023][debug] [http client] D5EAC0B8: Using Compress::Zlib for compression
[Fri Mar 10 13:08:17 2023][debug] [proxy server plugin] 5EBED0E7: Submitting contact from b48d5619-6d06-1014-ac35-884b10188ed5@10.2.58.10 to https://MyGLPIserver/front/inventory.php
[Fri Mar 10 13:08:17 2023][debug2] [http client] D5EAC0B8: sending message:
{
   "action": "contact",
   "deviceid": "MyClient-2023-03-09-15-03-51",
   "enabled-tasks": [
      "collect",
      "deploy",
      "inventory",
      "remoteinventory"
   ],
   "httpd-plugins": {
      "inventory": "disabled",
      "proxy": "disabled",
      "secondaryproxy": "disabled",
      "ssl": "disabled",
      "test": "disabled",
      "toolbox": "disabled"
   },
   "httpd-port": "62354",
   "installed-tasks": [
      "collect",
      "deploy",
      "inventory",
      "remoteinventory"
   ],
   "name": "GLPI-Agent",
   "version": "1.4"
}
[Fri Mar 10 13:08:17 2023][debug] [http client] Updating keystore known certificates
[Fri Mar 10 13:08:17 2023][debug2] Changing to 'C:/Program Files/GLPI-Agent/var/keystore-export-raB8Kf' temporary folder
[Fri Mar 10 13:08:17 2023][debug2] executing certutil -Store -Silent -Split
[Fri Mar 10 13:08:18 2023][debug2] executing certutil -Store -Silent -Enterprise -Split
[Fri Mar 10 13:08:18 2023][debug2] executing certutil -encode 109f1caed645bb78b3ea2b94c0697c740733031c.crt temp.cer
[Fri Mar 10 13:08:18 2023][debug2] executing certutil -encode 27507acf4cb393a8ae5e912ca1a85af42163e9dd.crt temp.cer
[Fri Mar 10 13:08:18 2023][debug2] executing certutil -encode 4c27431717565a3a07f3e6d0032c4258949cf9ec.crt temp.cer
[Fri Mar 10 13:08:18 2023][debug2] executing certutil -encode 8e4e8dd899b7bb941eaa86fe1d91f04afafc524e.crt temp.cer
[Fri Mar 10 13:08:18 2023][debug2] executing certutil -encode 9afc35ee7f9df0d8073f87b84aff88e9fd69b314.crt temp.cer
[Fri Mar 10 13:08:18 2023][debug2] executing certutil -encode d559a586669b08f46a30a133f8a9ed3d038e2ea8.crt temp.cer
[Fri Mar 10 13:08:18 2023][debug2] executing certutil -encode f1103bb76a0f49c4b033b0314c0f5d8ef60cf629.crt temp.cer
[Fri Mar 10 13:08:18 2023][debug2] executing certutil -encode f4879b83950d92c63fa95a75f4682bf224edd718.crt temp.cer
[Fri Mar 10 13:08:18 2023][debug2] executing certutil -encode fee449ee0e3965a5246f000e87fde2a065fd89d4.crt temp.cer
[Fri Mar 10 13:08:18 2023][debug2] Changing back to 'C:/Program Files/GLPI-Agent/perl/bin' folder
[Fri Mar 10 13:08:18 2023][debug2] format: Zlib
[Fri Mar 10 13:08:18 2023][debug2] [http client] D5EAC0B8: received message:
{"message":"remoteinventory task not supported","disabled":["remoteinventory"],"expiration":"24","status":"ok","tasks":{"collect":{"version":"1.0.4","server":"glpiinventory"},"deploy":{"version":"1.0.4","server":"glpiinventory"},"inventory":{"server":"glpi","version":"10.0.3"}}}
[Fri Mar 10 13:08:19 2023][debug] [proxy server plugin] 5EBED0E7: Setting prolog_freq to 86400
[Fri Mar 10 13:08:19 2023][info] [proxy server plugin] 5EBED0E7: b48d5619-6d06-1014-ac35-884b10188ed5@10.2.58.10 contact submitted to https://MyGLPIserver/front/inventory.php
[Fri Mar 10 13:08:19 2023][debug] [http server] response status 200
[Fri Mar 10 13:08:27 2023][debug] [http server] GET request /proxy/glpi from client 10.2.58.10
[Fri Mar 10 13:08:27 2023][debug2] [proxy server plugin] 5EBED0E7: application/x-compress-zlib type request from 10.2.58.10
[Fri Mar 10 13:08:27 2023][debug] [proxy server plugin] 5EBED0E7: Asked for 5EBED0E7 request status from b48d5619-6d06-1014-ac35-884b10188ed5@10.2.58.10
[Fri Mar 10 13:08:27 2023][info] [proxy server plugin] 5EBED0E7: Unknown 5EBED0E7 request status for b48d5619-6d06-1014-ac35-884b10188ed5@10.2.58.10
[Fri Mar 10 13:08:27 2023][debug] [http server] response status 404

De plus, sur le proxy, j'ai testé avec only_local_store = yes, et dans ce cas, l'inventaire du client est bien remonté et stocké sur le proxy.

Bref :  Client -> Proxy  = Ok, Proxy -> Server = Ok, Client -> Server = Ok ,
mais Client -> Proxy -> Server ne fonctionne pas chez moi alors que c'est justement pour ça qu'on installe un proxy!

Si quelqu'un a une idée...

Merci,

Philippe

Offline

Board footer

Powered by FluxBB