OCSInventory-NG / UnixAgent

This is the OCS unified agent for Unix operating systems
http://www.ocsinventory-ng.org/en/
GNU General Public License v2.0
90 stars 83 forks source link

error message : Cannot establish communication : 400 Bad Request #200

Closed ghezzda closed 4 years ago

ghezzda commented 5 years ago

Software used: Client Operating system : Sierra ( 10.12.6 )
Perl version : perl 5, version 18, subversion 2 (v5.18.2) built for darwin-thread-multi-2level OCS Agent version : 2.4.2 (Ocsinventory_Agent_MacOSX-2.4.2.pkg)

Server Operating System: CentOS Linux release 7.6.1810 (Core) Perl version (on server) : perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi OCS Server version: 2.6

Agent has been installed following the guidelines : https://wiki.ocsinventory-ng.org/02.Basic-documentation/Setting-up-the-MacOSX-agent-on-client-computers/

Problem's description

After the update to OCS Server 2.6 and using UNIX Agent 2.4.2 , I am trying to use ocs agent in a MAC OS, installation goes fine, but it is not reporting to the server with the error message : Cannot establish communication : 400 Bad Request

Inventory log file ( optional )

Client Log File

[Thu May 16 14:26:14 2019][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.4.2 [Thu May 16 14:26:14 2019][debug] Log system initialised (File) [Thu May 16 14:26:14 2019][debug] --scan-homedirs missing. Don't scan user directories [Thu May 16 14:26:15 2019][debug] Accountinfo file: /var/lib/ocsinventory-agent/http:__dirf-ict-ocs.jrc.it_ocsinventory/ocsinv.adm [Thu May 16 14:26:15 2019][debug] OCS Agent initialised [Thu May 16 14:26:15 2019][debug] Failed to load `/etc/ocsinventory-agent/modules.conf': 0 [Thu May 16 14:26:15 2019][debug] No modules will be used. [Thu May 16 14:26:15 2019][debug] Compress::Zlib is not available! The data will be compressed with gzip instead but won't be accepted by server prior 1.02 [Thu May 16 14:26:15 2019][debug] sending XML [Thu May 16 14:26:15 2019][debug] sending: <?xml version="1.0" encoding="UTF-8"?>

gmolt029-2019-05-16-09-26-12 PROLOG

[Thu May 16 14:26:15 2019][error] Cannot establish communication : 400 Bad Request

Server Log File

[Thu May 16 14:49:10.321035 2019] [authz_core:debug] [pid 23698] mod_authz_core.c(809): [client 139.191.1XX.XY:55997] AH01626: authorization result of Require all granted: granted [Thu May 16 14:49:10.321372 2019] [authz_core:debug] [pid 23698] mod_authz_core.c(809): [client 139.191.1XX.XY:55997] AH01626: authorization result of : granted

informatico-madrid commented 4 years ago

same issue here in fedora 30

Scrik commented 4 years ago

same issue here in fedora 31

fbomj commented 4 years ago

Have you restarted apache after update ? Error 400 means that the agent's version is greater than the server's version.

Scrik commented 4 years ago

I fix it! add to file external_agents.txt agent version you need