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.

Unified Agent 2.1 OSX 10.10

I am unable to connect to the inventory server using the 2.1 agent with SSL on OSX 10.10 clean install.  Also agents which were communicating with 10.9 failed to connect after the update to 10.10.  Other clients are working fine both Mac 10.9 and all Windows computers.

Confirmed XCode was installed via:xcode-select --install

tsg18572:5.18 root# xcode-select -v

xcode-select version 2339

I compiled the Crypt::SSLeay module by hand but my guess OSX placed the location of those modules in the wrong place so it made no difference.

 

Chaning my server to unsecured http works just fine.

tsg18572:5.18 root# cat /var/log/ocsng.log 

[Fri Dec 19 14:48:15 2014][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.1.1

[Fri Dec 19 14:48:15 2014][debug] Log system initialised (File)

[Fri Dec 19 14:48:15 2014][debug] --scan-homedirs missing. Don't scan user directories

[Fri Dec 19 14:48:15 2014][debug] Accountinfo file: /var/lib/ocsinventory-agent/https:__ocs.nmh.nmhschool.org_ocsinventory/ocsinv.adm

[Fri Dec 19 14:48:15 2014][debug] OCS Agent initialised

[Fri Dec 19 14:48:15 2014][debug] Turns hooks on for /etc/ocsinventory-agent/modules.conf

[Fri Dec 19 14:48:15 2014][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.1.1

[Fri Dec 19 14:48:15 2014][debug] Log system initialised (File)

[Fri Dec 19 14:48:15 2014][debug] Calling handlers : `start_handler'

[Fri Dec 19 14:48:15 2014][debug] [download] Calling download_start_handler

[Fri Dec 19 14:48:15 2014][debug]  - LWP loaded

[Fri Dec 19 14:48:15 2014][error] [download] Crypt::SSLeay perl module is missing !!

[Fri Dec 19 14:48:15 2014][error] [download] Humm my prerequisites are not OK...disabling module :( :(

[Fri Dec 19 14:48:15 2014][debug] Compress::Zlib is available.

[Fri Dec 19 14:48:15 2014][debug] Calling handlers : `prolog_writer'

[Fri Dec 19 14:48:15 2014][debug] sending XML

[Fri Dec 19 14:48:15 2014][debug] sending: <?xml version="1.0" encoding="UTF-8"?>

<REQUEST>

  <DEVICEID>tsg18572-2014-12-19-14-39-00</DEVICEID>

  <QUERY>PROLOG</QUERY>

</REQUEST>

[Fri Dec 19 14:48:15 2014][error] Cannot establish communication : 500 Can't connect to ocs.nmh.nmhschool.org:443 (SSL connect attempt failed with unknown error error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed)

Here is the log after I made the change to unscure.

 

[Fri Dec 19 14:49:08 2014][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.1.1

[Fri Dec 19 14:49:08 2014][debug] Log system initialised (File)

[Fri Dec 19 14:49:08 2014][debug] --scan-homedirs missing. Don't scan user directories

[Fri Dec 19 14:49:08 2014][debug] accountconfig file: `/var/lib/ocsinventory-agent/http:__ocs.nmh.nmhschool.org_ocsinventory/ocsinv.conf doesn't exist. I create an empty one

[Fri Dec 19 14:49:08 2014][debug] ocsinv.conf updated successfully

[Fri Dec 19 14:49:08 2014][debug] ocsinv.conf updated successfully

[Fri Dec 19 14:49:08 2014][debug] Accountinfo file: /var/lib/ocsinventory-agent/http:__ocs.nmh.nmhschool.org_ocsinventory/ocsinv.adm

[Fri Dec 19 14:49:08 2014][info] Accountinfo file doesn't exist. I create an empty one.

[Fri Dec 19 14:49:08 2014][debug] Invalid parameter while writing accountinfo file

[Fri Dec 19 14:49:08 2014][debug] Account info updated successfully

[Fri Dec 19 14:49:08 2014][debug] OCS Agent initialised

[Fri Dec 19 14:49:08 2014][debug] Turns hooks on for /etc/ocsinventory-agent/modules.conf

[Fri Dec 19 14:49:08 2014][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.1.1

[Fri Dec 19 14:49:08 2014][debug] Log system initialised (File)

[Fri Dec 19 14:49:08 2014][debug] Calling handlers : `start_handler'

[Fri Dec 19 14:49:08 2014][debug] [download] Calling download_start_handler

[Fri Dec 19 14:49:08 2014][debug]  - LWP loaded

[Fri Dec 19 14:49:08 2014][error] [download] Crypt::SSLeay perl module is missing !!

[Fri Dec 19 14:49:08 2014][error] [download] Humm my prerequisites are not OK...disabling module :( :(

[Fri Dec 19 14:49:08 2014][debug] Compress::Zlib is available.

[Fri Dec 19 14:49:08 2014][debug] Calling handlers : `prolog_writer'

[Fri Dec 19 14:49:08 2014][debug] sending XML

[Fri Dec 19 14:49:08 2014][debug] sending: <?xml version="1.0" encoding="UTF-8"?>

<REQUEST>

  <DEVICEID>tsg18572-2014-12-19-14-49-08</DEVICEID>

  <QUERY>PROLOG</QUERY>

</REQUEST>

[Fri Dec 19 14:49:08 2014][debug] =BEGIN=SERVER RET======

[Fri Dec 19 14:49:08 2014][debug] $VAR1 = '<?xml version=\'1.0\' encoding=\'UTF-8\'?>

<REPLY>

  <OPTION>

    <NAME>DOWNLOAD</NAME>

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

  </OPTION>

  <RESPONSE>SEND</RESPONSE>

  <PROLOG_FREQ>24</PROLOG_FREQ>

</REPLY>

';

[Fri Dec 19 14:49:08 2014][debug] =END=SERVER RET======

[Fri Dec 19 14:49:08 2014][info] PROLOG_FREQ has changed since last process(old=,new=24)

[Fri Dec 19 14:49:08 2014][debug] ocsinv.conf updated successfully

[Fri Dec 19 14:49:08 2014][debug] Compute next_time file with random value

[Fri Dec 19 14:49:08 2014][info] No support detected. Registration key: N/A

[Fri Dec 19 14:49:08 2014][debug] Calling handlers : `prolog_reader'

in OCS Inventory NG agent for MacOS X by (550 points)

1 Answer

0 votes

I have the same issue ! 

On all my macOS on Yosemite 10.10, I have the error

[Tue Apr 21 14:10:33 2015][error] Cannot establish communication : 500 Can't connect to inventory.localdomain:443 (SSL connect attempt failed with unknown error error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed)

with the last OCS Agent for mac

I approve the certificate for curl command but its change nothing.
 
 
by (150 points)

I am no expert however I have spent time on this.  I have come to the following conclusions.

The bundled SSL libraries do not work with 10.10 perl implementation.

To correct the behavior you can build your own perl modules. You must install the Command Line Tools for OSX 10.10.  If you type make from the command line you should get a prompt to install the tools if they are unavailable.

#!/bin/bash
logfile=/var/log/ardscripts.log
exec >> $logfile 2>&1
echo "Install Perl Modules"
sudo PERL_MM_USE_DEFAULT=1 perl -MCPAN -e "install Bytes::Random::Secure;"
sudo PERL_MM_USE_DEFAULT=1 perl -MCPAN -e "install Crypt::SSLeay"
exit 0

The other option is to disable SSL .

vi /etc/ocsinventory-agent/ocsinventory-agent.cfg

SSL=0

The person who packages the OSX installer could update the package to include the perl modules that work with the flavor of perl included in OS 10.10.

Let me say again I am no expert so if an expert would like to respond I would appreciate it.

 

 

 

 

The modules will fail to build on OSX 10.11 El Capitan because the required openssl libraries are not included in the command line tools since Apple Deprecated them. You can supply the required libraries with Brew however you will need to modify the script above because CPAN cannot find the libraries without some help.
 
Powered by Question2Answer
...