The file /etc/centreon/centreon_vmware.json is not present
Hello,
After upgrading my central and my poller to the 24.10.5, I tried to add the new VMware ESX connector through the Configuration > Monitoring Connectors Manager menu.
Everything went fine, I then export the configuration to the poller, without any issues.
But on the poller, the /etc/centreon/centreon_vmware.json is not present at all.
And when I try to install the daemon, I have this kind of message :
How do I resolve that ?
Regards,
Page 1 / 1
Hello,
I'm not able to reproduce exactly your issue but if you try to create the json file manually with good rights on the poller :
After that, are you able to correctly install the daemon ?
Once the daemon is installed, could you try to check /var/log/centreon-gorgone/gorgoned.log file on the poller while exporting the configuration If you have some right issues, you should see messages like this :
2025-04-02 09:06:29 - ERROR - Oaction] Copy processing - Can't copy file to /etc/centreon/centreon_vmware.json, Permission denied 2025-04-02 09:06:30 - ERROR - Oaction] Copy processing - MD5 does not match
Hope it helps !
Hello,
Thank you, as of now, I have exactly the messages like you mentionned.
I was able to create and to add the right on the json file :
Apr 02 14:16:05 poller1 systemdo1]: Started centreon_vmware.service - Centreon VMWare. Apr 02 14:16:05 poller1 perl5649439]: Cannot open file /var/log/centreon_vmware.log: Permission denied Apr 02 14:16:05 poller1 perl5649439]: FATAL: Can't find config file '/etc/centreon/centreon_vmware.pm'. If a migration from /etc/centreon/centreon_vmware.pm to /etc/centreon/centreon_vmware.json is required, you may centreon_vmware_convert_config_file /etc/centreon/centreon_vmwa> Apr 02 14:16:05 poller1 perl5649439]: p2025-04-02 14:16:05] -fatal] Can't find config file '/etc/centreon/centreon_vmware.pm'. If a migration from /etc/centreon/centreon_vmware.pm to /etc/centreon/centreon_vmware.json is required, you may centreon_vmware_convert_config_file /etc> Apr 02 14:16:05 poller1 systemdo1]: centreon_vmware.service: Main process exited, code=exited, status=2/INVALIDARGUMENT Apr 02 14:16:05 poller1 systemdo1]: centreon_vmware.service: Failed with result 'exit-code'.
Regards
Hello again,
Did you manage to update the daemon after creating the file ? Could you please provide the version installed with the following command, in my case, I have this version :
root@centreon-poller-0:~# apt list --installed | grep centreon-plugin-virtualization-vmware-daemon centreon-plugin-virtualization-vmware-daemon/bookworm,now 3.4.0-1+deb12u1 all ainstalled]
If your version is lower, could you try updating the daemon first?
After that, the errors of centreon_vmware service raises several problems :
Apr 02 14:16:05 poller1 perll649439]: FATAL: Can't find config file '/etc/centreon/centreon_vmware.pm'. If a migration from /etc/centreon/centreon_vmware.pm to /etc/centreon/centreon_vmware.json is required, you may centreon_vmware_convert_config_file /etc/centreon/centreon_vmwa> Apr 02 14:16:05 poller1 perll649439]: [2025-04-02 14:16:05] 1fatal] Can't find config file '/etc/centreon/centreon_vmware.pm'. If a migration from /etc/centreon/centreon_vmware.pm to /etc/centreon/centreon_vmware.json is required, you may centreon_vmware_convert_config_file /etc>
Could you provide the content of the following files : /lib/systemd/system/centreon_vmware.service :
We had an issue where the /lib/systemd/system/centreon_vmware.service file doesn't use the environment file this could explain the behaviour observed
For an advanced debug of the problem of deploying configuration files, you would have to put gorgone in debug mode on the poller and the central, by modifying the /etc/default/gorgoned file by changing the ‘severity’ option to debug and then restarting the gorgoned service.
Regards
Hello again,
Did you manage to update the daemon after creating the file ? Could you please provide the version installed with the following command, in my case, I have this version :
root@centreon-poller-0:~# apt list --installed | grep centreon-plugin-virtualization-vmware-daemon centreon-plugin-virtualization-vmware-daemon/bookworm,now 3.4.0-1+deb12u1 all ainstalled]
If your version is lower, could you try updating the daemon first?
After that, the errors of centreon_vmware service raises several problems :
Apr 02 14:16:05 poller1 perll649439]: FATAL: Can't find config file '/etc/centreon/centreon_vmware.pm'. If a migration from /etc/centreon/centreon_vmware.pm to /etc/centreon/centreon_vmware.json is required, you may centreon_vmware_convert_config_file /etc/centreon/centreon_vmwa> Apr 02 14:16:05 poller1 perll649439]: [2025-04-02 14:16:05] 1fatal] Can't find config file '/etc/centreon/centreon_vmware.pm'. If a migration from /etc/centreon/centreon_vmware.pm to /etc/centreon/centreon_vmware.json is required, you may centreon_vmware_convert_config_file /etc>
Could you provide the content of the following files : /lib/systemd/system/centreon_vmware.service :
We had an issue where the /lib/systemd/system/centreon_vmware.service file doesn't use the environment file this could explain the behaviour observed
For an advanced debug of the problem of deploying configuration files, you would have to put gorgone in debug mode on the poller and the central, by modifying the /etc/default/gorgoned file by changing the ‘severity’ option to debug and then restarting the gorgoned service.
Regards
Hello,
Thank you for trying to help us .
We have the same version as yours.
root@poller1:~# apt list --installed | grep centreon-plugin-virtualization-vmware-daemon
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
centreon-plugin-virtualization-vmware-daemon/bookworm,now 3.4.0-1+deb12u1 all ,installed
Rights on the
/var/log/centreon/
root@poller1:~# ls -l /var/log/centreon/ total 19088 -rw-r--r-- 1 106 112 0 Jun 12 2024 centreontrapd.log -rw-r--r-- 1 106 112 3051 Jun 12 2024 centreontrapd.log.1 -rw-r--r-- 1 106 112 354 Mar 24 2024 centreontrapd.log.2.gz -rw-r--r-- 1 106 112 354 Mar 23 2024 centreontrapd.log.3.gz -rw-r--r-- 1 106 112 354 Mar 13 2024 centreontrapd.log.4.gz -rw-r--r-- 1 106 112 237 Jan 20 2024 centreontrapd.log.5.gz -rw-r--r-- 1 106 112 241 Jan 13 2024 centreontrapd.log.6.gz -rw-r--r-- 1 106 112 217 Aug 31 2023 centreontrapd.log.7.gz -rw-r--r-- 1 106 112 258 Jul 15 2023 centreontrapd.log.8.gz -rw-r--r-- 1 106 112 19507977 Mar 27 11:27 centreon_vmware.log
And my “centreon” user seems to have the UID 996, not the 116.
# centreon_vmware command line options OPTIONS="--logfile=/var/log/centreon_vmware.log --severity=error"
Could it be related to the upgrade we did, from Debian 11 to Debian 12 ? It seems strange that all of the files on the “/var/log/centreon/” folder does not have a proper owner.
Regards,
Hello,
I don't know if the rights problem can be linked to the upgrade from Debian 11 to Debian 12 but there is clearly a problem there. The first step would be to restore rights for folders/files with non-existent UIDs as owners, which could correct the rights issue when copying configuration files.
Regarding the configuration of the centreon_vmware service, could you modify the /etc/default/centreon_vmware file so that it matches the one sent in my previous message. Once this has been done, you will need to restart the centreon_vmware service. This will allow the daemon to use the new configuration file format
I also copied then remove the original centreon_vmware.log file, to see if the service is able to create a new one. It seems it is, with the correct rights, but the file is empty.
Apr 04 15:00:28 poller1 systemds1]: Started centreon_vmware.service - Centreon VMWare. Apr 04 15:00:28 poller1 perl 1256695]: Can't use string ("Could not decode JSON from ''. R"...) as a HASH ref while "strict refs" in use at /usr/share/perl5/centreon/script/centreon_vmware.pm line 172. Apr 04 15:00:28 poller1 systemds1]: centreon_vmware.service: Main process exited, code=exited, status=255/EXCEPTION Apr 04 15:00:28 poller1 systemds1]: centreon_vmware.service: Failed with result 'exit-code'.
I also changed the centreon_vmware file, as requested :
root@poller1:~# cat /etc/default/centreon_vmware # centreon_vmware command line options
What it strange right there, if that we specifiy the severity to “info” but there is no log at all.
Regards,
Hello,
It's a very strange behaviour, I've never encountered this problem. Do you still have this problem? Is it possible that you still have files that don't have a real user as owner, like for the log files? (only uid /gid)
find / -nouser
Is the /etc/centreon/centreon_vmware.json file now correctly deployed?
Hello,
It's a very strange behaviour, I've never encountered this problem. Do you still have this problem? Is it possible that you still have files that don't have a real user as owner, like for the log files? (only uid /gid)
find / -nouser
Is the /etc/centreon/centreon_vmware.json file now correctly deployed?
Hello,
Here is the ouput of the
find / -nouser
root@poller1:~# find / -nouser find: ‘/proc/3321096/task/3321096/fd/6’: No such file or directory find: ‘/proc/3321096/task/3321096/fdinfo/6’: No such file or directory find: ‘/proc/3321096/fd/5’: No such file or directory find: ‘/proc/3321096/fdinfo/5’: No such file or directory /etc/centreon /etc/centreon/.centreon_vmware.pm.swp /etc/centreon/centreontrapd.pm /etc/snmp/centreon_traps
If you can confirm me that the correct owner of the last four files is “centreon”, I’ll make the changes.
Yes, the following file exist
/etc/centreon/centreon_vmware.json
root@poller1:~# ls -la /etc/centreon/ total 36 drwxrwxr-x 3 106 112 4096 Apr 2 14:11 . drwxr-xr-x 98 root root 4096 Mar 27 15:25 .. -rw-rw-r-- 1 106 112 390 Jun 19 2023 centreontrapd.pm -rw-r----- 1 centreon centreon 0 Apr 2 14:11 centreon_vmware.json -rw-r--r-- 1 106 112 12288 Oct 26 2023 .centreon_vmware.pm.swp drwxrwxr-x 2 centreon centreon 4096 Feb 24 10:21 config.d -rw------- 1 root root 103 Feb 24 10:21 config.yaml -rw-rw---- 1 centreon centreon 0 Feb 24 10:21 conf.pm -rw-r--r-- 1 root root 331 Mar 27 14:56 OLD_centreon_vmware.pm