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.

Errors when installing Ocsinventory-Unix-Agent-2.1.1 on Solaris 10 OS

Hi,

I'm facing issues to install OCS 2.1.1 agent on Solaris 10, below are the error messages, can someone please check and let me know if you need more details. Thank you.

I've installed all the perl modules mentioned in http://wiki.ocsinventory-ng.org/images/e/e9/OCS_-_How_to_Compile_and_Install_OCS_Inventory_NG_Agent_under_Solaris.pdf, but still seeing the same error.

Agent --> Ocsinventory-Unix-Agent-2.1.1.tar

Unix OS -->Oracle Solaris 10 8/11

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

root@waivldap05 # make install
Manifying 1 pod document
Manifying 4 pod documents
Appending installation info to /usr/perl5/5.8.4/lib/sun4-solaris-64int/perllocal.pod
[ ! -f run-postinst ] || perl postinst.pl
Do you want to configure the agent
Please enter 'y' or 'n'?> [y]
Config file found are /etc/ocsinventory-agent/ocsinventory-agent.cfg! Reusing it.
Should the old linux_agent settings be imported ?
Please enter 'y' or 'n'?> [y]
[info] The config file will be written in /etc/ocsinventory-agent/ocsinventory-agent.cfg,
What is the address of your ocs server?> [http://10.4.3.131/ocsreports]
Do you need credential for the server? (You probably don't)
Please enter 'y' or 'n'?> [n]
Do yo want to install the cron task in current user crontab ?
Please enter 'y' or 'n'?> [y]
Where do you want the agent to store its files? (You probably don't need to change it)?> [/var/opt/ocsinventory-agent]
Should I remove the old linux_agent
Please enter 'y' or 'n'?> [n]
Do you want disable SSL CA verification configuration option (not recommended) ?
Please enter 'y' or 'n'?> [n]
Do you want to use OCS-Inventory software deployment feature?
Please enter 'y' or 'n'?> [y]
Do you want to use OCS-Inventory SNMP scans feature?
Please enter 'y' or 'n'?> [y]
Do you want to send an inventory of this machine?
Please enter 'y' or 'n'?> [y]
Setting OCS Inventory NG server address...
Looking for OCS Invetory NG Unix Unified agent installation...
ocsinventory agent presents: /usr/perl5/5.8.4/bin/ocsinventory-agent
Setting crontab...
1crontab: error on previous line; unexpected end of line.
crontab: errors detected in input, no crontab file generated.
Creating /etc/ocsinventory-agent directory...
Writing OCS Inventory NG Unix Unified agent configuration
Creating /var/opt/ocsinventory-agent/http:__10.4.3.131_ocsreports directory...
Copying SNMP MIBs XML files...
Activating modules if needed...
Launching OCS Inventory NG Unix Unified agent...
Unsuccessful stat on filename containing newline at /usr/perl5/site_perl/5.8.4/Ocsinventory/Agent/Backend.pm line 33, <SOLVERSION> line 3.
cfgadm: Configuration administration not supported
   -> Failed!
You may want to launch the agent with the --verbose or --debug flag.
New settings written! Thank you for using OCS Inventory

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

root@waivldap05 # ocsinventory-agent --debug
root@waivldap05 #

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

root@waivldap05 # cd /etc/ocsinventory-agent/
root@waivldap05 # ls
modules.conf            ocsinventory-agent.cfg
root@waivldap05 # cat ocsinventory-agent.cfg
basevardir=/var/opt/ocsinventory-agent
debug=1
server=http://10.4.3.131/ocsreports
tag=LDAP_server
ca=/var/opt/CA
logfile=/var/opt/ocs-unified.log

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

root@waivldap05 # tail -50 /var/opt/ocs-unified.log
    <STORAGES>
      <MANUFACTURER>SUN</MANUFACTURER>
      <MODEL>VDSK</MODEL>
      <NAME>c0d1</NAME>
    </STORAGES>
    <STORAGES>
      <MANUFACTURER>SUN</MANUFACTURER>
      <MODEL>VDSK</MODEL>
      <NAME>c0d2</NAME>
    </STORAGES>
    <STORAGES>
      <MANUFACTURER>SUN</MANUFACTURER>
      <MODEL>VDSK</MODEL>
      <NAME>c0d3</NAME>
    </STORAGES>
    <USERS>
      <LOGIN>root</LOGIN>
    </USERS>
  </CONTENT>
  <DEVICEID>waivldap05-2016-07-08-10-20-42</DEVICEID>
  <QUERY>INVENTORY</QUERY>
</REQUEST>
[Mon Jul 11 08:50:34 2016][error] Cannot establish communication : 301 Moved Permanently
[Mon Jul 11 08:51:58 2016][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.1.1
[Mon Jul 11 08:51:58 2016][debug] Log system initialised (File)
[Mon Jul 11 08:51:58 2016][debug] --scan-homedirs missing. Don't scan user directories
[Mon Jul 11 08:51:58 2016][debug] Accountinfo file: /var/opt/ocsinventory-agent/http:__10.4.3.131_ocsreports/ocsinv.adm
[Mon Jul 11 08:51:58 2016][debug] OCS Agent initialised
[Mon Jul 11 08:51:58 2016][debug] Turns hooks on for /etc/ocsinventory-agent/modules.conf
[Mon Jul 11 08:51:58 2016][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.1.1
[Mon Jul 11 08:51:58 2016][debug] Log system initialised (File)
[Mon Jul 11 08:51:58 2016][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.1.1
[Mon Jul 11 08:51:58 2016][debug] Log system initialised (File)
[Mon Jul 11 08:51:58 2016][debug] Calling handlers : `start_handler'
[Mon Jul 11 08:51:58 2016][debug] [snmp] Calling snmp_start_handler
[Mon Jul 11 08:51:58 2016][error] [snmp] Net::SNMP perl module is missing !!
[Mon Jul 11 08:51:58 2016][error] [snmp] Humm my prerequisites are not OK...disabling module :( :(
[Mon Jul 11 08:51:58 2016][debug] [download] Calling download_start_handler
[Mon Jul 11 08:51:58 2016][debug]  - LWP loaded
[Mon Jul 11 08:51:58 2016][error] [download] LWP::Protocol::https perl module is missing !!
[Mon Jul 11 08:51:58 2016][error] [download] Humm my prerequisites are not OK...disabling module :( :(
[Mon Jul 11 08:51:58 2016][debug] Compress::Zlib is available.
[Mon Jul 11 08:51:58 2016][debug] Calling handlers : `prolog_writer'
[Mon Jul 11 08:51:58 2016][debug] sending XML
[Mon Jul 11 08:51:58 2016][debug] sending: <?xml version="1.0" encoding="UTF-8"?>
<REQUEST>
  <DEVICEID>waivldap05-2016-07-08-10-20-42</DEVICEID>
  <QUERY>PROLOG</QUERY>
</REQUEST>
[Mon Jul 11 08:51:58 2016][error] Cannot establish communication : 301 Moved Permanently

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

root@waivldap05 # cat modules.conf
# this list of module will be load by the at run time
# to check its syntax do:
# #perl modules.conf
# You must have NO error. Else the content will be ignored
# This mechanism goal is to launch agent extension modules

use Ocsinventory::Agent::Modules::Download;
use Ocsinventory::Agent::Modules::Snmp;

# DO NOT REMOVE THE 1;
1;
root@waivldap05 #

==============================================
in OCS Inventory NG agent for Unix by (140 points)

1 Answer

0 votes

Hi

This howto is too old and was made for the 1.02 version of the unix agent.

In the ocsinventory-agent.cfg file this line (server=http://10.4.3.131/ocsreports )is not correct. You should have server=http://10.4.3.131/ocsinventory. Modifiy this line. 

Install two missing modules : Net-SNMP and LWP-protocol-https.

Relaunch an inventory and post the installation log.

Regards

Frank

by (90.4k points)
Hi Frank,

Thank you for your reply. I'm able to install the agent now but we are still seeing the error "Unsuccessful stat on filename containing newline at /usr/perl5/site_perl/5.8.4/Ocsinventory/Agent/Backend.pmline 33, <SOLVERSION> line 3.
cfgadm: Configuration administration not supported" Also, please let me know on how do we start/stop/uninstall the OCS agent on the server?

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

root@waivldap05 # make install
Manifying 1 pod document
Manifying 4 pod documents
Appending installation info to /usr/perl5/5.8.4/lib/sun4-solaris-64int/perllocal.pod
[ ! -f run-postinst ] || perl postinst.pl
Do you want to configure the agent
Please enter 'y' or 'n'?> [y]
Config file found are /etc/ocsinventory-agent/ocsinventory-agent.cfg! Reusing it.
Should the old linux_agent settings be imported ?
Please enter 'y' or 'n'?> [y]
[info] The config file will be written in /etc/ocsinventory-agent/ocsinventory-agent.cfg,
What is the address of your ocs server?> [http://10.4.3.131/ocsreports] http://10.4.3.131/ocsinventory
Do you need credential for the server? (You probably don't)
Please enter 'y' or 'n'?> [n]
Do yo want to install the cron task in current user crontab ?
Please enter 'y' or 'n'?> [y]
Where do you want the agent to store its files? (You probably don't need to change it)?> [/var/opt/ocsinventry-agent]
Should I remove the old linux_agent
Please enter 'y' or 'n'?> [n]
Do you want disable SSL CA verification configuration option (not recommended) ?
Please enter 'y' or 'n'?> [n]
Do you want to use OCS-Inventory software deployment feature?
Please enter 'y' or 'n'?> [y]
Do you want to use OCS-Inventory SNMP scans feature?
Please enter 'y' or 'n'?> [y]
Do you want to send an inventory of this machine?
Please enter 'y' or 'n'?> [y]
Setting OCS Inventory NG server address...
Looking for OCS Invetory NG Unix Unified agent installation...
ocsinventory agent presents: /usr/perl5/5.8.4/bin/ocsinventory-agent
Setting crontab...
1crontab: error on previous line; unexpected end of line.
crontab: errors detected in input, no crontab file generated.
Creating /etc/ocsinventory-agent directory...
Writing OCS Inventory NG Unix Unified agent configuration
Creating /var/opt/ocsinventory-agent/http:__10.4.3.131_ocsinventory directory...
Copying SNMP MIBs XML files...
Activating modules if needed...
Launching OCS Inventory NG Unix Unified agent...
Unsuccessful stat on filename containing newline at /usr/perl5/site_perl/5.8.4/Ocsinventory/Agent/Backend.pmline 33, <SOLVERSION> line 3.
cfgadm: Configuration administration not supported
   -> Success!
New settings written! Thank you for using OCS Inventory
root@waivldap05 # ocsinventory-agent --debug
Unsuccessful stat on filename containing newline at /usr/perl5/site_perl/5.8.4/Ocsinventory/Agent/Backend.pmline 33, <SOLVERSION> line 3.
cfgadm: Configuration administration not supported

root@waivldap05 # ocsinventory-agent --info
Unsuccessful stat on filename containing newline at /usr/perl5/site_perl/5.8.4/Ocsinventory/Agent/Backend.pm line 33, <SOLVERSION> line 3.
cfgadm: Configuration administration not supported
 
Powered by Question2Answer
...