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.

Agent 404 / Failed to send Prolog <HTTP Status Code #404>

Hello,

I recently upgraded OCS from 2.0.2 -> 2.2 and now my clients are not updating.

Client log looks like this"

==============================================================================
Starting OCS Inventory NG Agent on Wednesday, June 08, 2016 20:53:47.
AGENT => Running OCS Inventory NG Agent Version 2.0.5.0
AGENT => Using OCS Inventory NG FrameWork Version 2.0.5.0
AGENT => Loading plug-in(s)
AGENT => Using network connection with Communication Server
AGENT => Using Communication Provider <OCS Inventory NG cURL Communication Provider> Version <2.0.5.0>
AGENT => Sending Prolog
ERROR *** AGENT => Failed to send Prolog <HTTP Status Code #404>
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:01.

"

I tried with newer agent but got the same error. Server running Ubuntu 14.4 and all the clients are windows 7 or 10. I already tried to solve this out by myself but cannot figure out what's wrong? Is this issue with mod perl? I ran this command but I'm unsure if this is the way to check if the perl is running.

in OCS Inventory NG agent for Windows by (240 points)

2 Answers

0 votes
Hi,

Look like your mod perl is not properly installed / enabled.

Could you check if the mod perl apache module is running ?

Regards,

Gilles Dubois.
by (3.1k points)

I restarted Apache and the log looks like this, looks like it's configured

Hello,

I tried to set up test environment with one server and one client but I'm still getting the same error. The server is Ubuntu 16.04 LTS (32bit edition), OCS NG v. 2.2 and client Windows is 10 Pro, OCS NG Agent 2.1.1.3.

The server had to be installed using this setup.sh file provided by you because of the variable errors when using the original sertup.sh (https://github.com/OCSInventory-NG/OCSInventory-Server/blob/master/setup.sh). I also installed these perl modules manually from cpan Archive-Zip-1.57.tar.gz, XML-Entities-1.0002.tar.gz only error I got during installation was about Apache2::SOAP but I was not able to install that no matter how I tried.

This is what OCSInventory.log looks like

==============================================================================
Starting OCS Inventory NG Agent on Thursday, June 09, 2016 23:23:00.
AGENT => Running OCS Inventory NG Agent Version 2.1.1.3
AGENT => Using OCS Inventory NG FrameWork Version 2.1.1.3
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 NG cURL Communication Provider> Version <2.1.1.3>
    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 => Disabling cURL SSL server validation support
    COM SERVER => Sending fileGet request to URL <http://192.168.43.106:80/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 <HP-2016-06-09-22-41-01> and MACs <00:22:FA:F0:02:C800:22:FA:F0:02:C900:24:7E:73:5C:B900:FF:B0:E9:1D:94> 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 => Disabling cURL SSL server validation support
    COM SERVER => Sending HTTP Post request to URL <http://192.168.43.106:80/ocsinventory>
    COM SERVER => HTTP Post response received <HTTP Status Code #404>
    COM SERVER => Cleaning cURL library
================= TRACE START ===============

================= TRACE STOP ===============
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.

This is the client ini file

[OCS Inventory Agent]
ComProvider=ComHTTP.dll
Debug=2
Local=
NoSoftware=0
HKCU=0
NoTAG=0
IpDisc=
[HTTP]
Server=http://192.168.43.106:80/ocsinventory
SSL=0
CaBundle=cacert.pem
AuthRequired=0
User=
Pwd=
ProxyType=0
Proxy=
ProxyPort=0
ProxyAuthRequired=0
ProxyUser=
ProxyPwd=
[OCS Inventory Service]
TTO_WAIT=660

Perl seems to be configured 

Apache access log looks like this:

0 votes
hi,

Try to access http://yourocsIP/ocsinventory . If the result show 400 bad request => your mod perl are configured ok.

Then move these files:

#mv /etc/apache2/conf-available/ocsinventory-reports.conf /etc/apache2/sites-enabled/

#mv /etc/apache2/conf-available/z-ocsinventory-server.conf /etc/apache2/sites-enabled/

Restart apache2 service

# /etc/init.d/apache2 restart

Hope it help!
by (400 points)
 
Powered by Question2Answer
...