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 fail to send inventory

Hi everyone, my agent ( on Win 10 ) does not seem to sent inventory to the OCS server, however, i cant determine where en when does the error occurs ...

This is ocsinventory.ini:

[OCS Inventory Agent]
ComProvider=ComHTTP.dll
Debug=2
Local=
NoSoftware=0
HKCU=0
NoTAG=0
IpDisc=
[HTTP]
Server=http://"MY_OCS_SERVER_IP"/
SSL=1
CaBundle=cacert.pem
AuthRequired=0
User=
Pwd=
ProxyType=0
Proxy=
ProxyPort=0
ProxyAuthRequired=0
ProxyUser=
ProxyPwd=
[OCS Inventory Service]
TTO_WAIT=35760
INVENTORY_ON_STARTUP=0
PROLOG_FREQ=10
OLD_PROLOG_FREQ=10

 en there is the OCS log :

==============================================================================
Starting OCS Inventory NG Agent on Wednesday, March 01, 2017 16:36:57.
AGENT => Running OCS Inventory NG Agent Version 2.3.0.0
AGENT => Using OCS Inventory NG FrameWork Version 2.3.0.0
AGENT => Loading plug-in(s)
    DLL PLUGIN => Searching for Plug-in DLL(s) in folder <C:\Program Files (x86)\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 (x86)\OCS Inventory Agent\ComHTTP.dll>
AGENT => Using Communication Provider <OCS Inventory NG cURL Communication Provider> Version <2.3.0.0>
    AGENT => Sending getLabel request
    COM SERVER => Initializing cURL library for getFile
    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 fileGet request to URL <http://192.168.10.195//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 <DESKTOP-QII1OJ2-2017-03-01-15-01-21> and MACs <5C:51:4F:92:0D:D35C:51:4F:92:0D:D428:D2:44:4C:1A:0A00:50:56:C0:00:0100:50:56:C0:00:08> 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 <http://192.168.10.195/>
    COM SERVER => HTTP Post response received <HTTP Status Code #200>
    COM SERVER => Cleaning cURL library
================= TRACE START ===============

================= TRACE STOP ===============
AGENT => Prolog successfully sent
SUPPORT => No support detected, Registration key : N/A
    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.

If anyone can provide help i would be very thankfull,

Thanks !
in OCS Inventory NG agent for Windows by (330 points)
edited by

12 Answers

+1 vote
Hello,

Server IP must be : http(s)://yourIP/ocsinventory

+ SSL=0 not 1
by (4.9k points)
edited by
0 votes

Hi,

first, thanks for your answer,

However, when i put the server ip that way , i get HTTP error 404,

I use an Alias in the apache's site-available conf file, is there a way that the issue comes from there ?

here is the apache site-available file :

< VirtualHost *:80>

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined
Alias / "/usr/share/ocsinventory-reports/ocsreports/"
   <Directory "/usr/share/ocsinventory-reports/ocsreports/">
       Options Indexes MultiViews FollowSymLinks
       AllowOverride None
       Order allow,deny
       Allow from all
   </Directory>
<VirtualHost>


I also put SSL=1 to SSL=0, but not much results ...
by (330 points)
edited by
0 votes
As long as you don't use an alias for /ocsinventory it is ok.

Is your server in https ?
by (4.9k points)
0 votes
No, this server is for testing purpose only, i didnt bothered with https,

should I configure it ?
by (330 points)
0 votes
No it is not needed, I said that because it is often that people put http in the agent while their server is in https. Nevermind.

Can you share your :

error.log / access.log / activity.log (/var/log/ocsinventory-server/)
by (4.9k points)
0 votes
Infortunately, /var/log/ocsinventory-server is an empty directory, can it be the result of a configuration mistake i made ?

Thanks again for helping me throught this...

The only results of "locate access/error/activity.log" are in the apache2 or mysql directory...
by (330 points)
0 votes
No problem !

My bad, this log (activity) is create when you have inventories going to the server so it is normal.

Regarding error.log and access.log, it is about apache2 yes so can you share it please ?
by (4.9k points)
0 votes

tail acces.log :

192.168.10.168 - - [01/Mar/2017:16:56:03 +0100] "GET //deploy/label HTTP/1.1" 404 451 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
192.168.10.168 - - [01/Mar/2017:16:56:03 +0100] "POST / HTTP/1.1" 200 7046 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
192.168.10.168 - - [01/Mar/2017:18:07:22 +0100] "GET /ocsincventory/deploy/label HTTP/1.1" 404 465 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
192.168.10.168 - - [01/Mar/2017:18:07:22 +0100] "POST /ocsincventory HTTP/1.1" 404 452 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
192.168.10.168 - - [01/Mar/2017:18:08:27 +0100] "GET /ocsincventory/deploy/label HTTP/1.1" 404 465 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
192.168.10.168 - - [01/Mar/2017:18:08:27 +0100] "POST /ocsincventory HTTP/1.1" 404 452 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
192.168.10.168 - - [01/Mar/2017:18:11:46 +0100] "GET /ocsincventory/deploy/label HTTP/1.1" 404 465 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
192.168.10.168 - - [01/Mar/2017:18:11:46 +0100] "POST /ocsincventory HTTP/1.1" 404 452 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
192.168.10.168 - - [01/Mar/2017:18:15:51 +0100] "GET /ocsincventory/deploy/label HTTP/1.1" 404 465 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
192.168.10.168 - - [01/Mar/2017:18:15:51 +0100] "POST /ocsincventory HTTP/1.1" 404 452 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
192.168.10.168 - - [01/Mar/2017:18:23:56 +0100] "GET /ocsincventory/deploy/label HTTP/1.1" 404 465 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
192.168.10.168 - - [01/Mar/2017:18:23:56 +0100] "POST /ocsincventory HTTP/1.1" 404 452 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
192.168.10.168 - - [01/Mar/2017:18:24:54 +0100] "GET /ocsincventory/deploy/label HTTP/1.1" 404 465 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
192.168.10.168 - - [01/Mar/2017:18:24:54 +0100] "POST /ocsincventory HTTP/1.1" 404 452 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
192.168.10.168 - - [01/Mar/2017:18:58:24 +0100] "GET /ocsincventory/deploy/label HTTP/1.1" 404 465 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
192.168.10.168 - - [01/Mar/2017:18:58:24 +0100] "POST /ocsincventory HTTP/1.1" 404 452 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
192.168.10.168 - - [01/Mar/2017:19:27:55 +0100] "GET /ocsincventory/deploy/label HTTP/1.1" 404 465 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
192.168.10.168 - - [01/Mar/2017:19:27:55 +0100] "POST /ocsincventory HTTP/1.1" 404 452 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
192.168.10.168 - - [01/Mar/2017:23:41:47 +0100] "GET /ocsincventory/deploy/label HTTP/1.1" 404 465 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
192.168.10.168 - - [01/Mar/2017:23:41:47 +0100] "POST /ocsincventory HTTP/1.1" 404 452 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
192.168.10.168 - - [02/Mar/2017:00:15:24 +0100] "GET /ocsincventory/deploy/label HTTP/1.1" 404 465 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
192.168.10.168 - - [02/Mar/2017:00:15:24 +0100] "POST /ocsincventory HTTP/1.1" 404 452 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"


tail error.log:

[Wed Mar 01 09:59:03.728872 2017] [mpm_prefork:notice] [pid 869] AH00163: Apache/2.4.10 (Debian) mod_perl/2.0.9dev Perl/v5.20.2 configured -- resuming normal operations
[Wed Mar 01 09:59:03.728894 2017] [core:notice] [pid 869] AH00094: Command line: '/usr/sbin/apache2'
[Wed Mar 01 12:31:51.210101 2017] [mpm_prefork:notice] [pid 869] AH00169: caught SIGTERM, shutting down
[Wed Mar 01 12:32:07.545253 2017] [mpm_prefork:notice] [pid 805] AH00163: Apache/2.4.10 (Debian) mod_perl/2.0.9dev Perl/v5.20.2 configured -- resuming normal operations
[Wed Mar 01 12:32:07.549651 2017] [core:notice] [pid 805] AH00094: Command line: '/usr/sbin/apache2'
[Wed Mar 01 12:41:20.916859 2017] [mpm_prefork:notice] [pid 805] AH00169: caught SIGTERM, shutting down
[Wed Mar 01 12:41:21.760258 2017] [mpm_prefork:notice] [pid 2267] AH00163: Apache/2.4.10 (Debian) mod_perl/2.0.9dev Perl/v5.20.2 configured -- resuming normal operations
[Wed Mar 01 12:41:21.760296 2017] [core:notice] [pid 2267] AH00094: Command line: '/usr/sbin/apache2'
[Wed Mar 01 13:36:34.576677 2017] [mpm_prefork:notice] [pid 2267] AH00169: caught SIGTERM, shutting down
[Wed Mar 01 13:36:49.412422 2017] [mpm_prefork:notice] [pid 776] AH00163: Apache/2.4.10 (Debian) mod_perl/2.0.9dev Perl/v5.20.2 configured -- resuming normal operations
[Wed Mar 01 13:36:49.420857 2017] [core:notice] [pid 776] AH00094: Command line: '/usr/sbin/apache2'
[Wed Mar 01 15:30:38.416443 2017] [mpm_prefork:notice] [pid 776] AH00163: Apache/2.4.10 (Debian) mod_perl/2.0.9dev Perl/v5.20.2 configured -- resuming normal operations
[Wed Mar 01 15:30:38.426826 2017] [core:notice] [pid 776] AH00094: Command line: '/usr/sbin/apache2'

Edit: well i just noticed that those access.log display a strange time...

by (330 points)
0 votes
There is an error in your apache configuration, can you share it all please ? I will try to help you but I'm not an expert in that. Don't forget to hide sensitive informations..
by (4.9k points)
0 votes
Hi,

If you access the url http://192.168.10.195/ocsinventory I mean you have error 404.

So after installation have you restarted apache? Did you enabled z-ocsinventory-server.conf file? a2enmod z-ocsinventory-server

Regards

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