Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.12.3 available

The official documentation can be found on https://wiki.ocsinventory-ng.org. Read it before asking your question.

Windows agent cant talk to server. MacOS OK

Hi, so have a new server running on centOS 7. Mac clients work fine. But windows clients is having problems.

From the event viewer on a windows client

Event ID 20

Service encounter error < Failed to load/parse last inventory state>

On server I see this:

192.168.xxx.38 - - [30/Jan/2018:11:35:37 +0000] "POST /ocsinventory HTTP/1.1" 200 103 "-" "OCS-NG_unified_unix_agent_v2.3.1"
192.168.xx.30 - - [30/Jan/2018:12:59:00 +0000] "POST /ocsinventory HTTP/1.1" 200 246 "-" "OCS-NG_unified_unix_agent_v2.3.1"
192.168.xxx.64 - - [30/Jan/2018:13:49:00 +0000] "GET /ocsinventory/deploy/label HTTP/1.1" 400 226 "-" "OCS-NG_WINDOWS_AGENT_v2.3.1.1"
192.168.xxx.64 - - [30/Jan/2018:13:49:01 +0000] "GET /ocsinventory HTTP/1.1" 400 226 "-" "OCS-NG_WINDOWS_AGENT_v2.3.1.1"

perl_module is enabled

Have the same problem if I run via HTTP or HTTPS

Windows ocs log

COM SERVER => Sending HTTP Post request to URL <http://xxx.xx.xxx.xxx/ocsinventory>
    COM SERVER => HTTP Post response received <HTTP Status Code #400>
    COM SERVER => Cleaning cURL library
ERROR *** AGENT => Failed to send Prolog <HTTP Status Code #400>
AGENT => Unloading communication provider
in OCS Inventory NG agent for Windows by (600 points)

7 Answers

0 votes
Hi,

Error 400 means you have a ocs agent version greater than ocs server version. What are ocs server and agent version ?

Regards

Frank
by (90.2k points)
0 votes

Hi Frank,

Have also tried to use the older client for XP/2003 with no luck, trying on another windows 10 now to see if I get the same result

by (600 points)
0 votes
Could you post apache error log file, plz?
by (90.2k points)
0 votes

Hmm on the "new" client. 

AGENT => Using Communication Provider <OCS Inventory NG cURL Communication Provider> Version <2.3.1.1>
AGENT => Sending Prolog
    DID_CHECK => Read DeviceID <DESKTOP-VDA4H44-2018-01-31-14-02-52> and MACs <00:0C:29:81:BB:FA8C:85:90:85:F6:90> in file <ocsinventory.dat>
    COM SERVER => Initializing cURL library for sendRequest
    COM SERVER => Using cURL without server authentication
    COM SERVER => Disabling cURL proxy support
    COM SERVER => Enabling cURL SSL server validation support using CA Bundle <C:\ProgramData\OCS Inventory NG\Agent\cacert.pem>
    COM SERVER => Sending HTTP Post request to URL <https://domainname.net:443/ocsinventory>
    WARNING *** COM SERVER => Failed to send HTTP Post request <Peer certificate cannot be authenticated with given CA certificates>
    COM SERVER => Cleaning cURL library
ERROR *** AGENT => Failed to send Prolog <Peer certificate cannot be authenticated with given CA certificates>
AGENT => Unloading communication provider

My agent:

[OCS Inventory Agent]
ComProvider=ComHTTP.dll
Debug=1
Local=
NoSoftware=0
HKCU=0
NoTAG=0
IpDisc=
[HTTP]
Server=https://domain.net:443/ocsinventory
SSL=1
CaBundle=C:\ProgramData\OCS Inventory NG\Agent\cacert.pem
AuthRequired=0
User=
Pwd=
ProxyType=0
Proxy=
ProxyPort=0
ProxyAuthRequired=0
ProxyUser=
ProxyPwd=
[OCS Inventory Service]
TTO_WAIT=600
INVENTORY_ON_STARTUP=0

I changed the CaBundle= from cacert.pem to the whole path, but same error.

Will add error log from apache in next msg

by (600 points)
0 votes
Error log

[Wed Jan 31 13:02:44.448944 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 160, referer: https://ocsserver/ocsreports/index.php
[Wed Jan 31 13:02:44.449419 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 160, referer: https://ocsserver/ocsreports/index.php
[Wed Jan 31 13:02:44.697915 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 160, referer: https://ocsserver/ocsreports/index.php?function=admin_user
[Wed Jan 31 13:02:44.698389 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 160, referer: https://ocsserver/ocsreports/index.php?function=admin_user
[Wed Jan 31 13:02:51.320643 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 160, referer: https://ocsserver/ocsreports/index.php?function=admin_user
[Wed Jan 31 13:02:51.321091 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 160, referer: https://ocsserver/ocsreports/index.php?function=admin_user
[Wed Jan 31 13:02:59.470440 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 160, referer: https://ocsserver/ocsreports/index.php?function=admin_user_details&user_id=kishir
[Wed Jan 31 13:02:59.470884 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 160, referer: https://ocsserver/ocsreports/index.php?function=admin_user_details&user_id=kishir
[Wed Jan 31 13:03:03.322545 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 160, referer: https://ocsserver/ocsreports/index.php?function=admin_user_details&user_id=kishir
[Wed Jan 31 13:03:03.323001 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 160, referer: https://ocsserver/ocsreports/index.php?function=admin_user_details&user_id=kishir
[Wed Jan 31 13:03:10.095631 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 160, referer: https://ocsserver/ocsreports/index.php
[Wed Jan 31 13:03:10.096123 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 160, referer: https://ocsserver/ocsreports/index.php
[Wed Jan 31 13:03:10.097665 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/backend/require/connexion.php on line 30, referer: https://ocsserver/ocsreports/index.php
[Wed Jan 31 13:03:10.174254 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/backend/require/connexion.php on line 30, referer: https://ocsserver/ocsreports/index.php
[Wed Jan 31 13:03:10.175541 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/backend/require/connexion.php on line 30, referer: https://ocsserver/ocsreports/index.php
by (600 points)
0 votes
[Wed Jan 31 13:03:10.216939 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/require/html_header.php on line 135, referer: https://ocsserver/ocsreports/index.php
[Wed Jan 31 13:03:10.220839 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/share/ocsinventory-reports/ocsreports/require/function_console.php on line 45, referer: https://ocsserver/ocsreports/index.php
[Wed Jan 31 13:03:10.220890 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/share/ocsinventory-reports/ocsreports/require/function_console.php on line 46, referer: https://ocsserver/ocsreports/index.php
[Wed Jan 31 13:03:10.220915 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/share/ocsinventory-reports/ocsreports/require/function_console.php on line 47, referer: https://ocsserver/ocsreports/index.php
[Wed Jan 31 13:03:10.220926 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/share/ocsinventory-reports/ocsreports/require/function_console.php on line 47, referer: https://ocsserver/ocsreports/index.php
[Wed Jan 31 13:03:10.220937 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/share/ocsinventory-reports/ocsreports/require/function_console.php on line 47, referer: https://ocsserver/ocsreports/index.php
[Wed Jan 31 13:03:10.220948 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/share/ocsinventory-reports/ocsreports/require/function_console.php on line 47, referer: https://ocsserver/ocsreports/index.php
[Wed Jan 31 13:03:10.220960 2018] [:error] [pid 10161] [client xx.xx.113.9:61183] PHP Warning:  date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/share/ocsinventory-reports/ocsreports/require/function_console.php on line 47, referer: https://ocsserver/ocsreports/index.php
[Wed Jan 31 13:06:04.631790 2018] [:error] [pid 13004] [client xx.xx.13.22:63584] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 160
[Wed Jan 31 13:06:04.633356 2018] [:error] [pid 13004] [client xx.xx.13.22:63584] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 160
[Wed Jan 31 13:11:43.521287 2018] [:error] [pid 13006] [client xx.xx.13.22:63760] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 160
[Wed Jan 31 13:11:43.521748 2018] [:error] [pid 13006] [client xx.xx.13.22:63760] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 160
[Thu Feb 01 07:19:51.236229 2018] [:error] [pid 10162] [client xx.xx.13.6:54621] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 160, referer: https://ocsserver/index.php?function=computer&head=1&systemid=4&cat=hardware
[Thu Feb 01 07:19:51.248673 2018] [:error] [pid 10162] [client xx.xx.13.6:54621] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50556 Library:50636 in /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php on line 160, referer: https://ocsserver/index.php?function=computer&head=1&systemid=4&cat=hardware
by (600 points)
0 votes
As I see the content of error.log file php headers and client library aren't be at the same software level. Update. Plus set date.timezone in php.ini and restart apache. Then launch a new inventory.

Regards

Frank
by (90.2k points)
 
Powered by Question2Answer
...