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.

I got an error 500 when my agent contact the server [closed]

Hi,

When my agent contact the server, I have an error 500. In the log of my windows agent, I get this when I activate the debug mode:

COM SERVER => Sending HTTP Post request to URL <http:// exemple.com/ocsinventory>
COM SERVER => HTTP Post response received <HTTP Status Code #500>

The error log from apache say me this error too:

Can't call method "do" on an undefined value at /usr/local/share/perl/5.14.2/Apache/Ocsinventory/Server/System.pm line 177.\n

What is the problem ?

closed with the note: Resolve
in OCS Inventory NG server for Unix by (22k points)
closed by

1 Answer

+2 votes
 
Best answer

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 these 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

If your password contains some specials characters, you can use single quote ( ' ) around it.

by (22k points)
selected by
Excelent! you rescued me from a stresante problem!!! :D i corriged the z-ocsinvetory...conf file and the agent conects ok with the server.
 
Powered by Question2Answer
...