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.11.1 available

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

impossible to get data from agent : error 404 [closed]

Hello,

after hours of researches on your website, impossible to find a solution to my basic problem : My OCS Agent 2.3.1.1 is enable to send its data collected on the Windows 7 (or 10) to OCS Server : it logs error 404 !

Here are my configurations :

1. OCS Server (perfectly running, with OCS -Reports) :

Système :

  • Nom du système :Linux x86_64
  • Version :4.9.0-4-amd64
  • RAM totale :2004 Mo
  • RAM disponible :1670 Mo
  • CPU :Intel(R) Xeon(R) CPU E5606 @ 2.13GHz
  • Distribution :Debian GNU/Linux 9 (stretch)

Logiciel :

  • Version de PHP :7.0.27
  • Serveur Web :Apache/2.4.25 (Debian)
  • Serveur SQL :Debian 9.1 version 10.1.26-MariaDB-0+deb9u1
  • Version OCSReports:2.4.1

Configuration of server and Apache2 :

  • Installation in folder /usr/share/ocsinventory-reports/ocsreports
  • VirtualHost created and configured like this (/etc/apache2/sites-available/001-ocsreports.conf) :

<VirtualHost *:80>
        ServerName ocsreportsXY.mydomain.local
        ServerAdmin *Emails are not allowed*
        DocumentRoot /usr/share/ocsinventory-reports/ocsreports
        <Directory /usr/share/ocsinventory-reports/ocsreports>
             Options Indexes FollowSymLinks
             DirectoryIndex index.php
             Require all granted
             php_value post_max_size 100m
             php_value upload_max_filesize 100m
        </Directory>

Site activated by  a2ensite 001-ocsreports.conf

2. OCS agent version 2.3.1.1  installed on many Windows 7 clients :

  • install is correct
  • the agent generates correctly the file containing all parameters from the computer and the system : no problem with it.
  • BUT, the file is never sent to the server : ERROR 404 appears in file C:\ProgramData\OCS Inventory NG\Agent\OCSInventory.log :

==============================================================================
Starting OCS Inventory NG Agent on Monday, April 23, 2018 23:53:45.
AGENT => Running OCS Inventory NG Agent Version 2.3.1.1
AGENT => Using OCS Inventory NG FrameWork Version 2.3.1.1
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.1.1>
    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 <http://172.16.20.196/ocsinventory/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 <MY-PC-W7-VM-2017-05-11-09-44-58> and MACs <00:50:56:95:35:5800:00:00:00:00:0000:00:00:00:00:0000:00:00:00:00:0000:00:00:00:00:0000:00:00:00:00:0000:00:00:00:00:0000:00:00:00:00:0000:00:00:00:00:00> 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 <http://172.16.20.196/ocsinventory>
    COM SERVER => HTTP Post response received <HTTP Status Code #404>
    COM SERVER => Cleaning cURL library
ERROR *** AGENT => Failed to send Prolog <HTTP Status Code #404>
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:00.
 

My Question : What is missing in my server' configuration ?

Thanks for your advises or solutions.

Best regards.

2.5.0.0

2.5.0.0

closed with the note: good solution brought
in OCS Inventory NG agent for Windows by (260 points)
closed by

2 Answers

+1 vote
 
Best answer
When you follow the normal installation step with the setup.sh contain in the tar.gz, you must get two files : ocsinventory-server.conf and ocsinventory-reports.conf.

This file is located in debian in /etc/apache2/conf-available

You just need to activate both file with a2enconf and it will work.

The configuration you give in your post is not the normal configuration for OCS.
by (22k points)
selected by
0 votes

Thanks a lot, Kapouik : I didn't see that these 2 configuration files were delivered.
Perfect : my communication server is running perfectly, now ! Il have activated these 2 sites after copying them in /etc/apache2/sites-available, and it's ok now.
Thanks again.

 

2.5.0.0
by (260 points)
 
Powered by Question2Answer
...