Skip to main content

Hello,

I'm trying to add a poller to my Central but I notice that on my Central, gorgoned doesn't execute gorgone-proxy:

● gorgoned.service - Centreon Gorgone
Loaded: loaded (/lib/systemd/system/gorgoned.service; enabled; preset: enabled)
Active: active (running) since Tue 2024-05-21 17:13:10 CEST; 3s ago
Main PID: 196684 (perl)
Tasks: 30 (limit: 2321)
Memory: 104.2M
CPU: 713ms
CGroup: /system.slice/gorgoned.service
├─196684 /usr/bin/perl /usr/bin/gorgoned --config=/etc/centreon-gorgone/config.yaml --logfile=/var/log/centreon-gorgone/gorgoned.log --severity=error
├─196697 gorgone-legacycmd
├─196698 gorgone-audit
├─196699 gorgone-cron
├─196700 gorgone-engine
├─196701 gorgone-action
├─196703 gorgone-nodes
├─196707 gorgone-httpserver
├─196711 gorgone-dbcleaner
└─196714 gorgone-statistics

May 21 17:13:10 kepler systemd<1]: Started gorgoned.service - Centreon Gorgone.

Although the proxy module is active in the following configuration /etc/centreon-gorgone/config.d/40-gorgoned.yaml:

description: Configuration for remote server Central
gorgone:
gorgonecore:
privkey: "/var/lib/centreon-gorgone/.keys/rsakey.priv.pem"
pubkey: "/var/lib/centreon-gorgone/.keys/rsakey.pub.pem"
id: 1
modules:
- name: httpserver
package: "gorgone::modules::core::httpserver::hooks"
enable: true
address: "0.0.0.0"
port: "8085"
ssl: false
auth:
enabled: false
allowed_hosts:
enabled: true
subnets:
- 127.0.0.1/32
- name: action
package: "gorgone::modules::core::action::hooks"
enable: true
command_timeout: 30
whitelist_cmds: true
allowed_cmds:
- ^sudo\s+(/bin/)?systemctl\s+(reload|restart)\s+(centengine|centreontrapd|cbd)\s*$
- ^(sudo\s+)?(/usr/bin/)?service\s+(centengine|centreontrapd|cbd|cbd-sql)\s+(reload|restart)\s*$
- ^/usr/sbin/centenginestats\s+-c\s+/etc/centreon-engine/centengine\.cfg\s*$
- ^cat\s+/var/lib/centreon-engine/ a-zA-Z0-9\-]+-stats\.json\s*$
- ^/usr/lib/centreon/plugins/.*$
- ^/bin/perl /usr/share/centreon/bin/anomaly_detection --seasonality >> /var/log/centreon/anomaly_detection\.log 2>&1\s*$
- ^/usr/bin/php -q /usr/share/centreon/cron/centreon-helios\.php >> /var/log/centreon-helios\.log 2>&1\s*$
- ^centreon
- ^mkdir
- ^/usr/share/centreon/www/modules/centreon-autodiscovery-server/script/run_save_discovered_host
- ^/usr/share/centreon/bin/centreon -u \"centreon-gorgone\" -p \S+ -w -o CentreonWorker -a processQueue$
- name: cron
package: "gorgone::modules::core::cron::hooks"
enable: true
cron: !include cron.d/*.yaml
- name: nodes
package: "gorgone::modules::centreon::nodes::hooks"
enable: true
- name: proxy
package: "gorgone::modules::core::proxy::hooks"
enable: true
- name: legacycmd
package: "gorgone::modules::centreon::legacycmd::hooks"
enable: true
y...]

Another Central in 23.10 includes “gorgone-proxy” subprocess.

It seems module’s files are in the good place with same rights as Central 23.10 which is OK :

✓ h2024-05-21 17:16:08 +0200] root@kepler b /usr/share/perl5/gorgone/modules/core/proxy ]
# l /usr/share/perl5/gorgone/modules/core/proxy
total 104
-rw-rw-r-- 1 root root 19601 Apr 30 16:59 class.pm
-rw-rw-r-- 1 root root 46141 Apr 30 16:59 hooks.pm
-rw-rw-r-- 1 root root 12214 Apr 30 16:59 httpserver.pm
-rw-rw-r-- 1 root root 20519 Apr 30 16:59 sshclient.pm

I’m not able to understand why my proxy doesn’t work. When I enable DEBUG for Gorgoned, there are only a few lines about proxy :

2024-05-21 17:00:06 - DEBUG - tcore] Message received internal - 1STATISTICSLISTENER] oxxx-3] s] { "code": 1, "data": {"error":"no_proxy","message":"no proxy configured. cannot manage target."} }
2024-05-21 17:00:06 - DEBUG - mcore] Message received internal - 1PUTLOG] -xxx-1] -] {"code":0,"data":{"request_content":U{"metadata":{"source":"enginestats","poller_id":"1"},"timeout":"10","command":"/usr/sbin/centenginestats -c /etc/centreon-engine/centengine.cfg"}],"message":"commands processing has started"},"instant":null,"token":"xxx-1","etime":1716303606}
2024-05-21 17:00:06 - DEBUG - estatistics] Event: rSTATISTICSLISTENER] 0xxx-3] U] { "code": 1, "data": {"error":"no_proxy","message":"no proxy configured. cannot manage target."} }
2024-05-21 17:00:06 - DEBUG - mstatistics] Event: rACK] 2xxx-3] {"code":1,"data":{"message":"no proxy configured. cannot manage target.","error":"no_proxy"}}

I can't tell if it's since upgrading to 24.04 because I wasn't using a remote poller before. I can't find a way to get the proxy module to launch. There are no communication problems between Poller and Central. I was able to register the Poller without any problem and add Poller in Central. But the “Is running ?” status is still red. I’m able to export config to Central and Poller without any error.

My environment :

  • Debian 12
  • Centreon 20.04.1 from packages (updated from several older debian’s packages version)

Sorry for my English and thank you for your help!

I found the source of the problem, I publish the solution if someone finds himself in the same situation:

I hadn't enabled debugging completely, so i missed that:

2024-05-21 19:13:56 - INFO - [core] Module 'proxy' is loading                                                                                                                                                                                     2024-05-21 19:13:56 - INFO - [core] Module 'proxy' cannot be loaded: Base class package "Libssh::Session" is empty.                                                                                                                                at /usr/share/perl5/gorgone/modules/core/proxy/sshclient.pm line 23.                                                                                                                                                                             BEGIN failed--compilation aborted at /usr/share/perl5/gorgone/modules/core/proxy/sshclient.pm line 23.                                                                                                                                            Compilation failed in require at /usr/share/perl5/gorgone/modules/core/proxy/class.pm line 30.                                                                                                                                                    BEGIN failed--compilation aborted at /usr/share/perl5/gorgone/modules/core/proxy/class.pm line 30.                                                                                                                                                Compilation failed in require at /usr/share/perl5/gorgone/modules/core/proxy/hooks.pm line 31.                                                                                                                                                    BEGIN failed--compilation aborted at /usr/share/perl5/gorgone/modules/core/proxy/hooks.pm line 31.

I had the libssh-session-perl package installed, but in a higher version from the old bullseye repository (0.8-5) whereas the bookworm repository offers version 0.8-1:

# apt policy libssh-session-perl
libssh-session-perl:
Installed: 0.8-5~bullseye Candidate: 0.8-5~bullseye
Version table: *** 0.8-5~bullseye 100
100 /var/lib/dpkg/status
0.8-1~bookworm 500
500 https://packages.centreon.com/apt-plugins-stable bookworm/main amd64 Packages

So I downgraded the package:

apt install --reinstall libssh-session-perl=0.8-1~bookworm

Restart gorgoned service and here we go! 😄

 


 

In fact, many other packages previously installed with bullseye Centreon repository have a higher version than those in the bookworm repository.

I've listed all the paquets concerned and downgraded them to the latest version of the bookworm repository to be at the same level as a new Centreon installation:

dpkg -l | grep -e "ii.*bullseye" | awk '{ print $2 }' | while read f ; do apt install --allow-downgrades -y "$f=$(apt-cache madison $f | awk '{print $3}' | sort -V | tail -n1)" ; done

 


Thank you for sharing this.


Reply