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.

OCs on Debian error: Can't call method "do"

Hello,

I've been trying for the last weeks to get OCs-inventory working ona a Debian machine.

I get everything fine but, when I try to execute de agent from computer I get in the apache2 logs the following error:

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

I have already checked the configuration file for the user and password and I even created the ocs user and password so no change needs to be made.

The Windows agent logs keeps saying:

Service encounter error <OCS Inventory NG Agent encounter an error (exit code is 4 => Failed to talk with Communication Server)>.

I can reach the server, I can execute the install, I even can get to apache because I get the previous error on the logs.. I have no idea why this is not working..

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

1 Answer

0 votes

Your server is'nt configure correctly and cannot access to the database. 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.

by (22k points)
 
Powered by Question2Answer
...