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.

Server doesn't receive data from windows agent [closed]

Hi! 

I've spent a bunch of hours but still unable to resolve my issue. I used this instruction and looks like OCSInventory-Server was installed correct (at least no perl modules error or smth). Everything works well except getting data from OCS Inventory Agent Version 2.10.1.0 (win). db/urls works fine e.g. https://help.host/ocsreports/ and I checked /etc/apache2/conf-enabled/z-ocsinventory-server.conf ~100 times

Setup:

  1. "Ubuntu 24.04.1 LTS"
  2. Composer version 2.8.2 2024-10-29 16:12:11
  3. perl 5, version 38, subversion 2 (v5.38.2)
  4. Server version: Apache/2.4.58 (Ubuntu)
  5. glpi on same host

Client log:

==============================================================================

Starting OCS Inventory Agent on Saturday, November 02, 2024 23:13:36.

AGENT => Running OCS Inventory Agent Version 2.10.1.0

AGENT => Using OCS Inventory FrameWork Version 2.10.1.0

AGENT => Loading plug-in(s)

DLL PLUGIN => Searching for Plug-in DLL(s) in folder <C:\Program Files\OCS Inventory Agent\plugins>

DLL PLUGIN => 0 DLL Plug-in(s) successfully loaded on 0 DLL(s) found

AGENT => Using network connection with Communication Server

COM PROVIDER => Loading Communication Provider <C:\Program Files\OCS Inventory Agent\ComHTTP.dll>

AGENT => Using Communication Provider <OCS Inventory cURL Communication Provider> Version <2.10.1.0>

AGENT => Sending getLabel request

COM SERVER => Initializing cURL library for getFile

COM SERVER => Using cURL with server authentication

COM SERVER => Disabling cURL proxy support

COM SERVER => Disabling cURL SSL server validation support

COM SERVER => Sending fileGet request to URL <https://help.host/ocsreports/deploy/label>

COM SERVER => fileGet response received <HTTP Status Code #404>

COM SERVER => Cleaning cURL library

AGENT => Failed to retrieve Label <HTTP Status Code #404>

AGENT => Sending Prolog

DID_CHECK => Read DeviceID <GAMS-JB-2024-11-02-20-50-54> and MACs <00:50:56:98:79:F900:50:56:98:72:2C> in file <ocsinventory.dat>

COM SERVER => Initializing cURL library for sendRequest

COM SERVER => Using cURL with server authentication

COM SERVER => Disabling cURL proxy support

COM SERVER => Disabling cURL SSL server validation support

COM SERVER => Sending HTTP Post request to URL <https://help.host/ocsreports>

COM SERVER => HTTP Post response received <HTTP Status Code #200>

COM SERVER => Cleaning cURL library

================= TRACE START ===============

================= TRACE STOP ===============

AGENT => Prolog successfully sent

AGENT => Prolog Frequency set to 10 hour(s)

AGENT => Inventory on startup option set to 

AGENT => Unloading communication provider

AGENT => Unloading plug-in(s)

AGENT => Execution duration: 00:00:00.

Server log (even owner in www-data for /var/log/ocsinventory-server/):

tail: cannot open '/var/log/ocsinventory-server/activity.log' for reading: No such file or directory

but from apache side:

help.host:443 192.168.212.120 - - [02/Nov/2024:23:27:26 +0300] "GET /ocsreports/deploy/label HTTP/1.1" 404 7893 "-" "OCS-NG_WINDOWS_AGENT_v2.10.1.0"

help. host:443 192.168.212.120 - - [02/Nov/2024:23:27:26 +0300] "POST /ocsreports HTTP/1.1" 301 8013 "-" "OCS-NG_WINDOWS_AGENT_v2.10.1.0"

help host:443 192.168.212.120 - - [02/Nov/2024:23:27:26 +0300] "GET /ocsreports/ HTTP/1.1" 200 6889 "-" "OCS-NG_WINDOWS_AGENT_v2.10.1.0"

Could you please give me a piece of advice how else I can debug/fix the issue?

closed with the note: Problem solved
in OCS Inventory NG server for Unix by (170 points)
closed by

1 Answer

0 votes

Got that enpoints should be different for /ocsreports and /ocsinventory.

Now I see some errors:

[Sat Nov 02 23:57:15.968012 2024] [perl:error] [pid 4125] [client 192.168.212.120:50027] Can't call method "rollback" on an undefined value at /usr/local/share/perl/5.38.2/Apache/Ocsinventory/Server/System.pm line 330.\n

and more interesting:

Sun Nov  3 00:01:02 2024;4296;521;NA;192.168.212.120;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36;database_connect;Access denied for user 'ocs'@'localhost' to database 'ocsweb'

Sun Nov  3 00:01:02 2024;4296;505;NA;192.168.212.120;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36;handler;Database connection

What tells me check /etc/apache2/conf-available/zz-ocsinventory-restapi.conf for default option. Now it works. Thanks! Just leave it here. mb it helps for someone

by (170 points)
 
Powered by Question2Answer
...