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.

Cannot establish communication : 500 Can't connect to

I have a problem with SNMP function and I would need help to know if there's a cert problem or a server installation mistake. I read that we need to configure ocsinventory-agent.cfg this way to make SNMP function works:

basevardir=/var/lib/ocsinventory-agent
debug=1
download=1
ca=/etc/pki/CA/certs/cacert.pem
tag=OCS Server
server=https://10.194.97.125/ocsinventory
logfile=/var/log/ocsinventory.log

I have the next log when ocsinventory-agent.cfg is configured this way:

 [Tue Sep 20 14:32:04 2016][debug] [download] Calling download_start_handler
[Tue Sep 20 14:32:04 2016][debug]  - LWP loaded
[Tue Sep 20 14:32:04 2016][debug]  - LWP::Protocol::https loaded
[Tue Sep 20 14:32:04 2016][debug] Compress::Zlib is available.
[Tue Sep 20 14:32:04 2016][debug] Calling handlers : `prolog_writer'
[Tue Sep 20 14:32:04 2016][debug] sending XML
[Tue Sep 20 14:32:04 2016][debug] sending: <?xml version="1.0" encoding="UTF-8"?>
<REQUEST>
  <DEVICEID>ocsinventory-ng-2016-09-20-12-23-35</DEVICEID>
  <QUERY>PROLOG</QUERY>
</REQUEST>
[Tue Sep 20 14:32:04 2016][error] Cannot establish communication : 500 Can't connect to 10.194.97.125:443

Otherwise, when we configure the ocsinventory-agent.cfg file with server=http://10.194.97.125/ocsinventory ( without https ), we get this log:

  <RESPONSE>NO_ACCOUNT_UPDATE</RESPONSE>
</REPLY>
';
[Tue Sep 20 14:37:59 2016][debug] =END=SERVER RET======
[Tue Sep 20 14:37:59 2016][debug] Calling handlers : `end_handler'
[Tue Sep 20 14:37:59 2016][debug] [snmp] Calling snmp_end_handler
[Tue Sep 20 14:37:59 2016][debug] [download] Calling download_end_handler
[Tue Sep 20 14:37:59 2016][info] [download] Beginning work. I am 3245.
[Tue Sep 20 14:37:59 2016][info] [download] No more package to download.
[Tue Sep 20 14:37:59 2016][debug] [download] End of work...

So the agent is reaching the server, but obviously  can't execute the SNMP function because the current ocsinventory-agent.cfg configuration.

--------------------------------------------------

Said that, why is there an 500 connection error when we configure ocsinventory-agent.cfg file with server=https://10.194.97.125/ocsinventory, if in fact the server is configure this way ?

in SNMP by (140 points)
edited by

1 Answer

0 votes
Hi,

How have you build your certificate?

Regards

Frank
by (90.4k points)

I just saw what was missing. Now SNMP feature is working because ocsinventory-agent.cfg have the value ssl=0 specified.

However, SNMP only scans in the same network where is located the agent, even if I specify a different one as I shown in the next screen

What's what I'm missing ?The OCS Server es 2.1.2 version

I'm reaching that network through snmpwalk by the way:

root@ocsinventory-ng ~# snmpwalk -v 2c -c 'SportiumOCS' 10.24.10.100
SNMPv2-MIB::sysDescr.0 = STRING: Linux md-vscores 3.16.0-30-generic #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC 2015 x86_64
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (395429) 1:05:54.29
SNMPv2-MIB::sysContact.0 = STRING: IT Support <it.support@sportium.com>
SNMPv2-MIB::sysName.0 = STRING: md-vscores
SNMPv2-MIB::sysLocation.0 = STRING: Madrid - ESXiv4 VM Solution
SNMPv2-MIB::sysServices.0 = INTEGER: 72
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORID.1 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.2 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORID.3 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.4 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.5 = OID: TCP-MIB::tcpMIB

Need support please
 
Powered by Question2Answer
...