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.

Not working after update.

After I updated from 2.5 to latest version(tried both normal and nightly) I am getting a HTTP ERROR 500 message when trying to access my OCS page.

Error in error_log:

[Tue Jul 28 16:11:43.337936 2020] [suexec:notice] [pid 1494] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

ocsinventory-server: Bad setting. `IPDISCOVER_LINK_TAG_NETWORK` is not set. Default: `0`

[Tue Jul 28 16:11:43.567538 2020] [lbmethod_heartbeat:notice] [pid 1494] AH02282: No slotmem from mod_heartmonitor

[Tue Jul 28 16:11:43.600248 2020] [mpm_prefork:notice] [pid 1494] AH00163: Apache/2.4.6 (CentOS) PHP/7.3.20 mod_perl/2.0.11 Perl/v5.16.3 configured -- resuming normal operations

[Tue Jul 28 16:11:43.600286 2020] [core:notice] [pid 1494] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

[Tue Jul 28 16:12:07.635760 2020] [php7:warn] [pid 1499] [client 10.240.240.13:52981] PHP Warning:  require(require/fichierConf.class.php): failed to open stream: Permission denied in /usr/share/ocsinventory-reports/ocsreports/index.php on line 29

[Tue Jul 28 16:12:07.635816 2020] [php7:error] [pid 1499] [client 10.240.240.13:52981] PHP Fatal error:  require(): Failed opening required 'require/fichierConf.class.php' (include_path='.:/usr/share/pear:/usr/share/php') in /usr/share/ocsinventory-reports/ocsreports/index.php on line 29

[Tue Jul 28 16:12:09.132588 2020] [php7:warn] [pid 1495] [client 10.240.240.13:52980] PHP Warning:  require(require/fichierConf.class.php): failed to open stream: Permission denied in /usr/share/ocsinventory-reports/ocsreports/index.php on line 29

[Tue Jul 28 16:12:09.132647 2020] [php7:error] [pid 1495] [client 10.240.240.13:52980] PHP Fatal error:  require(): Failed opening required 'require/fichierConf.class.php' (include_path='.:/usr/share/pear:/usr/share/php') in /usr/share/ocsinventory-reports/ocsreports/index.php on line 29

[Tue Jul 28 16:12:09.826331 2020] [php7:warn] [pid 1496] [client 10.240.240.13:52982] PHP Warning:  require(require/fichierConf.class.php): failed to open stream: Permission denied in /usr/share/ocsinventory-reports/ocsreports/index.php on line 29

[Tue Jul 28 16:12:09.826392 2020] [php7:error] [pid 1496] [client 10.240.240.13:52982] PHP Fatal error:  require(): Failed opening required 'require/fichierConf.class.php' (include_path='.:/usr/share/pear:/usr/share/php') in /usr/share/ocsinventory-reports/ocsreports/index.php on line 29

What I did to update?

  1. Unpacked .tar.gz, sh setup.sh
  2. Recovered config files from backup using:
    cp ocsinventory-reports.conf z-ocsinventory-server.conf zz-ocsinventory-restapi.conf /etc/httpd/conf.d && cp dbconfig.inc.php /usr/share/ocsinventory-reports/ocsreports/
  3. Restarted httpd
Specs:
CentOS 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Fully updated

I tried everything, even reinstalling the update multiple times, any insight?

Thank you.

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

9 Answers

0 votes
Hi,

Fix permission problem on /usr/share/ocsinventory-reports/ocsreports/ directory and subdirectories. Then retry.

Regards

Frank
by (88.5k points)
0 votes
Did chmod 777 on all folders and subfolders and didn't worked.

Error log:

[Wed Jul 29 10:09:05.287536 2020] [php7:warn] [pid 2403] [client 10.240.240.4:50574] PHP Warning:  require_once(require/menu/include.php): failed to open stream: Permission denied in /usr/share/ocsinventory-reports/ocsreports/index.php on line 32

[Wed Jul 29 10:09:05.287575 2020] [php7:error] [pid 2403] [client 10.240.240.4:50574] PHP Fatal error:  require_once(): Failed opening required 'require/menu/include.php' (include_path='.:/usr/share/pear:/usr/share/php') in /usr/share/ocsinventory-reports/ocsreports/index.php on line 32

[Wed Jul 29 10:09:22.570383 2020] [mpm_prefork:notice] [pid 2401] AH00170: caught SIGWINCH, shutting down gracefully

[Wed Jul 29 10:22:52.719122 2020] [suexec:notice] [pid 13725] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

ocsinventory-server: Bad setting. `IPDISCOVER_LINK_TAG_NETWORK` is not set. Default: `0`

[Wed Jul 29 10:22:52.941298 2020] [lbmethod_heartbeat:notice] [pid 13725] AH02282: No slotmem from mod_heartmonitor

[Wed Jul 29 10:22:52.974481 2020] [mpm_prefork:notice] [pid 13725] AH00163: Apache/2.4.6 (CentOS) PHP/7.3.20 mod_perl/2.0.11 Perl/v5.16.3 configured -- resuming normal operations

[Wed Jul 29 10:22:52.974506 2020] [core:notice] [pid 13725] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

[Wed Jul 29 10:22:57.798297 2020] [php7:warn] [pid 13730] [client 10.240.240.4:50773] PHP Warning:  require(install.php): failed to open stream: No such file or directory in /usr/share/ocsinventory-reports/ocsreports/require/header.php on line 92

[Wed Jul 29 10:22:57.798347 2020] [php7:error] [pid 13730] [client 10.240.240.4:50773] PHP Fatal error:  require(): Failed opening required 'install.php' (include_path='.:/usr/share/pear:/usr/share/php') in /usr/share/ocsinventory-report
by (360 points)
edited by
0 votes
Managed to get it working after leaving install.php file.

However now my assets are not showing, even after SQL DB restore.

Does it take some time to populate?

Thanks.
by (360 points)
0 votes

not recommended , but try to disable SE Linux

sudo setenforce 0
https://linuxize.com/post/how-to-disable-selinux-on-centos-7/
Then restart apache 
https://phoenixnap.com/kb/how-to-restart-apache-centos-linux


by (22.6k points)
0 votes
@sokatra

SELinux is already disabled
by (360 points)
0 votes
errors in ocsinventory-agent.log ?
by (88.5k points)
0 votes
@frankb

Log:

DID_CHECK => Read DeviceID <DESKTOP-D7BRPNF-2020-07-29-12-33-18> and MACs <88:D7:F6:3F:98:1602:00:4C:4F:4F:50> in file <ocsinventory.dat>

COM SERVER => Initializing cURL library for sendRequest

COM SERVER => Using cURL without server authentication

COM SERVER => Disabling cURL proxy support

COM SERVER => Disabling cURL SSL server validation support

COM SERVER => Sending HTTP Post request to URL <http://DELETED_BY_MODERATOR/ocsinventory>

COM SERVER => HTTP Post response received <HTTP Status Code #500>

COM SERVER => Cleaning cURL library

ERROR *** AGENT => Failed to send Prolog <HTTP Status Code #500>

AGENT => Unloading communication provider

AGENT => Unloading plug-in(s)

AGENT => Execution duration: 00:00:01.
by (360 points)
edited by
0 votes

I have changed the mysql user (ocs) to a new password and changed in the config file.

Now this is the error presenting in error_log:

 cat error_log

[Wed Jul 29 13:59:23.890362 2020] [suexec:notice] [pid 3815] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

ocsinventory-server: Bad setting. `IPDISCOVER_LINK_TAG_NETWORK` is not set. Default: `0`

[Wed Jul 29 13:59:24.117065 2020] [lbmethod_heartbeat:notice] [pid 3815] AH02282: No slotmem from mod_heartmonitor

[Wed Jul 29 13:59:24.150126 2020] [mpm_prefork:notice] [pid 3815] AH00163: Apache/2.4.6 (CentOS) PHP/7.3.20 mod_perl/2.0.11 Perl/v5.16.3 configured -- resuming normal operations

[Wed Jul 29 13:59:24.150152 2020] [core:notice] [pid 3815] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

by (360 points)
0 votes

Managed to get it working.

How?

  1. Rolled back to 2.7 stable(I was testing with nightly)
  2. Changed all MySQL password 
  3. Changed all config files
  4. Setuped dbconfig settings in the install.php(not restoring the backuped file)
by (360 points)
 
Powered by Question2Answer
...