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

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

Computers disappear from OCS Reports + Windows Agent communication error

Hello all.

I have a weird issue with Windows Agent.

[Configuration] We have in an Active Directory :

- an OCS Server 2.1.2 installed with xampp on a Windows Server 2012 R2 ;

- OCS Windows Agent 2.1.1.1 (also tried with Agent 2.1.1.3 with no change about the problem), installed as a Windows service, on many clients workstations with Windows XP, 7 and 10 Professional.

Deployment was lastly made by OCSNG Agent Deploy Tool 2.1.0.2, with success.

[Problem] Inventory doesn't work for several computers, whatever they have Windows 7 or 10, 32 or 64 bits.

They don't appear in the OCS Reports console as inventoried. Yet I see them in ipdiscover as non identified devices.

The strange thing is that computer appear in Reports after the deployment, with the /NOW option.

And I can make them appear, starting manually OCSInventory.exe on the machine.

But these computers disappear from OCS Reports if we launch the console like 1 hour or 2 hours, sometimes more, after that. And they never come back in the inventoried, even 1 week later.

[Debug] I found in the Windows log the error :

Event 20, OCS Inventory Service

Service encounter error <OCS Inventory NG Agent encounter an error (exit code is 4 => Failed to talk with Communication Server)>.

But it doesn't explain why inventory works when the agent is started manually?

***** ocsinventory.ini from a machine concerned :

[OCS Inventory Agent]
ComProvider=ComHTTP.dll
Debug=1
Local=
NoSoftware=0
HKCU=0
NoTAG=0
IpDisc=
[HTTP]
Server=http://myserver/ocsinventory
SSL=1
CaBundle=cacert.pem
AuthRequired=0
User=
Pwd=
ProxyType=0
Proxy=
ProxyPort=0
ProxyAuthRequired=0
ProxyUser=
ProxyPwd=
[OCS Inventory Service]
PROLOG_FREQ=24
OLD_PROLOG_FREQ=24
TTO_WAIT=65580

***** OCSInventory.log from the same machine :

==============================================================================
Starting OCS Inventory NG Agent on Monday, May 30, 2016 13:44:27.
AGENT => Running OCS Inventory NG Agent Version 2.1.1.1
AGENT => Using OCS Inventory NG FrameWork Version 2.1.1.1
AGENT => Loading plug-in(s)
 DLL PLUGIN => Searching for Plug-in DLL(s) in folder <C:\Program Files\OCS Inventory Agent\plugins>
 DLL PLUGIN => 0 DLL Plug-in(s) succesfully loaded on 0 DLL(s) found
AGENT => Using network connection with Communication Server
 COM PROVIDER => Loading Communication Provider <C:\Program Files\OCS Inventory Agent\ComHTTP.dll>
AGENT => Using Communication Provider <OCS Inventory NG cURL Communication Provider> Version <2.1.1.1>
AGENT => Sending Prolog
 DID_CHECK => Read DeviceID <U2W71SPAREUCR1-2014-12-17-17-26-02> and MACs <00:1A:D4:02:7F:7E> in file <ocsinventory.dat>
 COM SERVER => Initializing cURL library for sendRequest
 COM SERVER => Using cURL without server authentication
 COM SERVER => Disabling cURL proxy support
 COM SERVER => Enabling cURL SSL server validation support using CA Bundle <C:\ProgramData\OCS Inventory NG\Agent\cacert.pem>
 COM SERVER => Sending HTTP Post request to URL <http://myserver/ocsinventory>
 COM SERVER => HTTP Post response received <HTTP Status Code #200>
 COM SERVER => Cleaning cURL library
AGENT => Prolog successfully sent
SUPPORT => No support detected, Registration key : N/A
 AGENT => Prolog Frequency set to 24 hour(s)
AGENT => Inventory required
AGENT => Launching hardware and software checks
 INVENTORY => Loading Download history
 (...)
 INVENTORY => Reading last inventory state
 EXECUTABLE PLUGIN => Searching for VBS script(s) in folder <C:\Program Files\OCS Inventory Agent\plugins>
 EXECUTABLE PLUGIN => Searching for executable(s) in folder <C:\Program Files\OCS Inventory Agent\plugins>
AGENT => Sending Inventory
 INVENTORY => Checking last inventory state
 INVENTORY => Logical drives inventory state changed
INVENTORY => Inventory changed since last run
 INVENTORY => Generating XML document with Device properties
(...)
 COM SERVER => Initializing cURL library for sendRequest
 COM SERVER => Using cURL without server authentication
 COM SERVER => Disabling cURL proxy support
 COM SERVER => Enabling cURL SSL server validation support using CA Bundle <C:\ProgramData\OCS Inventory NG\Agent\cacert.pem>
 COM SERVER => Sending HTTP Post request to URL <http://cft-glpi-ocs/ocsinventory>
 COM SERVER => HTTP Post response received <HTTP Status Code #200>
 COM SERVER => Cleaning cURL library
ADMIN INFOS => Couple ( TAG <=> NA ) added to configuration file
AGENT => Inventory successfully sent
 INVENTORY => Writing new inventory state
AGENT =>  Communication Server ask for Package Download
 DOWNLOAD => Found OCS Inventory Agent Setup result file <C:\ProgramData\OCS Inventory NG\Agent\download\OCSNG-Windows-Agent-Setup_done>
ERROR *** DOWNLOAD => Found result code <SUCCESS> for OCS Inventory Agent Setup package but no package ID specified, so remove all packages to avoid running Agent setup in loop !
 DOWNLOAD => Package history file successfully cleaned for duplicate IDs
 DOWNLOAD => Download disabled by server
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:44.

***** Apache error.log :

There is nothing recent except this looping error all the time (previous answer said that was quite normal about Apache : http://ask.ocsinventory-ng.org/3336/error-error-log ) :

Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle database=ocsweb;host=localhost;port=3306 at C:/xampp/perl/site/lib/Apache/Ocsinventory.pm line 64.

***** OCS Server activity.log, about the machine as example :

Knowing that SNMP is not active in our system, and I have this message for all the computers whatever inventory works or not.

Mon May 30 13:44:27 2016;2036;103;U2W71SPAREUCR1-2014-12-17-17-26-02;172.16.110.23;OCS-NG_WINDOWS_AGENT_v2.1.1.1;snmp;error: agent must communicate using https to be able to get SNMP communities (only affects OCS unix agent) !!

Any help or suggestion would be welcome, many thanks !

in OCS Inventory NG agent for Windows by (180 points)

2 Answers

0 votes
Hi Vervair,

We are deploying the OCS solution as well on our company and we are having the same issue that you described.

Reading through the forums I kind of found the problem. Somehow, its related to the server configuration under 'Config' > 'Server' Tab > AUTO_DUPLICATE_LVL. It looks like your server is processing the new endpoints and is thinking that that endpoint is already on the system, so the server dismisses it.

Try changing the configuration of the AUTO_DUPLICATE_LVL param.

At the moment mine is "hostname + macaddress + uuid".

Good luck!
by (190 points)
+1 vote
Hi.

Indeed the setting AUTO_DUPLICATE_LVL was ticked (by default I guess) on Serial, in server configuration.

So I changed yesterday to match duplicates with hostname + mac address + uuid as you did.

And it works !

Computers inventoried are at last all kept in reports.

I was blocked by this problem for a while, many thanks migueljimenez for your help !
by (180 points)
 
Powered by Question2Answer
...