glpi-project / glpi-agent

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

X509 cert: error with 1.8 #670

Closed tomamplius closed 1 month ago

tomamplius commented 1 month ago

Bug reporting acknowledgment

Yes, I read it

Professional support

None

Describe the bug

Log after install

[Thu May 16 04:03:01 2024][info] GLPI Agent service starting
[Thu May 16 04:03:02 2024][info] [http server] HTTPD service started on port 62354
[Thu May 16 04:03:05 2024][info] GLPI Agent memory usage: WSS=3657728 PFU=114032640
[Thu May 16 04:03:05 2024][info] target server0: next run: Thu May 16 04:03:01 2024 - https://glpi.domaine.com/marketplace/glpiinventory/
[Thu May 16 04:03:05 2024][info] target server0: server https://glpi.domaine.com/marketplace/glpiinventory/
[Thu May 16 04:03:05 2024][info] sending prolog request to server0
[Thu May 16 04:03:08 2024][error] cannot parse C:\Program Files\GLPI-Agent\perl\vendor\lib\Mozilla\CA\cacert.pem as PEM X509 cert: error:12800067:DSO support routines::could not load the shared library at C:/Program Files/GLPI-Agent/perl/agent/GLPI/Agent/HTTP/Client.pm line 494 thread 1.
[Thu May 16 04:03:08 2024][info] target server0: next run: Thu May 16 04:57:07 2024 - https://glpi.domaine.com/marketplace/glpiinventory/
[Thu May 16 04:57:07 2024][info] target server0: server https://glpi.domaine.com/marketplace/glpiinventory/
[Thu May 16 04:57:07 2024][info] sending prolog request to server0
[Thu May 16 04:57:10 2024][error] cannot parse C:\Program Files\GLPI-Agent\perl\vendor\lib\Mozilla\CA\cacert.pem as PEM X509 cert: error:12800067:DSO support routines::could not load the shared library at C:/Program Files/GLPI-Agent/perl/agent/GLPI/Agent/HTTP/Client.pm line 494 thread 1.
[Thu May 16 04:57:10 2024][info] target server0: next run: Thu May 16 05:51:34 2024 - https://glpi.domaine.com/marketplace/glpiinventory/
[Thu May 16 04:57:10 2024][info] GLPI Agent memory usage: WSS=3264512 PFU=124137472

To reproduce

install version 1.8

Expected behavior

Agent can contact server

Operating system

Windows

GLPI Agent version

1.8

GLPI version

10.0.15

GLPIInventory plugin or other plugin version

GLPI Inventory v1.3.5

Additional context

No response

MarcSamD commented 1 month ago

Very probably related to https://github.com/glpi-project/glpi-agent/issues/636

g-bougard commented 1 month ago

Hi @tomamplius

as for #636, can you share the output of the following command run as administrator and from GLPI-Agent installation folder ?

glpi-agent --logger=stderr --debug --debug --force --task=Collect

Also, check if you have an antivirus and if it has put files in quarantine. And verify you have not empty libssl-3__.dll & libcrypto-3__.dll files under C:\Program Files\GLPI-Agent\perl\bin.

There's another point to check, as in #536, do you have OpenSSL installed by another software like Win64OpenSSL_Light ? You may want to check for libssl-*.dll files on your systems. Can you share you PATH environment variable as it can show such kind of software is installed.

tomamplius commented 1 month ago

I m bad, i have quick check before create issue and i have not find #636

It is an upgrade from 1.7.3 to 1.8. It's work is i uninstall 1.8 to 1.7.3 and not work if i reinstall 1.8.

C:\>echo %PATH%
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\adm_thomas.legay\AppData\Local\Microsoft\WindowsApps
C:\>dir /S libssl*.dll
 Le volume dans le lecteur C n’a pas de nom.
 Le numéro de série du volume est FE94-AD97

 Répertoire de C:\Program Files\GLPI-Agent\perl\bin

14/05/2024  09:25         1 203 709 libssl-3__.dll
               1 fichier(s)        1 203 709 octets

 Répertoire de C:\Program Files (x86)\Microsoft Office\root\Office16\ODBC Drivers\Salesforce\lib\OpenSSL32.DllA

13/11/2023  11:55           948 296 libssl-1_1.dll
               1 fichier(s)          948 296 octets

 Répertoire de C:\Users\Admin\AppData\Local\Microsoft\OneDrive\23.246.1127.0002

04/01/2024  15:45           699 408 libssl-1_1-x64.dll
               1 fichier(s)          699 408 octets

 Répertoire de C:\Users\adm_thomas.xxxxxxx\AppData\Local\Microsoft\OneDrive\24.081.0421.0003

09/05/2024  22:13           699 408 libssl-1_1-x64.dll
               1 fichier(s)          699 408 octets

 Répertoire de C:\Users\xxxx.xxxxxxxx\AppData\Local\Microsoft\OneDrive\21.220.1024.0005

15/05/2024  10:03           545 128 libssl-1_1.dll
               1 fichier(s)          545 128 octets

 Répertoire de C:\Users\thomas.xxxxxxx\AppData\Local\Microsoft\OneDrive\24.086.0428.0003

16/05/2024  03:18           699 424 libssl-1_1-x64.dll
               1 fichier(s)          699 424 octets

     Total des fichiers listés :
               6 fichier(s)        4 795 373 octets
               0 Rép(s)  43 373 780 992 octets libres

They is no antivirus

C:\Program Files\GLPI-Agent\perl>dir bin
 Le volume dans le lecteur C n’a pas de nom.
 Le numéro de série du volume est FE94-AD97

 Répertoire de C:\Program Files\GLPI-Agent\perl\bin

16/05/2024  14:47    <DIR>          .
16/05/2024  14:47    <DIR>          ..
14/05/2024  09:07           147 982 dmidecode.exe
15/05/2024  09:55            21 552 glpi-agent
14/05/2024  09:36            83 968 glpi-agent.exe
14/05/2024  09:07           384 512 GLPI-AgentMonitor-x64.exe
15/05/2024  09:55            11 363 glpi-injector
15/05/2024  09:55             3 757 glpi-inventory
15/05/2024  09:55            28 031 glpi-remote
15/05/2024  09:55             2 725 glpi-win32-service
15/05/2024  09:55               775 glpi-win32-service.rc.sample
14/05/2024  09:07            52 224 hdparm.exe
14/05/2024  09:13            83 972 libcharset-1__.dll
14/05/2024  09:25         6 107 777 libcrypto-3__.dll
04/05/2024  10:31           727 958 libgcc_s_seh-1.dll
14/05/2024  09:13         1 058 740 libiconv-2__.dll
14/05/2024  09:12         1 081 917 liblzma-5__.dll
14/05/2024  09:28         1 310 770 libssh2-1__.dll
14/05/2024  09:25         1 203 709 libssl-3__.dll
04/05/2024  10:31         2 301 372 libstdc++-6.dll
04/05/2024  10:31            90 600 libwinpthread-1.dll
14/05/2024  09:27         1 469 653 libxml2-2__.dll
14/05/2024  09:36         3 190 272 perl538.dll
14/05/2024  09:10           146 446 zlib1__.dll
              22 fichier(s)       19 510 075 octets
               2 Rép(s)  43 377 790 976 octets libres
glpi-agent.bat --logger=stderr --debug --debug --force --task=Collect
[debug] Logger backend Stderr initialized
[debug] Logger backend File initialized
[debug] GLPI Agent (1.8)
[debug] Configuration directory: C:/Program Files/GLPI-Agent/etc
[debug] Data directory: C:/Program Files/GLPI-Agent/share
[debug] Storage directory: C:\Program Files\GLPI-Agent\var
[debug] Lib directory: C:/Program Files/GLPI-Agent/perl/agent
[debug] [target server0] Next server contact planned for Thu May 16 16:29:24 2024
[debug2] getAvailableTasks() : add of task Inventory version 1.15
[debug2] getAvailableTasks() : add of task RemoteInventory version 1.4
[debug2] Preparing execution plan
[debug] Available tasks:
[debug] - Inventory: 1.15
[debug] - RemoteInventory: 1.4
[debug] target server0: server https://itam.leolagrange-gestion.org/marketplace/glpiinventory/
[debug] No planned task for server0
[debug] Provided by Teclib Edition
[debug] Installer built on Wed May 15 09:56:36 2024 UTC
[debug] Built with Strawberry Perl 5.38.2
[debug] Built on github actions windows image for glpi-project/glpi-agent repository
[debug] Running in foreground mode
[info] server0 is not ready yet, but run is forced
[info] target server0: server https://itam.leolagrange-gestion.org/marketplace/glpiinventory/
[debug2] [http client] Using Compress::Zlib for compression
[info] sending contact request to server0
[debug2] [http client] 0130A44F: sending message:
{
   "action": "contact",
   "deviceid": "WINTOM-2024-05-16-10-59-28",
   "enabled-tasks": [],
   "installed-tasks": [
      "inventory",
      "remoteinventory"
   ],
   "name": "GLPI-Agent",
   "tag": "TAGTAG",
   "version": "1.8"
}
[debug] [http client] Updating keystore known certificates
[debug2] Changing to 'C:/Program Files/GLPI-Agent/var/keystore-export-MvfG80' temporary folder
[debug2] executing certutil -Silent -Split -Store CA
[debug2] executing certutil -Silent -Split -Store Root
[debug2] executing certutil -Silent -Split -Enterprise -Store CA
[debug2] executing certutil -Silent -Split -Enterprise -Store Root
[debug2] executing certutil -Silent -Split -GroupPolicy -Store CA
[debug2] executing certutil -Silent -Split -GroupPolicy -Store Root
[debug2] executing certutil -Silent -Split -User -Store CA
[debug2] executing certutil -Silent -Split -User -Store Root
[debug2] executing certutil -encode 0119e81be9a14cd8e22f40ac118c687ecba3f4d8.crt temp.cer
[debug2] executing certutil -encode 06f1aa330b927b753a40e68cdf22e34bcbef3352.crt temp.cer
[debug2] executing certutil -encode 109f1caed645bb78b3ea2b94c0697c740733031c.crt temp.cer
[debug2] executing certutil -encode 18f7c1fcc3090203fd5baa2f861a754976c8dd25.crt temp.cer
[debug2] executing certutil -encode 245c97df7514e7cf2df8be72ae957b9e04741e85.crt temp.cer
[debug2] executing certutil -encode 31f9fc8ba3805986b721ea7295c65b3a44534274.crt temp.cer
[debug2] executing certutil -encode 3b1efd3a66ea28b16697394703a72ca340a05bd5.crt temp.cer
[debug2] executing certutil -encode 6057147e1b3ac5ebe57e8b97bd0376211735cbb5.crt temp.cer
[debug2] executing certutil -encode 7f88cd7223f3c813818c994614a89c99fa3b5247.crt temp.cer
[debug2] executing certutil -encode 8f43288ad272f3103b6fb1428485ea3014c0bcfe.crt temp.cer
[debug2] executing certutil -encode 9102f57a8233a37685c40b9e412e0ed375071477.crt temp.cer
[debug2] executing certutil -encode 92b46c76e13054e104f230517e6e504d43ab10b5.crt temp.cer
[debug2] executing certutil -encode a43489159a520f0d93d032ccaf37e7fe20a8b419.crt temp.cer
[debug2] executing certutil -encode a9a3baab018326d9f5c059395179a790103807be.crt temp.cer
[debug2] executing certutil -encode be36a4562fb2ee05dbb3d32323adf445084ed656.crt temp.cer
[debug2] executing certutil -encode be68d0adaa2345b48e507320b695d386080e5b25.crt temp.cer
[debug2] executing certutil -encode cdd4eeae6000ac7f40c3802c171e30148030c072.crt temp.cer
[debug2] executing certutil -encode cf0239e251d85e18219d267e6397c9ecfeabf823.crt temp.cer
[debug2] executing certutil -encode d559a586669b08f46a30a133f8a9ed3d038e2ea8.crt temp.cer
[debug2] executing certutil -encode f252e794fe438e35ace6e53762c0a234a2c52135.crt temp.cer
[debug2] executing certutil -encode f96f11a68db23abdaddc6748499cd1ee8ee7bb9c.crt temp.cer
[debug2] executing certutil -encode fcf14cad073cf11ba848bc5bd8e0fdf38a800573.crt temp.cer
[debug2] executing certutil -encode fee449ee0e3965a5246f000e87fde2a065fd89d4.crt temp.cer
[debug2] Changing back to 'C:/Program Files/GLPI-Agent' folder
[error] cannot parse C:\Program Files\GLPI-Agent\perl\vendor\lib\Mozilla\CA\cacert.pem as PEM X509 cert: error:12800067:DSO support routines::could not load the shared library at C:/Program Files/GLPI-Agent/perl/agent/GLPI/Agent/HTTP/Client.pm line 494.
g-bougard commented 1 month ago

Hi @tomamplius

this is weird it works with 1.7.3. Do you have a different agent configuration ? On #686, people reported this didn't work too with 1.7.x version.

Anyway, it seems I found a work-around in #686, can you check the last exchanges and try it on your side ?

MarcSamD commented 1 month ago

@g-bougard : https://github.com/glpi-project/glpi-agent/issues/636 and https://github.com/glpi-project/glpi-agent/issues/670 are slightly different error messages, and @tomamplius in fact may have been right to open a new dedicated issue for it, as the error that MaxPrecy and me are facing is this one PEM X509 cert: error:12800067:DSO support routines and not PEM X509 cert: error:2006D002:BIO routines Unlike AlexTR85, I never had this error message with previous version of GLPI-Agent, including 1.7.2 (I didn't try 1.7.3 so cannot tell for it). So my random guess is that you have introduce a new error in 1.8 by trying to fix AlexTR85 https://github.com/glpi-project/glpi-agent/issues/636 issue :)

g-bougard commented 1 month ago

@MarcSamD Thank you, I missed that little difference. Anyway I can't have introduced a new error in 1.8 by trying to fix #636 as I didn't commit anything related to it ;-) My guess is I may have misconfigured new OpenSSL version building process in the context of the agent.

g-bougard commented 1 month ago

@tomamplius Can you test replacing the perl\lib\setup.pm file from the installation folder by the one in the attached archive: setup.pm.zip

This version adds the following lines:

...
use Win32::API;
...
my $apiSetDllDirectory = Win32::API->new(
    'kernel32',
    'BOOL SetDllDirectoryA(LPCSTR lpPathName)'
);
$apiSetDllDirectory->Call($basefolder.'/perl/bin');

The purpose is to tell the system to use perl\bin as folder to search for DLLs for the current process.

I checked with SpyStudio-v2 and it seems to do what I expect.

g-bougard commented 1 month ago

Anyway, I pushed a commit to include this update. Can you try with next nightly build ?

tomamplius commented 1 month ago

Same error with new setup.pm

DisposingNormal commented 1 month ago

Same error after upgrade from 1.7.3 to 1.8. Before upgrade no problem

Sd-Snatcher commented 1 month ago

2 Servers, windows server 2019 1 patched, 1 unpatched both with the problem, suddenly one correct execution in both, later again fail.

Unpatched:

[Sat May 18 01:25:14 2024][info] GLPI Agent service starting
[Sat May 18 01:25:16 2024][info] [http server] HTTPD service started on port 62354
[Sat May 18 01:25:18 2024][info] GLPI Agent memory usage: WSS=3637248 PFU=113618944
[Sat May 18 01:25:18 2024][info] target server0: next run: Sat May 18 02:15:33 2024 - https://myglpi.com/plugins/fusioninventory/front/plugin_fusioninventory.communication.php

[Sat May 18 02:15:35 2024][info] target server0: server https://myglpi.com/plugins/fusioninventory/front/plugin_fusioninventory.communication.php
[Sat May 18 02:15:40 2024][info] sending prolog request to server0
[Sat May 18 02:16:09 2024][error] cannot parse C:\Program Files\GLPI-Agent\perl\vendor\lib\Mozilla\CA\cacert.pem as PEM X509 cert: error:12800067:DSO support routines::could not load the shared library at C:/Program Files/GLPI-Agent/perl/agent/GLPI/Agent/HTTP/Client.pm line 494 thread 1.
[Sat May 18 02:16:10 2024][info] target server0: next run: Sat May 18 03:06:36 2024 - https://myglpi.com/plugins/fusioninventory/front/plugin_fusioninventory.communication.php
[Sat May 18 02:16:10 2024][info] GLPI Agent memory usage: WSS=3395584 PFU=123355136

[Sat May 18 02:52:54 2024][info] server0 is not ready yet, but run is forced
[Sat May 18 02:52:54 2024][info] target server0: server https://myglpi.com/plugins/fusioninventory/front/plugin_fusioninventory.communication.php
[Sat May 18 02:52:55 2024][info] sending prolog request to server0
[Sat May 18 02:53:03 2024][error] cannot parse C:\Program Files\GLPI-Agent\perl\vendor\lib\Mozilla\CA\cacert.pem as PEM X509 cert: error:12800067:DSO support routines::could not load the shared library at C:/Program Files/GLPI-Agent/perl/agent/GLPI/Agent/HTTP/Client.pm line 494.

[Sat May 18 03:44:42 2024][info] target server0: server https://myglpi.com/plugins/fusioninventory/front/plugin_fusioninventory.communication.php
[Sat May 18 03:44:47 2024][info] sending prolog request to server0
[Sat May 18 03:45:04 2024][error] cannot parse C:\Program Files\GLPI-Agent\perl\vendor\lib\Mozilla\CA\cacert.pem as PEM X509 cert: error:12800067:DSO support routines::could not load the shared library at C:/Program Files/GLPI-Agent/perl/agent/GLPI/Agent/HTTP/Client.pm line 494 thread 1.
[Sat May 18 03:45:05 2024][info] target server0: next run: Sat May 18 04:43:21 2024 - https://myglpi.com/plugins/fusioninventory/front/plugin_fusioninventory.communication.php
[Sat May 18 03:45:06 2024][info] GLPI Agent memory usage: WSS=3874816 PFU=124256256

----------Correct execution--------

[Sat May 18 04:43:21 2024][info] target server0: server https://myglpi.com/plugins/fusioninventory/front/plugin_fusioninventory.communication.php
[Sat May 18 04:43:21 2024][info] sending prolog request to server0
[Sat May 18 04:43:45 2024][info] running task Inventory
[Sat May 18 04:43:45 2024][info] New inventory from SERV-ARCHIVOS-2024-05-18-01-25-14 for server0 (tag=91)
[Sat May 18 04:44:40 2024][info] target server0: next run: Sun May 19 03:47:36 2024 - https://myglpi.com/plugins/fusioninventory/front/plugin_fusioninventory.communication.php
[Sat May 18 04:44:40 2024][info] GLPI Agent memory usage: WSS=3559424 PFU=139419648

[Sat May 18 13:03:04 2024][info] server0 is not ready yet, but run is forced
[Sat May 18 13:03:04 2024][info] target server0: server https://myglpi.com/plugins/fusioninventory/front/plugin_fusioninventory.communication.php
[Sat May 18 13:03:04 2024][info] sending prolog request to server0
[Sat May 18 13:03:06 2024][error] cannot parse C:\Program Files\GLPI-Agent\perl\vendor\lib\Mozilla\CA\cacert.pem as PEM X509 cert: error:12800067:DSO support routines::could not load the shared library at C:/Program Files/GLPI-Agent/perl/agent/GLPI/Agent/HTTP/Client.pm line 494.

Patched:

[Sat May 18 02:52:38 2024][info] server0 is not ready yet, but run is forced
[Sat May 18 02:52:39 2024][info] target server0: server https://incidencias.itmur.es/plugins/fusioninventory/front/plugin_fusioninventory.communication.php
[Sat May 18 02:52:39 2024][info] sending prolog request to server0
[Sat May 18 02:52:41 2024][error] cannot parse C:\Program Files\GLPI-Agent\perl\vendor\lib\Mozilla\CA\cacert.pem as PEM X509 cert: error:12800067:DSO support routines::could not load the shared library at C:/Program Files/GLPI-Agent/perl/agent/GLPI/Agent/HTTP/Client.pm line 494.

[Sat May 18 03:43:41 2024][info] target server0: server https://incidencias.itmur.es/plugins/fusioninventory/front/plugin_fusioninventory.communication.php
[Sat May 18 03:43:41 2024][info] sending prolog request to server0
[Sat May 18 03:43:43 2024][error] cannot parse C:\Program Files\GLPI-Agent\perl\vendor\lib\Mozilla\CA\cacert.pem as PEM X509 cert: error:12800067:DSO support routines::could not load the shared library at C:/Program Files/GLPI-Agent/perl/agent/GLPI/Agent/HTTP/Client.pm line 494 thread 1.
[Sat May 18 03:43:43 2024][info] target server0: next run: Sat May 18 04:42:22 2024 - https://incidencias.itmur.es/plugins/fusioninventory/front/plugin_fusioninventory.communication.php
[Sat May 18 03:43:43 2024][info] GLPI Agent memory usage: WSS=3256320 PFU=124555264

[Sat May 18 04:08:26 2024][info] server0 is not ready yet, but run is forced
[Sat May 18 04:08:26 2024][info] target server0: server https://incidencias.itmur.es/plugins/fusioninventory/front/plugin_fusioninventory.communication.php
[Sat May 18 04:08:26 2024][info] sending prolog request to server0
[Sat May 18 04:08:28 2024][error] cannot parse C:\Program Files\GLPI-Agent\perl\vendor\lib\Mozilla\CA\cacert.pem as PEM X509 cert: error:12800067:DSO support routines::could not load the shared library at C:/Program Files/GLPI-Agent/perl/agent/GLPI/Agent/HTTP/Client.pm line 494.

[Sat May 18 04:35:58 2024][info] server0 is not ready yet, but run is forced
[Sat May 18 04:35:58 2024][info] target server0: server https://incidencias.itmur.es/plugins/fusioninventory/front/plugin_fusioninventory.communication.php
[Sat May 18 04:35:58 2024][info] sending prolog request to server0
[Sat May 18 04:36:00 2024][error] cannot parse C:\Program Files\GLPI-Agent\perl\vendor\lib\Mozilla\CA\cacert.pem as PEM X509 cert: error:12800067:DSO support routines::could not load the shared library at C:/Program Files/GLPI-Agent/perl/agent/GLPI/Agent/HTTP/Client.pm line 494.
[Sat May 18 04:36:57 2024][error] No tasks available, aborting

[Sat May 18 04:39:23 2024][info] server0 is not ready yet, but run is forced
[Sat May 18 04:39:23 2024][info] target server0: server https://myglpi.com/plugins/fusioninventory/front/plugin_fusioninventory.communication.php
[Sat May 18 04:39:23 2024][info] sending prolog request to server0
[Sat May 18 04:39:25 2024][error] cannot parse C:\Program Files\GLPI-Agent\perl\vendor\lib\Mozilla\CA\cacert.pem as PEM X509 cert: error:12800067:DSO support routines::could not load the shared library at C:/Program Files/GLPI-Agent/perl/agent/GLPI/Agent/HTTP/Client.pm line 494.

[Sat May 18 04:51:10 2024][info] server0 is not ready yet, but run is forced
[Sat May 18 04:51:10 2024][info] target server0: server https://myglpi.com/plugins/fusioninventory/front/plugin_fusioninventory.communication.php
[Sat May 18 04:51:10 2024][info] sending prolog request to server0
[Sat May 18 04:51:13 2024][error] cannot parse C:\Program Files\GLPI-Agent\perl\vendor\lib\Mozilla\CA\cacert.pem as PEM X509 cert: error:12800067:DSO support routines::could not load the shared library at C:/Program Files/GLPI-Agent/perl/agent/GLPI/Agent/HTTP/Client.pm line 494.

----------Correct execution--------

[Sat May 18 05:49:05 2024][info] target server0: server https://myglpi.com/plugins/fusioninventory/front/plugin_fusioninventory.communication.php
[Sat May 18 05:49:05 2024][info] sending prolog request to server0
[Sat May 18 05:49:11 2024][info] running task Inventory
[Sat May 18 05:49:11 2024][info] New inventory from SERVIDOR-2024-05-18-01-18-08 for server0 (tag=91)
[Sat May 18 05:49:42 2024][info] target server0: next run: Sun May 19 04:53:12 2024 - https://myglpi.com/plugins/fusioninventory/front/plugin_fusioninventory.communication.php
[Sat May 18 05:49:42 2024][info] GLPI Agent memory usage: WSS=3608576 PFU=139722752

[Sat May 18 13:03:07 2024][info] server0 is not ready yet, but run is forced
[Sat May 18 13:03:07 2024][info] target server0: server https://myglpi.com/plugins/fusioninventory/front/plugin_fusioninventory.communication.php
[Sat May 18 13:03:07 2024][info] sending prolog request to server0
[Sat May 18 13:03:09 2024][error] cannot parse C:\Program Files\GLPI-Agent\perl\vendor\lib\Mozilla\CA\cacert.pem as PEM X509 cert: error:12800067:DSO support routines::could not load the shared library at C:/Program Files/GLPI-Agent/perl/agent/GLPI/Agent/HTTP/Client.pm line 494.
g-bougard commented 1 month ago

Hi @Sd-Snatcher

what would be nice is you enable debug=2, then report full debug in the case it doesn't work and in the case it works.

g-bougard commented 1 month ago

Anyway, @tomamplius @Sd-Snatcher

Can I ask you to run the 2 perl scripts from this test-ssl.zip archive ?

For that copy them under the GLPI-Agent installation folder, open an administrative console and change directory to the installation folder. Then run them as follow:

C:\Program Files\GLPI-Agent>perl\bin\glpi-agent.exe test-ssl.pl
...
C:\Program Files\GLPI-Agent>perl\bin\glpi-agent.exe test-ssl-2.pl
...

Then can you share the output of each one ? For the first, you can send it by email (gbougard <at> teclib <dot> com) to not leak any private data.

The first script reproduces the ssl request test toward your GLPI but with more debug datas related to loaded openssl library and perl env. The second script only tries what seem to fail, i.e. loading C:\Program Files\GLPI-Agent\perl\vendor\lib\Mozilla\CA\cacert.pem in a perl array.

tomamplius commented 1 month ago

Send

g-bougard commented 1 month ago

Okay, I think I found it. Can you make a copy of perl\bin\zlib1__.dll into the same folder and rename it without the 2 underscores to have zlib1.dll ?

I'm changing the way openssl will try to load zlib DLL and use provided zlib1__.dll so I hope next nightly build will fixe this problem.

tomamplius commented 1 month ago

move zlib1__.dll to zlib1.dll solve the issue

g-bougard commented 1 month ago

The best now is to use latest nightly build which has updated openssl libraries and setDllDirectory call to help finding the right libraries.

Can any concerned people confirm the nightly build fixes the problem ?

keguira commented 1 month ago

I have the issue on my side. The latest nigthly build seems to work.

Tested the portable version only

ermag04 commented 1 month ago

@g-bougard, it's working now after latest build. It's curious that the problem continued after going back from version 1.8 to 1.7... does that make any sense? v1.7 installed --> working v1.8 installed (upgrade) --> problem ssl v1.7 installed (rollback) --> problem ssl (!)

g-bougard commented 1 month ago

Hi @ermag04

yes, that's a little weird. But when the problem is related to system DLLs loading, stuffs can be really weird. But also when reinstalling 1.7.3, you probably need first to fully uninstall 1.8 and then make a clean 1.7.3 install.

Anyway I'll publish 1.9 in a week or 2.

tomamplius commented 1 month ago

work with 1.9-git9965f8a2

Tobiko88 commented 1 month ago

I have the same Issue, but i was able to solve it by rename zlib1__.dll to zlib1.dll, like tomamplius wrote above.

Now i get the error: No supported answer from server at *****.

well i think thats another Problem... ;)

g-bougard commented 1 month ago

I have the same Issue, but i was able to solve it by rename zlib1__.dll to zlib1.dll, like tomamplius wrote above.

Now i get the error: No supported answer from server at *****.

well i think thats another Problem... ;)

My last request was to give latest nightly build a try as it includes an integrated and stronger fix.

For the other error, yes, this is not related. Check the configured server url and don't forget to read: https://glpi-agent.readthedocs.io/en/latest/configuration.html#server

dufayf commented 1 month ago

The best now is to use latest nightly build which has updated openssl libraries and setDllDirectory call to help finding the right libraries.

Can any concerned people confirm the nightly build fixes the problem ?

Resolved with 1.9-gitdd4eee63. Can't wait for 1.9 to be released and pushed to https://community.chocolatey.org/packages/glpi-agent.

g-bougard commented 1 month ago

By now, 1.9 release is scheduled on next tuesday.

g-bougard commented 1 month ago

Hello,

GLPI-Agent 1.9 has just been published: https://github.com/glpi-project/glpi-agent/releases/tag/1.9