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.

Local Import = Error HTTP/1.1 400 Bad Request

Hi everyone,

after upgrading my OCS server to the v2.3.1 on a Debian Jessie server, I cannot make any local import since the management console, I obtain the error "HTTP / 1.1 Error 400 Bad Request" while the agents inventories do well.

  • In the OCS activity.log, there is no error message.
  • In the Apache access.log, I found this :

10.75.x.x - - [29/Mar/2017:10:26:23 +0200] "GET /ocsreports/index.php?function=admin_local_import HTTP/1.1" 200 3103 "http://ocsserver/ocsreports/index.php?function=admin_logs" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) $
::1 - - [29/Mar/2017:10:26:27 +0200] "POST /ocsinventory HTTP/1.1" 400 0 "-" "-"
10.75.x.x - - [29/Mar/2017:10:26:27 +0200] "POST /ocsreports/index.php?function=admin_local_import HTTP/1.1" 200 3171 "http://ocsserver/ocsreports/index.php?function=admin_local_import" "Mozilla/5.0 (Windows NT 10.0; Win$
::1 - - [29/Mar/2017:10:26:28 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.10 (Debian) mod_perl/2.0.9dev Perl/v5.20.2 (internal dummy connection)"
::1 - - [29/Mar/2017:10:26:35 +0200] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.10 (Debian) mod_perl/2.0.9dev Perl/v5.20.2 (internal dummy connection)"

  • In the Apache error.log, I have this :

[Wed Mar 29 10:25:20.995195 2017] [mpm_prefork:notice] [pid 15489] AH00169: caught SIGTERM, shutting down
ocsinventory-server: Can't load SOAP::Transport::HTTP* - Web service will be unavailable
ocsinventory-server: Can't load SOAP::Transport::HTTP* - Web service will be unavailable
[Wed Mar 29 10:25:22.817099 2017] [mpm_prefork:notice] [pid 15593] AH00163: Apache/2.4.10 (Debian) mod_perl/2.0.9dev Perl/v5.20.2 configured -- resuming normal operations
[Wed Mar 29 10:25:22.817163 2017] [core:notice] [pid 15593] AH00094: Command line: '/usr/sbin/apache2'

Do you know where from it comes ?

We have several local inventories to be imported and that becomes annoying... :/

Thank you for your help,

Yann

in Administrative console by (460 points)

12 Answers

0 votes

Hi stef_eure and thank you for your answers !

So, I make a test with your command line "perl ./ocsinventory-injector.pl --url http://localhost/ocsinventory -d /mnt/nas/SUIVI/OCS" and it works great !

This is an alternative "solution" but it's ok for the moment, thank you very much ! :D

by (460 points)
0 votes

Ok.

I've just made a new test environment with a new Debian server and fresh install into a VM and the problem is still here !

This is not a problem with an uprade error.

Operating system

OS Name : Linux x86_64
Version : 3.16.0-4-amd64
RAM installed : 986 MB
Free RAM : 673 MB
CPU : Intel(R) Core(TM) i5-7440HQ CPU @ 2.80GHz
Distribution : Debian GNU/Linux 8 (jessie)

Software

PHP Version : 5.6.30
Web Server : Apache/2.4.10 (Debian)
Database Server : (Debian) version 5.5.55-0+deb8u1
Version OCSReports: 2.3.1

EDIT :

The problem is present too with OCS 2.2.1 on a Debian server up to date after a fresh install...

Mmmm...

EDIT 2 :

...testing on VMs Debian 8.6 and 8.7 and OCS 2.2 = the error is here too...

I think, maybe, there is a compatibility problem with a newer version of a dependencies, perl, mysql or apache...

sad

EDIT 3 :

Same problem on Debian 8.6 and OCS 2.1.2...

# mysql -Vmysql  Ver 14.14 Distrib 5.5.55, for debian-linux-gnu (x86_64) using readline 6.3

# php --versionPHP 5.6.30-0+deb8u1 (cli) (built: Feb  8 2017 08:50:21)

# apachectl -VServer version: Apache/2.4.10 (Debian)

by (460 points)
edited by
 
Powered by Question2Answer
...