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.

OCS Agent fails to download meta data file

Hey,

I'm trying to update my OCS agents from v2.9.2.0 to v2.10.1.0 via deployment package, but it doesn't work properly. I already tried to search similar threads, but nothing works for me. Package i create looks like this:

Should zip file contain only .exe file or all files included in downloaded agent folder? Tried both options, but neither works. When I assign package to user and run inventory, it logs error as shown below:

======================================================================

Starting OCS Inventory Agent on Monday, February 13, 2023 08:12:58.

AGENT => Running OCS Inventory Agent Version 2.9.2.0

AGENT => Using OCS Inventory FrameWork Version 2.9.2.0

AGENT => Loading plug-in(s)

AGENT => Using network connection with Communication Server

AGENT => Using Communication Provider <OCS Inventory cURL Communication Provider> Version <2.9.2.0>

AGENT => Sending Prolog

AGENT => Prolog successfully sent

AGENT => Inventory required

AGENT => Launching hardware and software checks

AGENT => Sending Inventory

INVENTORY => Inventory changed since last run

AGENT => Inventory successfully sent

AGENT =>  Communication Server asked for Package Download

ERROR *** DOWNLOAD => Failed to download Metadata file <https://my.server.ip/download/1676272238/info> to <C:\ProgramData\OCS Inventory NG\Agent\download\1676272238\info>

DOWNLOAD => Download and setup tool successfully started

AGENT => Unloading communication provider

AGENT => Unloading plug-in(s)

AGENT => Execution duration: 00:00:08.

And download.log looks like this:

======================================================================

Starting OCS Inventory Package Download and Setup Tool on Monday, February 13, 2023 08:13:06.

DOWNLOAD => Running OCS Inventory Download Version 2.9.2.0

DOWNLOAD => Using OCS Inventory FrameWork Version 2.9.2.0

DOWNLOAD => Using network connection with Communication Server

DOWNLOAD => Using Communication Provider <OCS Inventory cURL Communication Provider> Version <2.9.2.0>

DOWNLOAD => Starting new period of 10 cycles

DOWNLOAD => Parsing directory <C:\ProgramData\OCS Inventory NG\Agent\download> for packages

DOWNLOAD => No package found, exiting

DOWNLOAD => Unloading communication provider

DOWNLOAD => Execution duration: 00:00:00.

I have full access to download folder and can see the files there.

Server info:

  • PHP: 8.1.2
  • Web server: Apache/2.4.52 (Ubuntu)
  • Database Server: Ubuntu 22.04 version 10.6.11-MariaDB-0ubuntu0.22.04.1
  • OCS server version: 2.11.1

Any help would be appreciated. Thanks in advance.

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

5 Answers

0 votes
As you can read in the manual (documentation), OCS Packager is NOT designed to update agent ...

IMHO the best is using an deploiement package with a script running ocs-setup.exe with good parameters ... But also with agent 2.9.2, it's not very IMPERATIVE to upgrade to 2.10 ...
by (19.2k points)
edited by
0 votes
Thanks for the reply,

If it's not designed to update agent then why it's literally an example of what you can do with packager... :
https://wiki.ocsinventory-ng.org/05.Deployment/Deploying-packages-or-executing-commands-on-client-hosts/#example-deploying-new-version-of-service-agent-for-windows

That's a bit confusing.

Do you have any tutorials which can help me create package with working script?
by (380 points)
0 votes
Sorry, I use the old way to create package :

- I create a directory

- I copy the .exe and other files

- I create a script 'install.cmd' which launch installation

- I zip all files in 'zip file' and I choose Execution with 'install.cmd'

For agent upgrade, I use an one line script like 'ocs-setup.exe /s /no_splash /no_systray /ssl=0 /server=.... /tag=xxx /now /upgrade'
by (19.2k points)
0 votes
So after another day of trying to fix this, I'm now stuck on this error:

======================================================================

Starting OCS Inventory Agent on Wednesday, February 15, 2023 07:53:14.

AGENT => Running OCS Inventory Agent Version 2.9.2.0

AGENT => Using OCS Inventory FrameWork Version 2.9.2.0

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) successfully 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 cURL Communication Provider> Version <2.9.2.0>

AGENT => Sending Prolog

DID_CHECK => Read DeviceID <DEVICEID> and MACs <MACs> 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 <cacert.pem>

COM SERVER => Sending HTTP Post request to URL <https://server_ip:port/ocsinventory>

WARNING *** COM SERVER => Failed to send HTTP Post request <SSL peer certificate or SSH remote key was not OK>

COM SERVER => Cleaning cURL library

================= TRACE START ===============

================= TRACE STOP ===============

ERROR *** AGENT => Failed to send Prolog <SSL peer certificate or SSH remote key was not OK>

AGENT => Unloading communication provider

AGENT => Unloading plug-in(s)

AGENT => Execution duration: 00:00:00.

I have self signed certificate and I can access webpage via https address.

My CN in certificate is just ipaddress, should it also contain http or https at the begining or /ocsinventory at the end or both?
I also have this apache error but i don`t know if thats related to ssl problem:

ocsinventory-server: Bad setting. `IPDISCOVER_LINK_TAG_NETWORK` is not set. Default: `0`

Thanks for help.
by (380 points)
0 votes

Hello! I'm facing with your first issue:

AGENT =>  Communication Server asked for Package Download
ERROR *** DOWNLOAD => Failed to download Metadata file

About your last one, i think could be solved checking in General config, Deployment, last option (HTTP).

Then on the agent was installed, if Windows: check the "C:\ProgramData\OCS Inventory NG\Agent\ocsinventory.ini" file, SSL must be equal to zero:

[HTTP]
Server=http://192.168.4.33/ocsinventory
SSL=0

by (200 points)
 
Powered by Question2Answer
...