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.5 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

Problème Perl pour la remonté SNMP [closed]

Bonjour, j'ai un serveur debian 7.8 sur lequel est installer le serveur 2.1.2 et l'agent ocs 2.1.1, le problème est l'erreur que me renvoi le log de l'agent :

[Wed Sep  9 13:34:16 2015][error] Cannot establish communication : 500 Can't 
locate object method "can_read" via package "LWP::Protocol::https::Socket"

merci d'avance de votre aide!

closed with the note: problème résolu
asked in OCS Inventory NG agent for Unix by (260 points)
closed by

4 Answers

0 votes
en sachant que les log de apache ne me remontent aucun problème ainsi que le log d'activité du serveur ocs
answered by (260 points)
0 votes
Bonjour à toi

 

Cela ressemble beaucoup a un probleme de certificat entre ton serveur et ton client.

Il serait utile, si ce n'est pas cela que tu passes ton agent en mode debug et que tu poste ton log
answered by (2.1k points)
0 votes

voici le .cfg de l'agent:

ssl=1
cabundle=/usr/src/Ocsinventory-Unix-Agent-2.1.1/
basevardir=/var/lib/ocsinventory-agent
realm=OCS Inventory agent area
debug=1
server=https://ocsinventory.ch-stcere.fr/ocsinventory
tag=ipdiscover et snmp
logfile=/usr/src/Ocsinventory-Unix-Agent-2.1.1/logagant.log

et le log de l'agent:
LE DEBUT:
[Thu Sep 10 08:28:00 2015][debug] Ocsinventory unified agent for
 UNIX, Linux and MacOSX 2.1.1
[Thu Sep 10 08:28:00 2015][debug] Log system initialised (File)
[Thu Sep 10 08:28:00 2015][debug] --scan-homedirs missing. Don't
 scan user directories
[Thu Sep 10 08:28:00 2015][debug] Accountinfo file: /var/lib/
ocsinventory-agent/https:__ocsinventory.ch-stcere.fr_ocsinventory/ocsinv.adm
[Thu Sep 10 08:28:00 2015][debug] OCS Agent initialised
[Thu Sep 10 08:28:00 2015][debug] Turns hooks on for
 /usr/local/etc/ocsinventory/modules.conf
[Thu Sep 10 08:28:00 2015][debug] Ocsinventory unified agent for
 UNIX, Linux and MacOSX 2.1.1
[Thu Sep 10 08:28:00 2015][debug] Log system initialised (File)
[Thu Sep 10 08:28:00 2015][debug] Calling handlers : `start_handler'
[Thu Sep 10 08:28:00 2015][debug] [snmp] Calling snmp_start_handler
[Thu Sep 10 08:28:00 2015][debug]  - Net::SNMP loaded
[Thu Sep 10 08:28:00 2015][debug] Compress::Zlib is available.
[Thu Sep 10 08:28:00 2015][debug] Calling handlers : `prolog_writer'
[Thu Sep 10 08:28:00 2015][debug] sending XML
[Thu Sep 10 08:28:00 2015][debug] sending: <?xml version="1.0" 
encoding="UTF-8"?>
<REQUEST>
  <DEVICEID>OCSINVENTORY-2015-09-03-16-48-16</DEVICEID>
  <QUERY>PROLOG</QUERY>
</REQUEST>
[Thu Sep 10 08:28:00 2015][debug] =BEGIN=SERVER RET======
[Thu Sep 10 08:28:00 2015][debug] $VAR1 = '<?xml version=\'1.0\'
 encoding=\'UTF-8\'?>
<REPLY>
  <OPTION>
    <NAME>IPDISCOVER</NAME>
    <PARAM IPDISC_LAT="100">10.43.0.0</PARAM>
  </OPTION>
  <OPTION>
    <NAME>DOWNLOAD</NAME>
    <PARAM FRAG_LATENCY="10" PERIOD_LATENCY="1" ON="0" TYPE="CONF" CYCLE_LATENCY="60" TIMEOUT="30" PERIOD_LENGTH="10" EXECUTION_TIMEOUT="120" />
  </OPTION>
  <OPTION>
    <NAME>SNMP</NAME>
    <PARAM SUBNET="10.43.0.0/16" TYPE="NETWORK" />
    <PARAM IPADDR="10.43.1.17" MACADDR="00:00:74:88:5D:C6" TYPE="DEVICE" />
    <PARAM IPADDR="10.43.4.17" MACADDR="00:01:29:04:EA:E2" TYPE="DEVICE" />
    <PARAM IPADDR="10.43.1.2" MACADDR="00:04:00:29:37:5C" TYPE="DEVICE" />

LE MILIEU:

  </CONTENT>
  <DEVICEID>OCSINVENTORY-2015-09-03-16-48-16</DEVICEID>
  <QUERY>INVENTORY</QUERY>
</REQUEST>
[Thu Sep 10 08:38:02 2015][debug] =BEGIN=SERVER RET======
[Thu Sep 10 08:38:02 2015][debug] $VAR1 = '<?xml version=\'1.0\'
 encoding=\'UTF-8\'?>
<REPLY>
  <RESPONSE>NO_ACCOUNT_UPDATE</RESPONSE>
</REPLY>
';
[Thu Sep 10 08:38:02 2015][debug] =END=SERVER RET======
[Thu Sep 10 08:38:02 2015][debug] Calling handlers : `end_handler'
[Thu Sep 10 08:38:02 2015][debug] [snmp] Calling snmp_end_handler
[Thu Sep 10 08:38:02 2015][debug] [snmp] Snmp: Scanning network
[Thu Sep 10 08:38:02 2015][debug]  - Net::Netmask loaded
[Thu Sep 10 08:38:02 2015][debug]  - nmap found
[Thu Sep 10 08:38:02 2015][debug]  - Nmap::Parser loaded
[Thu Sep 10 08:38:02 2015][debug] [snmp] Scannig 10.43.0.0/16 with nmap
[Thu Sep 10 08:38:30 2015][debug] [snmp] Found 10.43.0.132
[Thu Sep 10 08:38:30 2015][debug] [snmp] Found 10.43.0.113
[Thu Sep 10 08:38:30 2015][debug] [snmp] Found 10.43.0.149

LA FIN:
      <NAME>Tray 4</NAME>
      </TRAYS>
    </DEVICE>
    <DEVICE>
      <COMMON>
        <CONTACT>SPIE Communication</CONTACT>
        <DESCRIPTION>HP V1910-24G-PoE (365W) Switch Software Version 5.20 Release 1111P02 
Copyright (c) 2004-2012 Hewlett-Packard Development Company, L.P.</DESCRIPTION>
        <IPADDR>10.43.8.1</IPADDR>
        <LOCATION>Baie Brassage Hopital</LOCATION>
        <MACADDR>CC:3E:5F:2F:24:04</MACADDR>
        <NAME>HP V1910 Switch</NAME>
        <SNMPDEVICEID>cdc0afbb01ddafc3eff5f80662494387</SNMPDEVICEID>
        <UPTIME>61 days, 23:42:49.34</UPTIME>
      </COMMON>
    </DEVICE>
  </CONTENT>
  <DEVICEID>OCSINVENTORY-2015-09-03-16-48-16</DEVICEID>
  <QUERY>SNMP</QUERY>
</REQUEST>
[Thu Sep 10 08:48:29 2015][error] Cannot establish communication
 : 500 Can't locate object method "can_read" via package 
"LWP::Protocol::https::Socket"
[Thu Sep 10 08:48:29 2015][debug] [snmp] End snmp_end_handler :)

en même temps je suis pas convaincu car lorsque l'on a une 
erreur de certificat, il ne fait fait même pas 
l'inventaire SNMP non?
answered by (260 points)
edited by
personne à un semblant d'hypothèse?
personne n'a un semblant d'hypothèse??
0 votes

Bonjour,

ll semblerait que le problème vient du serveur ocs. Ne manque-t-il pas des paquets perl sur le serveur OCS?

[Thu Sep 10 08:48:29 2015][error] Cannot establish communication
 : 500 Can't locate object method "can_read" via package 
"LWP::Protocol::https::Socket"
answered by (63.8k points)
Bonjour,

j'ai résolu le problème en faisant un "upgrade" de Perl. Merci encore pour vos message
 
Powered by Question2Answer
...