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

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

Problem When Trying to send Inventory

I have a fresh installation of the last version of OCS on a centos server.

I have a windows 7 pc with OCS Agent installed. Nothing append when I launch inventory. I can't see the computer on OCS reports.

In the Agent logs i can see :

COM SERVER => Sending HTTP Post request to URL <http://ocs-srv.dagimport.com/ocsinventory>

COM SERVER => HTTP Post response received <HTTP Status Code #500>

COM SERVER => Cleaning cURL library

ERROR *** AGENT => Failed to send Inventory <HTTP Status Code #500>

AGENT =>  Communication Server ask for Package Download

DOWNLOAD => Package history file successfully cleaned for duplicate IDs

DOWNLOAD => Download disabled by server

I check my mysql server configuration and evrything is ok :

<IfModule mod_perl.c>

  # Which version of mod_perl we are using
  # For mod_perl <= 1.999_21, replace 2 by 1
  # For mod_perl > 1.999_21, replace 2 by 2

  # 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 ocs
  # Password for user
  PerlSetVar OCS_DB_PWD test

Here is my apache error.log : - - [26/Jul/2017:20:52:08 +0200] "GET /ocsinventory/deploy/label HTTP/1.1" 400 226 "-" "OCS-NG_WINDOWS_AGENT_v2.0.5.0" - - [26/Jul/2017:20:52:09 +0200] "POST /ocsinventory HTTP/1.1" 200 234 "-" "OCS-NG_WINDOWS_AGENT_v2.0.5.0" - - [26/Jul/2017:20:52:32 +0200] "POST /ocsinventory HTTP/1.1" 500 527 "-" "OCS-NG_WINDOWS_AGENT_v2.0.5.0" - - [26/Jul/2017:20:53:27 +0200] "GET /ocsinventory/deploy/label HTTP/1.1" 400 226 "-" "OCS-NG_WINDOWS_AGENT_v2.0.5.0" - - [26/Jul/2017:20:53:27 +0200] "POST /ocsinventory HTTP/1.1" 200 234 "-" "OCS-NG_WINDOWS_AGENT_v2.0.5.0" - - [26/Jul/2017:20:53:49 +0200] "POST /ocsinventory HTTP/1.1" 500 527 "-" "OCS-NG_WINDOWS_AGENT_v2.0.5.0"

Could someone help me please? I checked everything before posting here.

asked in OCS Inventory NG agent for Windows by (480 points)

15 Answers

0 votes
To sum up what i want to do :

I have an old Centos 5 server with OCS 2.0 RC4. I want to transfer it on a new Centos 7 server.

I have a working Centos 7 server to do this and inventory work from a test Windows PC (SSL activated).

Here is what i have done :

-Upgrading ocs server on the old server (encountering a lot of problem because centos 5 isn't supported anymore). The old server is working with inventory ok (No SSL).

-I have exported SQL database to a file :

mysqldump -u root -p ocsweb > ocs-database-save.sql

-I have imported the export file in the database of the newserver.

Everything seems to be ok, I have all my inventory available on the the server but if I try an inventory now it fail (error 500). I really don't understand. My test PC inventory worked fine just before the upgrade and without changing anything it doesn't work anymore.

Please tell me WHERE I can find the ocs logs. I just want to know where are the logs to know what is wrong.

I don't want to install again my server : it works juste before importing. Please just tell me where I can find this log file. I can't see any error in apache log file.

answered by (480 points)
0 votes
Please help me...
answered by (480 points)
0 votes

I suggest you to update your old server to 2.3.1 then backup the database and finally import dump into new server.

To update old server follow this procedure : 2.0rc4 -> last 2.1 -> last 2.2 -> 2.3.1. if you don't follow this procedure you'll encounter problems because tables aren't be corrected (columns missed for certains tables, missed tables and updated application files).


answered by (61.3k points)
0 votes
Thanks a lot for your help. I really don't know why there is no update docs on official documentation to explain that. Everybody gonna have problems if nobody explain that. I really don't understand...
answered by (480 points)
0 votes

Everything work!!!!!!!!!!

After a lot of problems (no more repository for centos 5, no requiered PHP 5.4 version on centos 5,etc...) it works!

So the solution is 2.0rc4 -> last 2.1 -> last 2.2 -> 2.3.1

Do you know how I can ask to add this on offcial documentation? I really don't understand why this is not explained in it.... definitely I don't understand...

answered by (480 points)
Powered by Question2Answer