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.

Why does windows OCS NG agent receive http status code 500

I recently implemented OCS and can't seem to get the windows agent to communicate with the OCS server. I downloaded and install the latest release for both server side and client/agent.

I installed OCS on a windows server 2008 r2 box. At the step where I asked for credentials(optional) I have entered all the credentials i have documented. Yet below is the output of the ocsinventory.log file

Starting OCS Inventory NG Agent on Tuesday, August 16, 2016 12:50:08.
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)
AGENT => Using network connection with Communication Server
AGENT => Using Communication Provider <OCS Inventory NG cURL Communication Provider> Version <2.1.1.3>
AGENT => Sending Prolog
ERROR *** AGENT => Failed to send Prolog <HTTP Status Code #500>
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:00.

---

I have also left the credentials prompt blank. What credentials am I suppose to use here?

I have used the mysql root, web ui user/pass, and ocs db user and password with no luck.

lastly, I modified the ocsinventory.ini file as recommended on their wiki documentation:

Solution: OCS engine can't comunicate with mysql server. Probably due to a wrong mysql account. You have to check z-ocsinventory-server.conf (ocsinventory-server.conf on Windows Server), exactly theses few lines
# 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 ocs

Modify OCS_DB_USER and OCS_DB_PWD with your own account, restart apache, and finaly launch an inventory.

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

1 Answer

0 votes
I modified the ocsweb user/password in the ocsinventory-server.conf file in the apache/conf/extra directory.

Perhaps I was modifying a different file. Not sure, but now it works.

T
by (190 points)
 
Powered by Question2Answer
...