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.

Error http 400 486

Hi,

I have a problem with ocs inventory agent windows and server debian.

The conf computer isn't send at the server and I have in log of agent error 400.

And in access.log of apache2 http 400 486.

access.log apache :

192.168.1.41 - - [28/Feb/2017:12:00:36 +0100] "GET /ocsinventory/deploy/label HTTP/1.1" 400 486 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
192.168.1.41 - - [28/Feb/2017:12:00:36 +0100] "POST /ocsinventory HTTP/1.1" 400 486 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"

error.log is "clear"

OCSInventory.log agent :

==============================================================================
Starting OCS Inventory NG Agent on Tuesday, February 28, 2017 11:35:53.
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\C:\ProgramData\OCS Inventory NG\Agent\cacert.pem>
    COM SERVER => Sending fileGet request to URL <http://192.168.1.38:80/ocsinventory/deploy/label>
    COM SERVER => fileGet response received <HTTP Status Code #400>
    COM SERVER => Cleaning cURL library
    AGENT => Failed to retrieve Label <HTTP Status Code #400>
AGENT => Sending Prolog
    DID_CHECK => Read DeviceID <FUJI-HV-2016-06-24-11-13-22> and MACs <5C:AC:4C:A5:13:FE1E:AC:4C:A5:13:FE8C:73:6E:A3:3D:35> 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\C:\ProgramData\OCS Inventory NG\Agent\cacert.pem>
    COM SERVER => Sending HTTP Post request to URL <http://192.168.1.38:80/ocsinventory>
    COM SERVER => HTTP Post response received <HTTP Status Code #400>
    COM SERVER => Cleaning cURL library
================= TRACE START ===============

================= TRACE STOP ===============
ERROR *** AGENT => Failed to send Prolog <HTTP Status Code #400>
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:00

in OCS Inventory NG server for Unix by (760 points)
reopened by

14 Answers

0 votes
The OCS server interface is in http, so I guess it's fully in http.

[OCS Inventory Agent]
ComProvider=ComHTTP.dll
Debug=2
Local=
NoSoftware=0
HKCU=0
NoTAG=0
IpDisc=
[HTTP]
Server=http://192.168.1.38/ocsinventory
;SSL=0
;CaBundle=cacert.pem
;AuthRequired=1
;User=5eLcJieQpvBYHbhpY1O60A==|||CK/GsBDwXRIGyYKLJFj4Mw==
;Pwd=bPT6JFLQiukMQBgwXAuzXQ==|||/nYwccCSCFQygwabr9/M6w==
ProxyType=0
Proxy=
ProxyPort=0
ProxyAuthRequired=0
ProxyUser=
ProxyPwd=
[OCS Inventory Service]
TTO_WAIT=360
PROLOG_FREQ=10
OLD_PROLOG_FREQ=10
INVENTORY_ON_STARTUP=0
by (760 points)
edited by
+1 vote
Hello,

Can you share your agent configuration please ?

At first sight I would say :

Is your OCS server in https ? If yes, change your server address in your agent conf file.

Is your SSL option at 1 (in agent conf) ? If yes, put it at "0"

+ delete the port from your address server, useless if it is the default one (80)
by (4.9k points)
edited by
+1 vote

What is in your activity.log ? (probably /var/log/ocsinventory-server/)

Check z-ocsinventory-server.conf, it is at /etc/httpd/conf.d/z-ocsinventory-server.conf on CentOS :

  # Master Database settings
  # Replace localhost by hostname or ip of MySQL server for WRITE
  PerlSetEnv OCS_DB_HOST localhost
  # Replace 3306 by port where running MySQL server, generally 3306
  PerlSetEnv OCS_DB_PORT 3306
  # Name of database
  PerlSetEnv OCS_DB_NAME ocsweb
  PerlSetEnv OCS_DB_LOCAL ocsweb
  # User allowed to connect to database
  PerlSetEnv OCS_DB_USER DATABASE_USER (maybe root ?)
  # Password for user
  PerlSetVar OCS_DB_PWD DATABASE_PASSWORD 

Restart apache server

+

Did you modify apache configuration by adding /ocsinventory somewhere ? Or something similar ?

by (4.9k points)
0 votes
I don't find the first and second files (I don't found httpd)

I haven't edit apache
by (760 points)
+1 vote

I didn't noticed but you are on Debian so it is normal, httpd is the web package in CentOS, you, it is apache2.

Do the following commands to find these files :

  • updatedb
  • locate activity.log
  • locate ocsinventory-server.conf
by (4.9k points)
0 votes
Ok I try and I say the result
by (760 points)
0 votes
I have try to change the account of appache and I have this message in error.log

ocsinventory-server: Bad setting. `SUPPORT` is not set. Default: `1`
ocsinventory-server: Can't load SOAP::Transport::HTTP* - Web service will be unavailable
ocsinventory-server: Bad setting. `SUPPORT` is not set. Default: `1`
ocsinventory-server: Can't load SOAP::Transport::HTTP* - Web service will be unavailable
[Wed Mar 01 14:18:51.302557 2017] [mpm_prefork:notice] [pid 1066] AH00163: Apache/2.4.10 (Debian) mod_perl/2.0.9dev Perl/v5.20.2 configured -- resuming normal operations
[Wed Mar 01 14:18:51.302642 2017] [core:notice] [pid 1066] AH00094: Command line: '/usr/sbin/apache2'
by (760 points)
0 votes
you don't need to touch apache configuration nor users... put it like before.

Did you find the files I speak about ?
by (4.9k points)
0 votes
Hi,

Which version of OCS Inventory server and agent?

Regards

Frank
by (88.5k points)
0 votes

Frank,

the version of server and agent is 2.3

by (760 points)
 
Powered by Question2Answer
...