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 http://wiki.ocsinventory-ng.org. Read it before asking your question.

Issues with OCS Inventory Agent on CentOS 7 [closed]

Hello everyone,
My OCS Server is on Ubuntu 22, and my OCS Agents are installed on several machines, including Ubuntu 22, ZorinOS 15, and CentOS 7. My inventory got information about all the machines, except for the CentOS 7 machines. It's like the agent is not communicating with the server.

I’ve checked the agent configuration, here's my ocsinventory-agent.cfg on CentOS: (NOT WORKING)

#

# OCS Inventory "Unix Unified Agent" Configuration File

#

# options used by cron job overides this (see /etc/sysconfig/ocsinventory-agent)

#

# Server URL, unconmment if needed

server = https://ocs.peter.gov.br/ocsinventory

local = /var/lib/ocsinventory-agent

# Administrative TAG (optional, must be filed before first inventory)

# tag = your_tag

# How to log, can be File,Stderr,Syslog

logger = Stderr

logfile = /var/log/ocsinventory-agent/ocsinventory-agent.log

 And here's my ocsinventory-agent.cfg on Ubuntu: (WORKING)

logfile=/var/log/ocs

debug=1

tag=Desktop

basevardir=/var/lib/ocsinventory-agent

server=https://ocs.peter.gov.br/ocsinventory

ssl=0

I tried to use the same configs on CentOS but doesn't work anyway.

Could someone help me identify what might be?

Thank you in advance for your help!

closed with the note: Problem Solved
in OCS Inventory NG agent for Unix by (200 points)
closed by

4 Answers

0 votes
Hi,

 Which version you use on CentOS ? What errors have you in ocsinventory-agent.log file ?

Did you test directly on command line ? sudo ocsinventory-agent --server=https://ocs.peter.gov.fr/ocsinventory --debug

Best regards
by (89.2k points)
0 votes

Hello,


I'm using the version: Ocsinventory unified agent for UNIX, Linux and MacOSX 2.10.2

When I run the command line ocsinventory-agent --server=https://ocs2.iec.gov.br/ocsinventory --debug (im using another dns for my serevr this time)

The following error is generated in the log file:


[Thu Oct  3 12:30:21 2024][error] Cannot establish communication : 500 SSL_ca_file /var/lib/ocsinventory-agent/https:__ocs2.iec.gov.br_ocsinventory/cacert.pem does not exist

by (200 points)
0 votes
Hi,

"ca_file" is missing in /var/lib/ocsinventory-agent/https:__ocs.peter.gov.fr_ocsinventory directory. Copy the certificate file in that directory and retry an inventory.

Regards
by (89.2k points)
0 votes
Hello everyone,
Finally worked.

I was configuring my ocsinventory-agent.cfg using the "SSL = 0" setting which on CentOS 8 worked normally without the certificate. But on CentOS 7 even if you set "SSL = 0" you will need the cacert.pem anyway.

I added cacert.pem e keep SSL = 0. Now it worked.
Thank you all!
by (200 points)
 
Powered by Question2Answer
...