I installed OCS Inventory server 2.8.0-1.el8.ocs on a CentOS 8 server. The inventory is working fine and the ipdiscover feature is working only with windows agents.
On linux agents (OS Centos 7, agent version 2.8.0-1.el7.ocs) I can't get it to work. Agents are not automatically elected and, if I force the election, the ipdiscover still doesn't work.
Of course the linux machine is able to ping the other hosts in the same network. I've also tried an nmap scan of the network and it's working correctly.
After I force the election of a host, if I run the agent in debug mode, I can see the server asking to discover the network but nothing happens.
Here is an excerpt from the log:
[...]
<REQUEST>
<DEVICEID>xxxxxxxxxxxxxxxxxxxxxxx</DEVICEID>
<QUERY>PROLOG</QUERY>
</REQUEST>
[Tue Jan 12 11:54:32 2021][debug] =BEGIN=SERVER RET======
[Tue Jan 12 11:54:32 2021][debug] $VAR1 = '<?xml version=\'1.0\' encoding=\'UTF-8\'?>
<REPLY>
<RESPONSE>SEND</RESPONSE>
<PROLOG_FREQ>24</PROLOG_FREQ>
<OPTION>
<PARAM IPDISC_LAT="100">xxx.xxx.5.0</PARAM>
<NAME>IPDISCOVER</NAME>
</OPTION>
<OPTION>
<PARAM FRAG_LATENCY="10" PERIOD_LATENCY="1" CYCLE_LATENCY="60" TYPE="CONF" ON="1" PERIOD_LENGTH="10" EXECUTION_TIMEOUT="120" TIMEOUT="30" />
<NAME>DOWNLOAD</NAME>
</OPTION>
<INVENTORY_ON_STARTUP>1</INVENTORY_ON_STARTUP>
</REPLY>
';
[Tue Jan 12 11:54:32 2021][debug] =END=SERVER RET======
[Tue Jan 12 11:54:32 2021][debug] PROLOG_FREQ has not changed since last process
[Tue Jan 12 11:54:32 2021][debug] Calling handlers : `prolog_reader'
[Tue Jan 12 11:54:32 2021][debug] [snmpscan] Calling snmp_prolog_reader
[Tue Jan 12 11:54:32 2021][debug] [download] Calling download_prolog_reader
[Tue Jan 12 11:54:32 2021][debug] [download] <?xml version='1.0' encoding='UTF-8'?>
<REPLY>
<RESPONSE>SEND</RESPONSE>
<PROLOG_FREQ>24</PROLOG_FREQ>
<OPTION>
<PARAM IPDISC_LAT="100">xxx.xxx.5.0</PARAM>
<NAME>IPDISCOVER</NAME>
</OPTION>
<OPTION>
<PARAM FRAG_LATENCY="10" PERIOD_LATENCY="1" CYCLE_LATENCY="60" TYPE="CONF" ON="1" PERIOD_LENGTH="10" EXECUTION_TIMEOUT="120" TIMEOUT="30" />
<NAME>DOWNLOAD</NAME>
</OPTION>
<INVENTORY_ON_STARTUP>1</INVENTORY_ON_STARTUP>
</REPLY>
[Tue Jan 12 11:54:32 2021][debug] [download] Writing config file.
[Tue Jan 12 11:54:32 2021][debug] Ocsinventory::Agent::Backend::IpDiscover::IpDiscover ignored
[Tue Jan 12 11:54:32 2021][debug] - nmap found
[Tue Jan 12 11:54:32 2021][debug] Ocsinventory::Agent::Backend::IpDiscover::Nmap ignored
[...]
[Tue Jan 12 11:54:33 2021][debug] Running Ocsinventory::Agent::Backend::IpDiscover
[Tue Jan 12 11:54:33 2021][debug] Ocsinventory::Agent::Backend::IpDiscover has no run() function -> ignored
[...]
Thanks for your help.