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

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

Failed to send Prolog <#500> after drop user ocs

Error uploading inventory to server.
ERROR *** AGENT => Failed to send Prolog <HTTP Status Code #500>

Problem started after creating new DB user and dropping user ocs@localhost following info from http://ask.ocsinventory-ng.org/6797/how-to-change-user-password-and-fix-error

Renaming info seems to be complete for website (<webserver>/ocsreports) but incomplete for inventory (<webserver>/ocsinventory)

When sending an inventory from client an error is logged in /var/log/httpd for every inventory upload from the client: DBI connect('database=ocs;host=localhost;port=3306','ocs',...) failed: Access denied for user 'ocs'@'localhost' (using password: YES) at /usr/local/share/perl5/Apache/Ocsinventory/Server/System.pm line 187

I couldn't find where user ocs is defined/called. Must be a .php or .pm used for adding inventory to the DB that is using wrong (hard coded?) credentials or some kind of mix-up in vars (OCS_DB_NAME vs OCS_DB_USER?)

For now recreated user ocs with non-default password. That's working fine. But would be nice if manual for renaming user is checked.

in OCS Inventory NG server for Unix by (450 points)

3 Answers

0 votes
Hi

You have to change the password in z-ocsinventory-server.conf file, then restart apache after.

Best regards

Frank
by (88.5k points)
0 votes

Hi Frank,

find / -name z-ocs* -print
/etc/httpd/conf.d/z-ocsinventory-server.conf

Settings in z-ocsinventory-server.conf

  PerlSetEnv OCS_DB_USER myuser
  PerlSetVar OCS_DB_PWD myuser_password

If user ocs is missing in DB then error
DBI connect('database=ocs;host=localhost;port=3306','ocs',...) failed: Access denied for user 'ocs'@'localhost' (using password: YES) at /usr/local/share/perl5/Apache/Ocsinventory/Server/System.pm line 187

So, var "PerlSetEnv OCS_DB_USER myuser" is not effective for some reason.

Restarted httpd service and also restarted the complete server. Error stays the same.

by (450 points)
try to stop and start apache. Sometimes, restart don't reload all files.
0 votes
Even a complete restart of the server was no solution.
by (450 points)
 
Powered by Question2Answer
...