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.

Upgrade 2.12.1 Agents stopped sending inventory

Hello

We are currently upgrading our OCS Inventory Server from 2.11.1 to 2.12.1, with the OCS Agent Unix 2.10.0. 

After upgrading, we noticed that the agent stopped sending inventories to the server, so we tried to troubleshoot by checking the logs and the configuration file : 

After executing this command on the remote host to connect to the server : 

'ocsinventory-agent
--nolocal --ssl=0 --ca=/etc/pki/ca-trust/source/anchors/cert.pem --info
--server=http://dummy-url.com/ocsinventory'

We got this in the log : 

ocsinventory-agent.log 

[Mon Feb  5 14:01:01 2024][info] Going to sleep for 96 second(s)

[Mon Feb  5 14:02:45 2024][error] Cannot establish communication : 500 Internal Server Error

[lun. 05 févr. 2024 14:02:45 UTC] End of cron job (/sbin:/bin:/usr/sbin:/usr/bin)

[lun. 05 févr. 2024 15:01:01 UTC] Running ocsinventory-agent --wait 100 --nolocal

--ssl=0 --ca=/etc/pki/ca-trust/source/anchors/cert.pem --info

--server=https://dummy-url.com/ocsinventory


ocsinventory-agent.cfg

#

# 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://dummy-url.com/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


ocsinventory-server.cfg

<IfModule mod_perl.c>

  # Which version of mod_perl we are using

  # For mod_perl <= 1.999_21, replace 2 by 1

  # For mod_perl > 1.999_21, replace 2 by 2

  PerlSetEnv OCS_MODPERL_VERSION 2

  # Master Database settings

  # Replace localhost by hostname or ip of MySQL server for WRITE

  PerlSetEnv OCS_DB_HOST localhost

  # Replace 3306 by port where running MySQL server, generally 3306

  PerlSetEnv OCS_DB_PORT 3306

  # Name of database

  PerlSetEnv OCS_DB_NAME bd_ocs

  PerlSetEnv OCS_DB_LOCAL bd_ocs

  # User allowed to connect to database

  PerlSetEnv OCS_DB_USER ocs

  # Password for user

  PerlSetVar OCS_DB_PWD ocspsswd

  # SSL Configuration

  # 0 to disable the SSL support for MySQL/MariaDB

  # 1 to enable the SSL support for MySQL/MariaDB

  PerlSetEnv OCS_DB_SSL_ENABLED 0


dbconfig.inc.php

<?php

define("DB_NAME", "db_ocs");

define("SERVER_READ","localhost");

define("SERVER_WRITE","localhost");

define("SERVER_PORT","3306");

define("COMPTE_BASE","ocs");

define("PSWD_BASE","ocs");

define("ENABLE_SSL","");

define("SSL_MODE","");

define("SSL_KEY","");

define("SSL_CERT","");

define("CA_CERT","");

?>


The results of a tcpdump command shows an "Encrypted Alert" error

192.168.5.67  = remote host

192.168.5.228 = ocs server 

Note that the Ocs agents used to send inventories properly to Ocs Server before we upgraded, and the content of the configuration files attached are the exact same in 2.11.1 and 2.12.1 version.

We are also getting a "500 Internal Server" that we didn't used to get even though we are still using the same certificate.

Is there anything missing for the upgrade to be successfull ? 

Do we need to upgrade some files in order to make a successfull upgrade ?

Thank you, 

Best Regards

in OCS Inventory NG agent for Unix by (120 points)
edited by

1 Answer

0 votes
change http to https in --server option.

Retry

Regards
by (90.4k points)
 
Powered by Question2Answer
...