OCSInventory-NG / OCSInventory-Server

Communication server of OCS Inventory
http://www.ocsinventory-ng.org/
GNU General Public License v2.0
344 stars 139 forks source link

All software page loads but does not show any data #343

Closed TheFiZi closed 3 years ago

TheFiZi commented 3 years ago

General informations

Operating system : CentOS Linux release 7.9.2009 (Core)

Server informations

Perl version : v5.16.3 Mysql / Mariadb / Percona version : 5.5.68-MariaDB

OCS Inventory informations

Ocs server version : 2.9.1

Problem's description

Since upgrading to 2.9.1 when I go to the OCS Inventory WebUI and click Inventory -> All Software none of our software is listed.

If I check the software table in MySQL i can see thousands of entries.

If I go to individual PC via All computers and select a random computer, then go to Software I can see the list of software installed on the workstation.

I am not seeing any MySQL errors in the HTTP error log and the HTTP log itself is only showing a 404 on a missing PNG but not for the actual PHP pages

10.222.132.204 - - [30/Jul/2021:13:07:58 -0700] "GET /ocsreports/index.php?function=visu_computers HTTP/1.1" 200 29711
10.222.132.204 - - [30/Jul/2021:13:07:59 -0700] "GET /libraries/datatable/media/images/sort_both.png HTTP/1.1" 404 244
10.222.132.204 - - [30/Jul/2021:13:07:59 -0700] "POST /ocsreports/ajax.php?function=visu_computers&no_header=true&no_footer=true HTTP/1.1" 200 18354
10.222.132.204 - - [30/Jul/2021:13:08:00 -0700] "GET /ocsreports/index.php?function=visu_all_soft HTTP/1.1" 200 20779
10.222.132.204 - - [30/Jul/2021:13:08:01 -0700] "GET /libraries/datatable/media/images/sort_both.png HTTP/1.1" 404 244
10.222.132.204 - - [30/Jul/2021:13:08:01 -0700] "POST /ocsreports/ajax.php?function=visu_all_soft&no_header=true&no_footer=true HTTP/1.1" 200 77
10.222.132.204 - - [30/Jul/2021:13:08:01 -0700] "GET /libraries/datatable/media/images/sort_asc.png HTTP/1.1" 404 243
TheFiZi commented 3 years ago

From my browser console, this might be related:

image

For the missing CSS files, do not exist:

# ls -la /usr/share/ocsinventory-reports/ocsreports/libraries/bootstrap/css

drwxr-xr-x 2 root apache     60 Nov  8  2017 .
drwxr-xr-x 5 root apache     37 Nov  8  2017 ..
-rw-r--r-- 1 root apache 121200 Jul 30 12:28 bootstrap.min.css
-rw-r--r-- 1 root apache  23409 Jul 30 12:28 bootstrap-theme.min.css

I think /ocsreports/libraries/datatable/media/image should be /ocsreports/libraries/datatable/media/images

For /ocsreports/img/ it should be /ocsreports/image I think

There is no /usr/share/ocsinventory-reports/ocsreports/image/validation.png

The issue with /libraries/datatable/media/images/sort_both.png appears to be a UTF character, if you look very closely at the screenshot the d in media is not a d

TheFiZi commented 3 years ago

I see this should probably be posted here: https://github.com/OCSInventory-NG/OCSInventory-Server/issues/343

I will close this and move it.

TheFiZi commented 3 years ago

In case anyone else runs into this, I guess there is a cronjob you need to configure now that I couldn't find any reference to in the docs. Closest I found was this: https://wiki.ocsinventory-ng.org/03.Basic-documentation/Understanding-OCS-Crontab/#understanding-ocs-crontab

We went with an every 6 hour schedule

0 */6 * * * cd /usr/share/ocsinventory-reports/ocsreports/crontab && /bin/php cron_all_software.php >/dev/null 2>&1

I think if you do a RPM installation it's taken care of for you.

jackadam1981 commented 7 months ago

i'm run ocs in docker,it's not found crontab,this is a docker image problem?