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.

OCS Linux And Windows agents can't communicate with the OCS Server [closed]

Environment:

OCS Server: Ubuntu 14, OCS - 2.3.1

OCS Agents: OCS 2.3 on Ubuntu 14, Windows 7, Windows 8, Windows 10

I don't see any servers or computers at the http://website/ocsreports/

I checked my  Agent log file and I got this:

 [error] Cannot establish communication : 404 Not Found

 mod_perl module correctly installed on the OCS server.

My Ubuntu agent config file is :

server=http://server.ip.address/ocsinventory
debug=1
basevardir=/var/lib/ocsinventory-agent

I restarted Apache web server few times, it wasn't help me.

What else can I do to fix this issue? 

Please help me ASAP.

THANKS!

closed with the note: Problem closed - no more discussion on the topic
in OCS Inventory NG agent for Unix by (440 points)
closed by

15 Answers

0 votes
try to use ocs agent ver 2.1 on your computer client . it's usually wrong about version of software .

It's also if your configuration is success and nothing found erors
by (240 points)
0 votes
Thanks for respond, I installed OCS-Agent 2.1 on the Ubuntu server as you said above, but I have the same issue. It doesn't work.
by (440 points)
edited by
0 votes
Your error says that the agent cannot reach the server.

Are you sure about your IP ?

Check if your server is in https or not. If yes, then change the agent configuration.
by (4.9k points)
0 votes

Hi vincent_n thanks for respond, but I have regular website http://website.com I don't use https://website.com 

So issue is not with https.  Something wrong on the OCS Ubuntu server. 

I check everything, I google this issue, I reinstalled OCS server, I did everything I could. Port 80 is open. 

What can be wrong? I installed OCS server on CentOS on my virtualbox and it's working perfect. 

I don't know what else can I do with that Ubuntu OCS server. 

I guess need OCS Tech Support Help to resolve this issue.    

by (440 points)
0 votes
Can you share apache logs please ? (error and access)

Agent log too (set DEBUG option at 2 to have full logs)

+ agent configuration file

Thanks.
by (4.9k points)
0 votes
Ubuntu OCS agent config file on my first post ! ! !

[Thu Apr 13 09:43:09 2017][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.1.1
[Thu Apr 13 09:43:09 2017][debug] Log system initialised (File)
[Thu Apr 13 09:43:09 2017][debug] --scan-homedirs missing. Don't scan user directories
[Thu Apr 13 09:43:09 2017][debug] Accountinfo file: /var/lib/ocsinventory-agent/http:__MyIPAdress_ocsinventory/ocsinv.adm
[Thu Apr 13 09:43:09 2017][debug] OCS Agent initialised
[Thu Apr 13 09:43:10 2017][debug] Turns hooks on for /etc/ocsinventory/modules.conf
[Thu Apr 13 09:43:10 2017][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.1.1
[Thu Apr 13 09:43:10 2017][debug] Log system initialised (File)
[Thu Apr 13 09:43:10 2017][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.1.1
[Thu Apr 13 09:43:10 2017][debug] Log system initialised (File)
[Thu Apr 13 09:43:10 2017][debug] Calling handlers : `start_handler'
[Thu Apr 13 09:43:10 2017][debug] [snmp] Calling snmp_start_handler
[Thu Apr 13 09:43:10 2017][debug]  - Net::SNMP loaded
[Thu Apr 13 09:43:10 2017][debug] [download] Calling download_start_handler
[Thu Apr 13 09:43:10 2017][debug]  - LWP loaded
[Thu Apr 13 09:43:10 2017][debug]  - LWP::Protocol::https loaded
[Thu Apr 13 09:43:10 2017][debug] Compress::Zlib is available.
[Thu Apr 13 09:43:10 2017][debug] Calling handlers : `prolog_writer'
[Thu Apr 13 09:43:10 2017][debug] sending XML
[Thu Apr 13 09:43:10 2017][debug] sending: <?xml version="1.0" encoding="UTF-8"?>
<REQUEST>
  <DEVICEID>ip-172-32-72-25-2017-04-12-11-21-15</DEVICEID>
  <QUERY>PROLOG</QUERY>
</REQUEST>
[Thu Apr 13 09:43:10 2017][error] Cannot establish communication : 404 Not Found

Ubuntu Apache Access Log:

IP  - - [13/Apr/2017:09:27:04 -0400] "GET /zabbix/chart.php?itemids%5B%5D=25450&=&width=500&height=100&period=3600&stime=20180412105129&updateProfile=1&profileIdx=web.screens&profileIdx2=21&sid=01f1a21de6bc5cf8&scree$
IP  - - [13/Apr/2017:09:27:09 -0400] "GET /zabbix/chart.php?itemids%5B%5D=25465&=&width=500&height=100&period=3600&stime=20180412105129&updateProfile=1&profileIdx=web.screens&profileIdx2=21&sid=01f1a21de6bc5cf8&scree$
IP  - - [13/Apr/2017:09:27:09 -0400] "GET /zabbix/chart2.php?graphid=562&screenid=21&width=500&height=100&legend=1&updateProfile=1&profileIdx=web.screens&profileIdx2=21&period=3600&stime=20180412105129&sid=01f1a21de6$
IP  - - [13/Apr/2017:09:27:09 -0400] "GET /zabbix/chart.php?itemids%5B%5D=25451&=&width=500&height=100&period=3600&stime=20180412105129&updateProfile=1&profileIdx=web.screens&profileIdx2=21&sid=01f1a21de6bc5cf8&scree$
IP  - - [13/Apr/2017:09:27:15 -0400] "POST /zabbix/jsrpc.php?output=json-rpc HTTP/1.1" 200 1074 "http://mywebsite/zabbix/screens.php?elementid=21" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, $
IP  - - [13/Apr/2017:09:27:24 -0400] "GET /zabbix/chart6.php?graphid=600&screenid=21&width=500&height=100&legend=1&graph3d=1&updateProfile=1&profileIdx=web.screens&profileIdx2=21&period=3600&stime=20180412105129&sid=$
IP  - - [13/Apr/2017:09:27:24 -0400] "GET /zabbix/chart6.php?graphid=601&screenid=21&width=500&height=100&legend=1&graph3d=1&updateProfile=1&profileIdx=web.screens&profileIdx2=21&period=3600&stime=20180412105129&sid=$
IP  - - [13/Apr/2017:09:27:24 -0400] "GET /zabbix/chart6.php?graphid=641&screenid=21&width=500&height=100&legend=1&graph3d=1&updateProfile=1&profileIdx=web.screens&profileIdx2=21&period=3600&stime=20180412105129&sid=$
IP  - - [13/Apr/2017:09:27:26 -0400] "POST /zabbix/jsrpc.php?output=json-rpc HTTP/1.1" 200 1073 "http://mywebsite/zabbix/screens.php?elementid=21" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, $
IP  - - [13/Apr/2017:09:27:28 -0400] "GET /zabbix/chart.php?itemids%5B%5D=25449&=&width=500&height=100&period=3600&stime=20180412105129&updateProfile=1&profileIdx=web.screens&profileIdx2=21&sid=01f1a21de6bc5cf8&scree$
IP  - - [13/Apr/2017:09:27:28 -0400] "GET /zabbix/chart2.php?graphid=561&screenid=21&width=500&height=100&legend=1&updateProfile=1&profileIdx=web.screens&profileIdx2=21&period=3600&stime=20180412105129&sid=01f1a21de6$
IP  - - [13/Apr/2017:09:27:35 -0400] "GET /zabbix/chart.php?itemids%5B%5D=25450&=&width=500&height=100&period=3600&stime=20180412105129&updateProfile=1&profileIdx=web.screens&profileIdx2=21&sid=01f1a21de6bc5cf8&scree$
IP  - - [13/Apr/2017:09:27:37 -0400] "POST /zabbix/jsrpc.php?output=json-rpc HTTP/1.1" 200 1073 "http://mywebsite/zabbix/screens.php?elementid=21" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, $

Ubuntu Apache Error Log:

[Wed Apr 12 14:57:50.316424 2017] [ssl:warn] [pid 20268] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Apr 12 14:57:50.316460 2017] [ssl:warn] [pid 20268] AH01909: RSA certificate configured for mywebsite:443 does NOT include an ID which matches the server name
[Wed Apr 12 14:57:50.530790 2017] [ssl:warn] [pid 20269] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Apr 12 14:57:50.530816 2017] [ssl:warn] [pid 20269] AH01909: RSA certificate configured for mywebsite:443 does NOT include an ID which matches the server name
[Wed Apr 12 14:57:50.534586 2017] [mpm_prefork:notice] [pid 20269] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.21 OpenSSL/1.0.1f mod_perl/2.0.8 Perl/v5.18.2 configured -- resuming normal operations
[Wed Apr 12 14:57:50.534603 2017] [core:notice] [pid 20269] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 12 15:01:34.073706 2017] [mpm_prefork:notice] [pid 20269] AH00169: caught SIGTERM, shutting down
[Wed Apr 12 15:01:35.249550 2017] [ssl:warn] [pid 20635] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Apr 12 15:01:35.249581 2017] [ssl:warn] [pid 20635] AH01909: RSA certificate configured for mywebsite:443 does NOT include an ID which matches the server name
[Wed Apr 12 15:01:35.463968 2017] [ssl:warn] [pid 20636] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Apr 12 15:01:35.463996 2017] [ssl:warn] [pid 20636] AH01909: RSA certificate configured for mywebsite:443 does NOT include an ID which matches the server name
[Wed Apr 12 15:01:35.467708 2017] [mpm_prefork:notice] [pid 20636] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.21 OpenSSL/1.0.1f mod_perl/2.0.8 Perl/v5.18.2 configured -- resuming normal operations
[Wed Apr 12 15:01:35.467723 2017] [core:notice] [pid 20636] AH00094: Command line: '/usr/sbin/apache2'
[Thu Apr 13 02:00:25.268407 2017] [cgi:error] [pid 31985] [client IP:38106] script not found or unable to stat: /usr/lib/cgi-bin/php
by (440 points)
edited by
0 votes
I have another logs now, please take a look log from OCS agent Uduntu

[Fri Apr 14 08:01:33 2017][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.3
[Fri Apr 14 08:01:33 2017][debug] Log system initialised (File)
[Fri Apr 14 08:01:33 2017][debug] --scan-homedirs missing. Don't scan user directories
[Fri Apr 14 08:01:33 2017][debug] --server ignored since you also use --local
[Fri Apr 14 08:01:33 2017][debug] Accountinfo file: /var/lib/ocsinventory-agent/http:__52.8.178.172_ocsinventory/ocsinv.adm
[Fri Apr 14 08:01:33 2017][debug] OCS Agent initialised
[Fri Apr 14 08:01:33 2017][debug] Turns hooks on for /etc/ocsinventory/modules.conf
[Fri Apr 14 08:01:33 2017][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.3
[Fri Apr 14 08:01:33 2017][debug] Log system initialised (File)
[Fri Apr 14 08:01:33 2017][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.3
[Fri Apr 14 08:01:33 2017][debug] Log system initialised (File)
[Fri Apr 14 08:01:33 2017][debug] Calling handlers : `start_handler'
[Fri Apr 14 08:01:33 2017][debug] [download] Calling download_start_handler
[Fri Apr 14 08:01:33 2017][info] [download] Agent is running in local mode...disabling module
[Fri Apr 14 08:01:33 2017][debug]  - LWP loaded
[Fri Apr 14 08:01:33 2017][debug]  - LWP::Protocol::https loaded
[Fri Apr 14 08:01:33 2017][debug] [snmp] Calling snmp_start_handler
[Fri Apr 14 08:01:33 2017][info] [snmp] Agent is running in local mode...disabling module
[Fri Apr 14 08:01:33 2017][debug]  - Net::SNMP loaded
[Fri Apr 14 08:01:33 2017][debug] Ocsinventory::Agent::Backend::IpDiscover ignored
[Fri Apr 14 08:01:33 2017][debug] Ocsinventory::Agent::Backend::OS::AIX ignored
[Fri Apr 14 08:01:33 2017][debug] Ocsinventory::Agent::Backend::OS::BSD ignored
[Fri Apr 14 08:01:33 2017][debug]  - dmidecode found
[Fri Apr 14 08:01:33 2017][debug]  - dmidecode found
[Fri Apr 14 08:01:33 2017][debug]  - Sys::Hostname loaded
[Fri Apr 14 08:01:33 2017][debug] Ocsinventory::Agent::Backend::OS::Generic::Ipmi ignored
[Fri Apr 14 08:01:33 2017][debug]  - lspci found
[Fri Apr 14 08:01:33 2017][debug]  - lspci found
[Fri Apr 14 08:01:33 2017][debug]  - lsusb found
[Fri Apr 14 08:01:33 2017][debug] Ocsinventory::Agent::Backend::OS::Generic::Packaging::BSDpkg ignored
[Fri Apr 14 08:01:34 2017][debug]  - dpkg found
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Generic::Packaging::Gentoo ignored
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Generic::Packaging::Pacman ignored
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Generic::Packaging::RPM ignored
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Generic::Printers::Cups ignored
[Fri Apr 14 08:01:34 2017][debug]  - get-edid found
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::HPUX ignored
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Linux::Archs::ARM ignored
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Linux::Archs::Alpha ignored
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Linux::Archs::MIPS ignored
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Linux::Archs::PowerPC ignored
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Linux::Archs::SPARC ignored
[Fri Apr 14 08:01:34 2017][debug]  - /proc/cpuinfo can be read
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Linux::Archs::m68k ignored
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Linux::Archs::s390x ignored
[Fri Apr 14 08:01:34 2017][debug]  - lsb_release found
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::ArchLinux ignored
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::CentOS ignored
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Fedora ignored
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Gentooignored

[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Redhat ignored
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Slackware ignored
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::SuSE ignored
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Trustix ignored
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Ubuntu ignored
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::VmWare ignored
[Fri Apr 14 08:01:34 2017][debug]  - hostname found
[Fri Apr 14 08:01:34 2017][debug]  - df found
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Linux::LVM ignored
[Fri Apr 14 08:01:34 2017][debug]  - /proc/meminfo can be read
[Fri Apr 14 08:01:34 2017][debug]  - ip found
[Fri Apr 14 08:01:34 2017][debug] runWithTimeout(): unexpected error: Undefined subroutine &Ocsinventory::Agent::Backend::OS::Linux::Network$
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Linux::Network::IPv4 ignored
[Fri Apr 14 08:01:34 2017][debug]  - ifconfig found
[Fri Apr 14 08:01:34 2017][debug]  - route found
[Fri Apr 14 08:01:34 2017][debug]  - Net::IP qw(:PROC) loaded
[Fri Apr 14 08:01:34 2017][debug]  - lspci found
[Fri Apr 14 08:01:34 2017][debug] Ocsinventory::Agent::Backend::OS::Linux::Storages::3ware ignored
[Fri Apr 14 08:01:34 2017][debug]  - smartctl found
by (440 points)
0 votes
Hi

Did you enable z-ocsinventory-server.conf file with a2enconf command?

Could you post apache /var/log/apache2/error.log file content, please?

Regards

Frank
by (88.5k points)
0 votes
Hi Frank, thanks for respond!

This is what I get when I try to enable  a2enconf with z-ocsinventory-server

a2enconf z-ocsinventory-server.conf
ERROR: Conf z-ocsinventory-server does not exist!

You can see above my Apache Error log file.

Thanks!
by (440 points)
0 votes
Hi,

You can follow this procedure (ubuntu 16.04) => http://ask.ocsinventory-ng.org/4554/tutorial-ocs-on-ubuntu-16-04?show=4554#q4554

I think it will work for Ubuntu 14.04.

Regards

Frank
by (88.5k points)
 
Powered by Question2Answer
...