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.

Can't recevied any agent,Server2.3,Agent2.3

Hello,

I installed server on 10.147.9.151,centos6.5,apache2.2,php7.1,mysql 5.7, by setup.sh

server located in /usr/share/ocsinventory-reports

and viste 10.147.9.151/ocsreports to web-gui

when I run AgentNow, apache log put out:

10.147.10.11 - - [20/Feb/2017:18:05:18 +0800] "GET /ocsreports/deploy/label HTTP/1.1" 404 300 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
10.147.10.11 - - [20/Feb/2017:18:05:18 +0800] "POST /ocsreports HTTP/1.1" 301 318 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
10.147.10.11 - - [20/Feb/2017:18:05:18 +0800] "GET /ocsreports/ HTTP/1.1" 200 6621 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"

how could I do to fix it?

thanks a lot!
in OCS Inventory NG server for Unix by (320 points)

10 Answers

0 votes
Hi,

Which url have you set in ocsinventory.ini file?

Have you errors in /var/log/httpd/error_log file? Post the content of this file.

Regards

Frank
by (90.2k points)
0 votes

Dear Frank,

ocsinventory.ini file----you mean /etc/httpd/conf.d/ocsinventory-reports.conf ?

Here the things

Alias /ocsreports /usr/share/ocsinventory-reports/ocsreports

<Directory /usr/share/ocsinventory-reports/ocsreports>
    # By default, users can use console from everywhere
      <IfModule mod_authz_core.c>
        # Apache 2.4
        Require all granted
          </IfModule>
          <IfModule !mod_authz_core.c>
        Order deny,allow
        Allow from all
      </IfModule>
    Options Indexes FollowSymLinks
    DirectoryIndex index.php
    AllowOverride Options

/var/log/httpd/error_log

[Mon Feb 20 19:04:20 2017] [error] [client 10.147.10.11] File does not exist: /usr/share/ocsinventory-reports/ocsreports/deploy

ocsinventory.ini:

[OCS Inventory Agent]
ComProvider=ComHTTP.dll
Debug=1
Local=
NoSoftware=0
HKCU=0
NoTAG=0
IpDisc=
[HTTP]
Server=http://10.147.9.151/ocsreports
SSL=1
CaBundle=cacert.pem
AuthRequired=0
User=
Pwd=
ProxyType=0
Proxy=
ProxyPort=0
ProxyAuthRequired=0
ProxyUser=
ProxyPwd=
[OCS Inventory Service]
TTO_WAIT=30000
INVENTORY_ON_STARTUP=0
PROLOG_FREQ=10
OLD_PROLOG_FREQ=10

Should I chmod ocsreports to apche:apache?

Thanks

by (320 points)
edited by
0 votes

[HTTP]
Server=http://10.147.9.151/ocsreports

Change http by https in your .ini file :) 

by (4.9k points)
0 votes

Hi

Server=http://10.147.9.151/ocsreports is not correct. You must have Server=http://10.147.9.151/ocsinventory

Regards

Frank

by (90.2k points)
0 votes
i fixed =http://10.147.9.151/ocsreports

But still can't

HTTP 404

and i open http://10.147.9.151/ocsreports to WebConsole,

i cant open http://10.147.9.151/ocsinventory,browse return 404 error
by (320 points)
0 votes
Is your OCS Server in https ? If yes, change it in your ini file
by (4.9k points)
0 votes
Hi,

mod_perl module is installed and activated? Otherwise you'll have error 404.

Post /var/log/http/error_log file content.

To @vincent_n: when all will be ok then https will be activated. Here https is not needed.

Regards

Frank
by (90.2k points)
0 votes
@Frank:

/var/log/httpd/error_log:

[Tue Feb 21 08:53:05 2017] [error] [client 10.147.10.11] File does not exist: /usr/share/ocsinventory-reports/ocsreports/deploy

I reinstalled mod_perl 2.0.10 by hand,use perl Makefile.PL && make && make test && make install

and reinstalled OCSNG by setup.s

but still error 404

This is /var/log/httpd/access_log

10.147.10.11 - - [21/Feb/2017:08:53:05 +0800] "GET /ocsreports/deploy/label HTTP/1.1" 404 300 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
10.147.10.11 - - [21/Feb/2017:08:53:05 +0800] "POST /ocsreports HTTP/1.1" 301 318 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"
10.147.10.11 - - [21/Feb/2017:08:53:05 +0800] "GET /ocsreports/ HTTP/1.1" 200 6621 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"

what should i do?

PS:yum install mod_perl,tell me like this:

Installing:
 mod_perl                 x86_64        2.0.4-10.el6            
Installing for dependencies:
 perl-BSD-Resource        x86_64        1.29.03-3.el6        

but i already installed mod_perl 2.0.10
by (320 points)
0 votes
Hi,

mod_perl.so is correctly loaded by apache? See httpd.conf file.

Regards

Frank
by (90.2k points)
0 votes
@Frank:

I installed mod_perl by yum, and use PHPinfo() site I can see the mod_perl already loaded,but when agent run,still send

[Wed Feb 22 08:46:46 2017] [error] [client 10.147.10.11] File does not exist: /usr/share/ocsinventory-reports/ocsreports/deploy

and

10.147.10.11 - - [22/Feb/2017:08:48:52 +0800] "GET /ocsreports/deploy/label HTTP/1.1" 404 300 "-" "OCS-NG_WINDOWS_AGENT_v2.3.0.0"

---------------------------------------------

And now I visited ip/ocsinventory,http return error 500,I fixed mysql password and user,

now http return error 400,

Agent ini use Server=http://10.147.9.151/ocsinventory

Http error_log is:
[Wed Feb 22 09:03:06 2017] [error] [client 10.147.10.11] mpxs_Apache2__RequestRec_print: $r->print can't be called before the response phase at /usr/local/share/perl5/Apache/Ocsinventory/Server/Communication.pm line 182.\n

what should i do next?

PS:can i got u communicate way?like e-mail , Google+ etc. because we are in different  time zone~xD

Thanks
by (320 points)
edited by
 
Powered by Question2Answer
...