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.

SSL and Unified Agent for Unix 2.3

Hello,

I use OCS Inventory already for several months, without SSL connection everything works fine.
To now also SNMP scans to perform, I have on the OCS server (Ubuntu 14.04 LTS) installed "Unified agent for UNIX, Linux and MacOSX 2.3" and SSL activated.
I used: https://lichtschattenblog.wordpress.com/2016/09/30/installation-und-einrichtung-ocs-inventory-server-unter-debian/
Unfortunately the inventory is not made via the SSL connection.
The last entry in th agent's logfile is "Cannot establish communication : 500 Internal Server Error"!
Neither in this log nor in the Apache log, I find further hints to contain the error!
I am very grateful for further information!

Best thanks & many greetings
Fridolin
in OCS Inventory NG agent for Unix by (220 points)
edited by

3 Answers

0 votes
Hello,

Can you give me the contents of the agent logs + ocsinventory.ini in C:\programdata\OCS Inventory NG\Agent ?
by (4.9k points)
0 votes
Hello,

sorry for the delay, i was traveling!

The agent's computer is the same, as the ocs-inventory-server. I want to use the snmp-scan-feature. If i understood it right, i need at least one snmp-agent. In this case the server itself.

The content of ocsinventory-agent.cfg (without xml-content and some reductions. I hope not that it is the ultimate!!):

tag=localhost

debug=1

ssl=0

server=https://localhost/ocsinventory

logfile=/var/log/ocs_agent

ca=/etc/ssl/certs/cacert.pem

basevardir=/var/lib/ocsinventory-agent

The content of ocsinventory-agent-debug.log

[Thu Jan 26 14:13:44 2017][error] Cannot establish communication : 500 Internal Server Error

[Thu Jan 26 15:41:09 2017][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.3

[Thu Jan 26 15:41:09 2017][debug] Log system initialised (File)

[Thu Jan 26 15:41:09 2017][debug] --scan-homedirs missing. Don't scan user directories

[Thu Jan 26 15:41:09 2017][debug] Accountinfo file: /var/lib/ocsinventory-agent/https:__localhost_ocsinventory/ocsinv.adm

[Thu Jan 26 15:41:09 2017][debug] OCS Agent initialised

[Thu Jan 26 15:41:09 2017][debug] Turns hooks on for /etc/ocsinventory/modules.conf

[Thu Jan 26 15:41:09 2017][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.3

[Thu Jan 26 15:41:09 2017][debug] Log system initialised (File)

[Thu Jan 26 15:41:09 2017][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.3

[Thu Jan 26 15:41:09 2017][debug] Log system initialised (File)

[Thu Jan 26 15:41:09 2017][debug] Calling handlers : `start_handler'

[Thu Jan 26 15:41:09 2017][debug] [snmp] Calling snmp_start_handler

[Thu Jan 26 15:41:10 2017][debug]  - Net::SNMP loaded

[Thu Jan 26 15:41:10 2017][debug] [download] Calling download_start_handler

[Thu Jan 26 15:41:10 2017][debug]  - LWP loaded

[Thu Jan 26 15:41:10 2017][debug]  - LWP::Protocol::https loaded

[Thu Jan 26 15:41:10 2017][debug] Compress::Zlib is available.

[Thu Jan 26 15:41:10 2017][debug] Calling handlers : `prolog_writer'

[Thu Jan 26 15:41:10 2017][debug] sending XML

[Thu Jan 26 15:41:10 2017][debug] sending: <?xml version="1.0" encoding="UTF-8"?>

<REQUEST>

  <DEVICEID>icinga-2017-01-26-12-58-22</DEVICEID>

  <QUERY>PROLOG</QUERY>

</REQUEST>

[Thu Jan 26 15:41:10 2017][debug] =BEGIN=SERVER RET======

[Thu Jan 26 15:41:10 2017][debug] $VAR1 = '<?xml version=\'1.0\' encoding=\'UTF-8\'?>

<REPLY>

  <OPTION>

    <NAME>DOWNLOAD</NAME>

    <PARAM FRAG_LATENCY="10" ON="0" TYPE="CONF" CYCLE_LATENCY="60" PERIOD_LATENCY="1" PERIOD_LENGTH="10" EXECUTION_TIMEOUT="120" TIMEOUT="30" />

  </OPTION>

  <PROLOG_FREQ>24</PROLOG_FREQ>

  <INVENTORY_ON_STARTUP>0</INVENTORY_ON_STARTUP>

  <RESPONSE>SEND</RESPONSE>

</REPLY>

';

[Thu Jan 26 15:41:10 2017][debug] =END=SERVER RET======

[Thu Jan 26 15:41:10 2017][debug] PROLOG_FREQ has not changed since last process

[Thu Jan 26 15:41:10 2017][debug] Calling handlers : `prolog_reader'

[Thu Jan 26 15:41:10 2017][debug] [snmp] Calling snmp_prolog_reader

[Thu Jan 26 15:41:10 2017][debug] [download] Calling download_prolog_reader

[Thu Jan 26 15:41:10 2017][debug] [download] <?xml version='1.0' encoding='UTF-8'?>

<REPLY>

  <OPTION>

    <NAME>DOWNLOAD</NAME>

    <PARAM FRAG_LATENCY="10" ON="0" TYPE="CONF" CYCLE_LATENCY="60" PERIOD_LATENCY="1" PERIOD_LENGTH="10" EXECUTION_TIMEOUT="120" TIMEOUT="30" />

  </OPTION>

  <PROLOG_FREQ>24</PROLOG_FREQ>

  <INVENTORY_ON_STARTUP>0</INVENTORY_ON_STARTUP>

  <RESPONSE>SEND</RESPONSE>

</REPLY>

[Thu Jan 26 15:41:10 2017][debug] [download] Writing config file.

[Thu Jan 26 15:41:10 2017][info] [download] Download is off.

[Thu Jan 26 15:41:10 2017][debug] Failed to load Ocsinventory::Agent::Backend::OS::MacOS::Video: Can't locate Parse/EDID.pm in @INC (you may need to install the Parse::EDID module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at /usr/local/share/perl/5.18.2/Ocsinventory/Agent/Backend/OS/MacOS/Video.pm line 4.

BEGIN failed--compilation aborted at /usr/local/share/perl/5.18.2/Ocsinventory/Agent/Backend/OS/MacOS/Video.pm line 4.

Compilation failed in require at (eval 156) line 1.

BEGIN failed--compilation aborted at (eval 156) line 1.

[Thu Jan 26 15:41:10 2017][debug]  - ipdiscover found

[Thu Jan 26 15:41:10 2017][debug]  - nmap found

[Thu Jan 26 15:41:10 2017][debug] Ocsinventory::Agent::Backend::IpDiscover::Nmap ignored

[Thu Jan 26 15:41:10 2017][debug] Ocsinventory::Agent::Backend::OS::AIX ignored

[Thu Jan 26 15:41:10 2017][debug] Ocsinventory::Agent::Backend::OS::BSD ignored

[Thu Jan 26 15:41:10 2017][debug]  - dmidecode found

[Thu Jan 26 15:41:10 2017][debug]  - dmidecode found

[Thu Jan 26 15:41:10 2017][debug]  - Sys::Hostname loaded

[Thu Jan 26 15:41:10 2017][debug] Ocsinventory::Agent::Backend::OS::Generic::Ipmi ignored

[Thu Jan 26 15:41:10 2017][debug]  - lspci found

[Thu Jan 26 15:41:10 2017][debug]  - lspci found

[Thu Jan 26 15:41:10 2017][debug]  - lsusb found

 [Thu Jan 26 15:51:13 2017][debug] last_state file: `/var/lib/ocsinventory-agent/https:__localhost_ocsinventory/last_state' doesn't exist (yet).

[Thu Jan 26 15:51:13 2017][debug] Section STORAGES has changed since last inventory

[Thu Jan 26 15:51:13 2017][debug] Section VIDEOS has changed since last inventory

[Thu Jan 26 15:51:13 2017][debug] Section DRIVES has changed since last inventory

[Thu Jan 26 15:51:13 2017][debug] Section VIRTUALMACHINES has changed since last inventory

[Thu Jan 26 15:51:13 2017][debug] Section INPUT has changed since last inventory

[Thu Jan 26 15:51:13 2017][debug] Section NETWORKS has changed since last inventory

[Thu Jan 26 15:51:13 2017][debug] Section CONTROLLERS has changed since last inventory

[Thu Jan 26 15:51:13 2017][debug] Section MEMORIES has changed since last inventory

[Thu Jan 26 15:51:13 2017][debug] Section BIOS has changed since last inventory

[Thu Jan 26 15:51:13 2017][debug] Section PORTS has changed since last inventory

[Thu Jan 26 15:51:13 2017][debug] Section MODEMS has changed since last inventory

[Thu Jan 26 15:51:13 2017][debug] Section CPUS has changed since last inventory

[Thu Jan 26 15:51:13 2017][debug] Section SLOTS has changed since last inventory

[Thu Jan 26 15:51:13 2017][debug] Section REGISTRY has changed since last inventory

[Thu Jan 26 15:51:13 2017][debug] Section SOFTWARES has changed since last inventory

[Thu Jan 26 15:51:13 2017][debug] Section MONITORS has changed since last inventory

[Thu Jan 26 15:51:13 2017][debug] Section BATTERIES has changed since last inventory

[Thu Jan 26 15:51:13 2017][debug] Section SOUNDS has changed since last inventory

[Thu Jan 26 15:51:13 2017][debug] Section PRINTERS has changed since last inventory

[Thu Jan 26 15:51:13 2017][debug] Section HARDWARE has changed since last inventory

[Thu Jan 26 15:51:14 2017][debug] sending XML

[Thu Jan 26 15:51:14 2017][debug] sending: <?xml version="1.0" encoding="UTF-8"?>

<REQUEST>

  <CONTENT>

    <ACCOUNTINFO>

      <KEYNAME>TAG</KEYNAME>

      <KEYVALUE>localhost</KEYVALUE>

    </ACCOUNTINFO>

    <BIOS>

      <CHIPSET>VGA compatible controller</CHIPSET>

      <NAME>VMware SVGA II Adapter</NAME>

    </VIDEOS>

  </CONTENT>

  <DEVICEID>icinga-2017-01-26-12-58-22</DEVICEID>

  <QUERY>INVENTORY</QUERY>

</REQUEST>

[Thu Jan 26 15:51:15 2017][error] Cannot establish communication : 500 Internal Server Error
by (220 points)
0 votes
Hi,

Is your problem actual?

You must set ssl=1 in /etc/ocsinventory-agent/ocsinentory-agent.cfg file to use ssl otherwise snmp inventory can't run.

Regards

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