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.

Agents unable communicate with OCS Server

Hello!

OCS server version 2.4 installed on CentOS 7. Detail: PHP:5.4.16, Apache/2.4.6 (CentOS) PHP/5.4.16 mod_perl/2.0.10 Perl/v5.16.3, MySQL Community Server version 5.7.21

Windows Agent: ver. 2.3.1.1 without any plugins

After inventory attempt I see errors in /var/log/httpd/error_log:

[Fri Feb 09 13:03:11.631322 2018] [perl:error] [pid 1547] [client <ClientIP>:4007] Can't call method "do" on an undefined value at /usr/local/share/perl5/Apache/Ocsinventory/Server/System.pm line 189.\n
[Fri Feb 09 13:03:11.856704 2018] [perl:error] [pid 1544] [client <ClientIP>:4008] Can't call method "do" on an undefined value at /usr/local/share/perl5/Apache/Ocsinventory/Server/System.pm line 189.\n
[root@itop httpd]#

Thank You,

Best regards,

Andrew
in OCS Inventory NG server for Unix by (460 points)

7 Answers

0 votes
Hi,

Have you set the correct password of ocs user in z-ocsinventory-server.conf file? Verify also zz-ocsinventory-restapi.conf file.

Best regards

Frank
by (90.2k points)
0 votes
Hi!

Yes, in the z-ocsinventory-server.conf file settings is correct. With other settings (I was tried even root login for mysql) Apache does not start

Best regards,

Andrew
by (460 points)
0 votes
See apache error log file to find errors.

Best regards

Frank
by (90.2k points)
0 votes
I started this ask with roes from error_log file.
by (460 points)
0 votes

Hi,

Verify that the table networks contains the column 'MTU'. If not add it with the following command, then launch a new inventory.

Best regards

Frank

ALTER TABLE `networks` ADD `MTU` VARCHAR(255) NULL DEFAULT NULL AFTER `SPEED`;

by (90.2k points)
0 votes
Hi

I also get this behaviour on my fresh install.
Table Networks has column MTU in my case and I get same error message on httpd/error.log
 

Christian

EDIT: I finally decided to restart  the installation process with a fresh install. I followed this link to install and now it works. https://github.com/OCSInventory-NG/OCSInventory-ocsreports/issues/275
by (180 points)
edited by
0 votes
After digging more on this issue, I suggest you to check DB credentials are correct in  file /etc/httpd/conf.d/ocsinventory-server.conf

Also, verify Database name and user in mysql (mariadb)
by (180 points)
 
Powered by Question2Answer
...