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.

Agent sends the report ok, but nothing appears in the web console. Version 2.3

Hi,

I don't have any errors in the apache's error log. The agent sends the report ok, but nothing is showed in the console. No errors.

The only thing I can see, is the success connection in the apache's access log:

============================================
Apache access.log
============================================
myClientIPhere - - [13/Feb/2017:08:20:45 +0000] "POST /ocsinventory HTTP/1.1" 301 530 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
myClientIPhere - - [13/Feb/2017:08:20:46 +0000] "GET /ocsinventory/ HTTP/1.1" 200 7046 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"

============================================
 

I have spent several hours with this software (installing on differente linus versions) with the same results. I hope you can help me, but I fear that I will have to choose another softwaresolution.

Thanks in advance.
in Administrative console by (280 points)

25 Answers

0 votes
Hi,

It's not necessary to open a new thread, just answer to the first.

As I can see inventories are sent to the server. So you must see in the interface.

Regards

Frank
by (88.5k points)
0 votes
Sorry for opening a new thread. :-P

The point is I can't see any anything, the agent log is ok, the apache log is ok. But nothing appears in the web console, and no data is inserted in the mysql database.

I don't know where else to look at.

Can you suggest me any other test to find where the problem may be?
by (280 points)
0 votes

Hi,

In z-ocsinventory-server.conf file set OCS_OPT_DBI_PRINT_ERROR to 1 and restart apache. With this option database messages will be logged in apache error log file.

Another information : the URL you set in each agent has to be http://@ip_or_fqdn:port_if_different_of_80/ocsinventory and not http://@ip_or_fqdn:port_if_different_of_80/ocsreports

Regards

Frank

by (88.5k points)
0 votes

I have the same.

Code  apache 200 = OK

Code apache 301 = moved permanently...

If you test with a linux agent, you will have this error 301:moved permanently.. I have this error and I don't know how to fix it.

If you find, thanks to share ;)

by (1.1k points)
0 votes
Hi,

Have you set a directory /ocsinventory in your apache configuration? If yes remove it and restart apache. /ocsinventory is "virtual" and managed by perl.

Regards

Frank
by (88.5k points)
edited by
How to remove this folder?
0 votes
As far as I'm concerned, I have : /var/www/ocsinventory/ocsreports

Is it this directory? Because it was created during the installation...

Please, can you tell me in wich files I can see if I have set a directory with this name? Is it apache.conf? I don't touch this file yet... I don't touch anything ;)

Thank you.
by (1.1k points)
0 votes
Hi,

/ocsinventory must be defined only in /etc/apache2/sites.enabled/z-ocsinventory-server.conf file. Any other definition must be removed. Generally this is defined in a file in /etc/apache2 directory. use this command to retrieve it.

grep -rni "/ocsinventory" /etc/apache2/*

Regards

Frank
by (88.5k points)
0 votes
Thank you ;)

sudo grep -rni "/ocsinventory" /etc/apache2/*
/etc/apache2/conf-available/z-ocsinventory-server.conf:47:  PerlSetEnv OCS_OPT_LOGPATH "/var/log/ocsinventory-server"
/etc/apache2/conf-available/z-ocsinventory-server.conf:238:  PerlSetEnv OCS_PLUGINS_PERL_DIR "/etc/ocsinventory-server/perl"
/etc/apache2/conf-available/z-ocsinventory-server.conf:239:  PerlSetEnv OCS_PLUGINS_CONF_DIR "/etc/ocsinventory-server/plugins"
/etc/apache2/conf-available/z-ocsinventory-server.conf:294:  <Location /ocsinventory

So, it seems good.

Can I keep the directory /var/www/ocsinventory? Because it was created during installation, and I don't spécified anything...

Thank you.
by (1.1k points)
edited by
0 votes
Hi,

Remove this directory. You don't need it.

Regards

Frank
by (88.5k points)
0 votes
Are you sure , Because it's contain all my directories:

ls -l /var/www/ocsinventory/
total 164
drwxrwxr-x  4 www-data www-data  4096 Feb 13 17:08 Apache
drwxrwxr-x  2 www-data www-data  4096 Dec 15 11:19 binutils
drwxrwxr-x  3 www-data www-data  4096 Nov 23 17:05 dtd
drwxrwxr-x  4 www-data www-data  4096 Nov 23 17:05 etc
-rw-rw-r--  1 www-data www-data   663 Jan 12 11:05 INSTALL
-rw-rw-r--  1 www-data www-data 17987 Nov 23 17:05 LICENSE
-rw-r--r--  1 www-data www-data   177 Feb 13 17:08 logrotate.ocsinventory-server.local
-rw-r--r--  1 www-data www-data 13468 Feb 13 17:08 ocsinventory-server.conf.local
drwxrwxr-x 14 www-data www-data  4096 Feb 13 16:52 ocsreports
-rw-r--r--  1 www-data www-data 24740 Feb 13 17:09 ocs_server_setup.log
-rw-rw-r--  1 www-data www-data  3476 Jan 12 11:03 README.md
-rwxrwxr-x  1 www-data www-data 68868 Nov 23 17:05 setup.sh

Thank you.
by (1.1k points)
 
Powered by Question2Answer
...