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 !