glpi-project / glpi-agent

GLPI Agent
GNU General Public License v2.0
212 stars 51 forks source link

Computer not imported with Glpi-Agent-1.7.3 on ubuntu 22.04 toward Glpi 10.0.12 #646

Closed Mdaniel2019 closed 2 months ago

Mdaniel2019 commented 2 months ago

Bug reporting acknowledgment

Yes, I read it

Professional support

I still have but want a public following to keep the community aware

Describe the bug

Les erreurs suivantes sont rapportée.

[http client] communication error: 403 Forbidden  
No supported answer from serveur at https://mon_serveur/marketplace/glpiiventory/

L'adresse du plugin sur mon serveur est correcte et accessible:

https://mon_serveur/marketplace/glpiinventory/front/menu.php

Je n'arrive pas comprendre d'où vient le problème. j'ai installé la version de l'agent 1.7, 1.7.1, 1.7.3 sur 10 PC et un seule m'envoie cette erreur.

To reproduce

installation de l'agent sur un ubuntu 22.04 LTS

  1. sudo perl glpi-agent-{Version}.pl --install -s https://mon_serveur/marketplace/glpiinventory/ -t ECO --no-ssl-check
  2. sudo glpi-agent

Expected behavior

[error][http client] communication error: 403 Forbidden  
[error] No supported answer from serveur at https://mon_serveur/marketplace/glpiiventory/

Operating system

Linux

GLPI Agent version

1.7.3

GLPI version

10.0.12

GLPIInventory plugin or other plugin version

GLPI Inventory v1.3.5

Additional context

Operating system: Linux SRV-Mon_serveur 6.1.0-18-amd64 #​1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64
PHP 8.2.7 apache2handler (Core, FFI, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apache2handler, apcu, bz2, calendar,
    ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, intl, json, ldap, libxml, mbstring, mysqli,
    mysqlnd, openssl, pcre, pdo_mysql, posix, random, readline, session, shmop, sockets, sodium, standard, sysvmsg, sysvsem,
    sysvshm, tokenizer, xml, xmlreader, xmlwriter, xsl, zip, zlib)
Setup: max_execution_time="30" memory_limit="128M" post_max_size="8M" safe_mode="" session.save_handler="files"
    upload_max_filesize="2M" disable_functions="" 
Software: Apache/2.4.57 (Debian) (Apache/2.4.57 (Debian) Server at Mon_serveur Port 443
)
    Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0
Server Software: Debian 12
    Server Version: 10.11.6-MariaDB-0+deb12u1
    Server SQL Mode: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
    Parameters: glpiuser@localhost/glpi
    Host info: Localhost via UNIX socket

PHP version (8.2.7) is supported.PHP version (8.2.7) is supported.
Sessions configuration is OK.Sessions configuration is OK.
Allocated memory is sufficient.Allocated memory is sufficient.
mysqli extension is installed.mysqli extension is installed.
Following extensions are installed: dom, fileinfo, filter, libxml, json, simplexml, xmlreader, xmlwriter.Following extensions are installed: dom, fileinfo, filter, libxml, json, simplexml, xmlreader, xmlwriter.
curl extension is installed.curl extension is installed.
gd extension is installed.gd extension is installed.
intl extension is installed.intl extension is installed.
zlib extension is installed.zlib extension is installed.
The constant SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES is present.The constant SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES is present.
Database engine version (10.11.6) is supported.Database engine version (10.11.6) is supported.
No files from previous GLPI version detected.No files from previous GLPI version detected.
The log file has been created successfully.The log file has been created successfully.
Write access to /var/www/html/glpi/files/_cache has been validated. Write access to /var/www/html/glpi/files/_cron has been validated. Write access to /var/www/html/glpi/files has been validated. Write access to /var/www/html/glpi/files/_dumps has been validated. Write access to /var/www/html/glpi/files/_graphs has been validated. Write access to /var/www/html/glpi/files/_lock has been validated. Write access to /var/www/html/glpi/files/_pictures has been validated. Write access to /var/www/html/glpi/files/_plugins has been validated. Write access to /var/www/html/glpi/files/_rss has been validated. Write access to /var/www/html/glpi/files/_sessions has been validated. Write access to /var/www/html/glpi/files/_tmp has been validated. Write access to /var/www/html/glpi/files/_uploads has been validated.Write access to /var/www/html/glpi/files/_cache has been validated.
Write access to /var/www/html/glpi/files/_cron has been validated.
Write access to /var/www/html/glpi/files has been validated.
Write access to /var/www/html/glpi/files/_dumps has been validated.
Write access to /var/www/html/glpi/files/_graphs has been validated.
Write access to /var/www/html/glpi/files/_lock has been validated.
Write access to /var/www/html/glpi/files/_pictures has been validated.
Write access to /var/www/html/glpi/files/_plugins has been validated.
Write access to /var/www/html/glpi/files/_rss has been validated.
Write access to /var/www/html/glpi/files/_sessions has been validated.
Write access to /var/www/html/glpi/files/_tmp has been validated.
Write access to /var/www/html/glpi/files/_uploads has been validated.

Web server root directory configuration seems safe.Web server root directory configuration seems safe.
Sessions configuration is secured.Sessions configuration is secured.
OS and PHP are relying on 64 bits integers.OS and PHP are relying on 64 bits integers.
exif extension is installed.exif extension is installed.
ldap extension is installed.ldap extension is installed.
openssl extension is installed.openssl extension is installed.
Following extensions are installed: bz2, Phar, zip.Following extensions are installed: bz2, Phar, zip.
Zend OPcache extension is installed.Zend OPcache extension is installed.
Following extensions are installed: ctype, iconv, mbstring, sodium.Following extensions are installed: ctype, iconv, mbstring, sodium.
Write access to /var/www/html/glpi/marketplace has been validated.Write access to /var/www/html/glpi/marketplace has been validated.
Timezones seems loaded in database.Timezones seems loaded in database. 
g-bougard commented 2 months ago

Hi @Mdaniel2019

can you share the output of the following command run in an admin console on the computer which is not imported ?

sudo glpi-agent --logger=stderr --debug --debug --force
Mdaniel2019 commented 2 months ago
[debug] Logger backend Stderr initialized
[debug] GLPI Agent (1.7.3-1)
[debug] Configuration directory: /etc/glpi-agent
[debug] Data directory: /usr/share/glpi-agent
[debug] Storage directory: /var/lib/glpi-agent
[debug] Lib directory: /usr/share/glpi-agent/lib
[debug] [target server0] Next server contact planned for Thu May  2 14:45:02 2024
[debug2] getAvailableTasks() : add of task Inventory version 1.15
[debug2] getAvailableTasks() : add of task RemoteInventory version 1.4
[debug2] getAvailableTasks() : add of task WakeOnLan version 2.2
[debug] Available tasks:
[debug] - Inventory: 1.15
[debug] - RemoteInventory: 1.4
[debug] - WakeOnLan: 2.2
[debug] target server0: server https://glpi.ac.leroeulx.be/marketplace/glpiiventory/
[debug] Planned tasks for server0: RemoteInventory,WakeOnLan,Inventory
[debug] Built by Debian
[debug] Source time: 2024-04-03 09:48
[debug] Running in foreground mode
[info] target server0: server https://glpi.ac.leroeulx.be/marketplace/glpiiventory/
[debug2] [http client] Using Compress::Zlib for compression
[info] sending prolog request to server0
[debug2] [http client] sending message:
<?xml version="1.0" encoding="UTF-8"?>
<REQUEST>
  <DEVICEID>PC-ECO-10-2024-04-15-14-20-57</DEVICEID>
  <QUERY>PROLOG</QUERY>
  <TOKEN>12345678</TOKEN>
</REQUEST>
[info] [http client] SSL Client warning: Peer certificate not verified
[info] [http client] SSL Client info: Cert-Issuer: '/CN=SRV-DebWeb3', Cert-Subject: '/CN=SRV-DebWeb3', Version: 'TLSv1_3', Cipher: 'TLS_AES_256_GCM_SHA384'
[info] [http client] SSL server certificate fingerprint: sha256$bd000ac9e4f684b32b50226c2632712e14fc973f57032a3a4a392182689e5cdf
[info] [http client] You can set it in conf as 'ssl-fingerprint' and disable 'no-ssl-check' option to trust that server certificate
[error] [http client] communication error: 403 Forbidden
[error] No supported answer from server at https://glpi.ac.leroeulx.be/marketplace/glpiiventory/