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.

Unable to install the agent on Windows

Hello everyone

I have a problem. When I install the agent on a windows machine it does not register with OCS Server. I do not know what I'm doing wrong. This is the txt summary of the installation:

********************************************************

Starting OCS Inventory NG Agent 2.8.0.0 setup on 07/12/2020 at 9:35:46

Checking if setup not already running...OK.

Checking Operating System...OK, Windows 2000 or higher.

Command line is: "C:\Users\jporras\Downloads\OCS-Windows-Agent-2.8.0.0_x64\OCS-Windows-Agent-Setup-x64.exe"
Parsing command line arguments...OK.

Checking for silent mode...Disabled.

Checking for splash screen...Enabled.

Checking if logged in user has Administrator privileges...OK.

Creating directory <C:\ProgramData\OCS Inventory NG\Agent>...

SetACL allowing Users / Power users read/write permissions on <C:\ProgramData\OCS Inventory NG\Agent>...Result: error

SetACL propagating inherited permissions on <C:\ProgramData\OCS Inventory NG\Agent\Download>...Result: error

Trying to determine if service was previously installed...No.

Trying to stop service and kill processes...

Trying to find process OcsSystray.exe...Result: No

Trying to kill process OcsSystray.exe...Result: No

Trying to kill process OcsService.exe...Result: 603

Trying to kill process OCSInventory.exe...Result: 603

Trying to kill process download.exe...Result: 603

Trying to kill process inst32.exe...Result: 603

Waiting 10 seconds for processes to terminate...

Copying new files to directory <C:\Program Files\OCS Inventory Agent>...

Windows XP or higher detected, installing default cURL library and MS CRT/MFC 9.0...

Copying new files status is ;-)

Writing TAG <test> into <C:\ProgramData\OCS Inventory NG\Agent\admininfo.conf> file...

Writing agent configuration file by launching ocsinventory.exe /SAVE_CONF...Result: 0

Windows Advanced Firewall is not available (Vista or higher). Skip adding custom rules.

[/NOW] used, so launching "C:\Program Files\OCS Inventory Agent\ocsinventory.exe"...Result: 4

Creating startup menu shortCut <C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\OCS Inventory NG Systray.lnk> to start Systray applet...

Checking if service OCS Inventory Service is registered into Windows Service Manager...No

No service installed, so no need to unregister OCS Inventory Service from Windows Service Manager.

Registering OCS Inventory Service into Windows Service Manager...Result: 0.

Starting OCS Inventory Service...Ok.

SUCCESS: OCS Inventory NG Agent 2.8.0.0 successfully installed on 07/12/2020 at 9:37:11

;-)

Thanks for the help
in OCS Inventory NG agent for Windows by (710 points)

25 Answers

0 votes

Hello

I already made the advice of the link. but they didn't work for me. check this out my activity.log says. It is normal?

Wed Dec 30 07:10:03 2020; 1966; 521; NA; 10.0.2.15; OCS-NG_unified_unix_agent_v2.6.1; database_connect; Access denied for user 'ocs' @ 'localhost' (using password: YES)
Wed Dec 30 07:10:03 2020; 1966; 505; NA; 10.0.2.15; OCS-NG_unified_unix_agent_v2.6.1; handler; Database connection

This is my OCSInventory.log for agent

Starting OCS Inventory Agent on Wednesday, December 30, 2020 07:21:30.
AGENT => Running OCS Inventory Agent Version 2.7.0.0
AGENT => Using OCS Inventory FrameWork Version 2.7.0.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.7.0.0>
AGENT => Sending Prolog
DID_CHECK => Read DeviceID <RAMBOGCONT04-2020-12-30-07-10-09> and MACs <D8:9E:F3:04:FD:F100:FF:CB:9A:0A:860A:00:27:00:00:11> 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 => Disabling cURL SSL server validation support
COM SERVER => Sending HTTP Post request to URL <http://10.0.2.15/ocsinventory>
WARNING *** COM SERVER => Failed to send HTTP Post request <Couldn't connect to server>
COM SERVER => Cleaning cURL library
================= TRACE START ===============
================= TRACE STOP ===============
ERROR *** AGENT => Failed to send Prolog <Couldn't connect to server>
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:21.


Thanks for your help,

Best Wishes

by (710 points)
0 votes
Have you access to http://10.0.2.15/ocsinventory with a browser? If yes, you must have error 400. If not, verify z-ocsinventory-server.conf file on the ocs server.
by (90.4k points)
0 votes
Hi Frank

Thanks for your help and happy new year.

No, the page through the browser does not load. I really don't understand what i'm doing wrong. I reinstalled the server in a new virtual machine and nothing. I still haven't been able to connect. look here are the documents of both the server and the agent.
https://drive.google.com/drive/folders/1NwJDchvB-CBQAphxkjryGt4pDP2FT3EN

I do not know what to do. Please help!.

best wishes
by (710 points)
0 votes

Hi, there is many errors in your conf !

In your agent.ini, you tell it to use SSL, but the url of the server is not in https:\\FQDN:443\ocsinventory

For database, we see in activity.log

database_connect;Access denied for user 'ocs'@'localhost' (using password: YES)"

may be a wrong password/permission for ocs user in your ocsweb database ; OR/AND wrong password at var "PerlSetEnv OCS_DB_USER in the file

/etc/apache2/conf-enabled/z-ocsinventory-server.conf

In Eror.log, we see a lot of error about mpm_prefork restart, may be caused by log rotate or other conf error... look at google to resolve this

I recommend you to read the documentation http://wiki.ocsinventory-ng.org/ or this tutorial here https://miloszengel.com/ocs-inventory-ng-2-5-install-guide-on-debian-stretch-with-ssl-and-deployment/

Carreful, if you use tutorial, you must adapt it for your Ubuntu distrib. Example for Ubuntu 20.04, it's SQL 8, the command for create user, give acces right, etc etc have change, see here https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-20-04-fr  or here https://www.cyberciti.biz/faq/install-mysql-server-8-on-ubuntu-20-04-lts-linux/

Regards

PS : Sorry for my bad English

by (5.7k points)
0 votes

I recently faced an issue while installing the OCS Inventory NG Agent on a Windows machine, where the agent would not register with the OCS Server. Despite following the standard installation process, the agent installation seemed to complete successfully, but the registration with the server was still not happening. Here's the installation log I received during the process:

The setup process initially checked the system and seemed to go fine—ensuring the system was compatible (Windows 2000 or higher), and that the user had the necessary administrative privileges. However, I ran into issues when the setup tried to assign read/write permissions on the directory C:\ProgramData\OCS Inventory NG\Agent. The following errors were logged:

SetACL allowing Users / Power users read/write permissions...Result: error SetACL propagating inherited permissions...Result: error

These errors indicated that the agent had trouble setting the correct permissions, which could be why the agent wasn't registering. It also tried to stop services and kill processes related to OCS Inventory, but had no success in terminating some processes.

After installation, the agent did not start properly, and there was no successful registration of the OCS Inventory Service into the Windows Service Manager, which led me to believe there was an issue with the permissions or missing dependencies.

Here's what I did to resolve the issue:

  1. Recheck Permissions: I manually ensured that the directory C:\ProgramData\OCS Inventory NG\Agent had the correct read/write permissions for both Users and Power Users. I also ran the installer as Administrator.

  2. Service Registration Issues: I noticed that the service registration failed in the log. To fix this, I manually registered the service by running the following command from the command prompt:

    sc create "OCS Inventory Service" binPath= "C:\Program Files\OCS Inventory Agent\ocsinventory.exe" start= auto
    
  3. Firewall Configuration: Even though the installer skipped configuring the firewall (as I was using a Windows version below Vista), I made sure to check the firewall settings and allow the necessary ports for OCS to communicate with the server.

  4. Verify Installation: After manually fixing the permissions and services, I restarted the machine and confirmed that the agent registered properly with the OCS Server.

The Vultr documentation has been a huge help in understanding how to handle agent installations and permissions better on Windows. I highly recommend checking out the installation guide for MySQL on Ubuntu, as it has similar detailed steps for troubleshooting and making sure everything is configured correctly. It helped me better understand system services and configurations, and I applied some of the insights from that guide.

For anyone encountering similar issues, here's a helpful link to the Vultr MySQL installation guide on Ubuntu:
Install MySQL on Ubuntu 20.04 in Simple Steps

Hopefully, this approach works for anyone experiencing similar issues with OCS Inventory NG installation!

by (260 points)
 
Powered by Question2Answer
...