Skip to main content
Question

contact problems between my web server and my mariadb database since debian 12 when installing centreon on the web interface

  • November 8, 2024
  • 8 replies
  • 176 views

Forum|alt.badge.img+1

Hello everyone, 

I have just installed centreon on a debian 12 vm based on proxmox. 
During my installation, I noticed at step 6 that I don't have access to my mariadb screen database. I looked for different errors in the mariadb, php or apache2 web server logs and I found this: 

[Thu Nov 07 16:31:35.823210 2024] [proxy_fcgi:error] [pid 31742:tid 31742] [client 10.16.6.232:59204] AH01071: Got error 'PHP message: [2024-11-07T16:31:35+0100] [CRITICAL] Environment variable not found: “hostCentreon”. {“context”:“[object] (Symfony\\\\Component\\\\DependencyInjection\\\\Exception\\\\EnvNotFoundException(code: 0): Environment variable not found: \\”hostCentreon\“. at /usr/share/centreon/vendor/symfony/dependency-injection/EnvVarProcessor.php:217)”}”,

however, I did declare my centreon host in the various conf files in .env and conf.php. 

I'm using:
mariadb version 10.11.10
php version 8.2.25
apache 2 version 2.4.62 


I'm completely lost when it comes to this, and I really need it quickly, as this infra is ultimately necessary to obtain my diploma. 

Thanks in advance to anyone who can help me.

Best regards, 


Adil

Translated with DeepL.com (free version)

8 replies

ponchoh
Centreonian
Forum|alt.badge.img+14
  • Centreonian
  • November 8, 2024

Hello @adilkrch,

 

questions, can your central reach the sql server? localhost or the ip? can your connect to the db from the central? mainly because of the “Connection refused”

mysql -h 10.30.1.82 -u root -p

mysql -u root -p


Forum|alt.badge.img+1
  • Author
  • Steward *
  • November 8, 2024

Hello @ponchoh i can’t Connect with ip adress but only with localhost. It s db local.

u Could see that with this screenshot


ponchoh
Centreonian
Forum|alt.badge.img+14
  • Centreonian
  • November 8, 2024

perfect, then lets try with an empty field (using the default, localhost)

 

🤞


Forum|alt.badge.img+1
  • Author
  • Steward *
  • November 8, 2024

I create an user in my database with ip adress and i can Connect. 

 


Forum|alt.badge.img+1
  • Author
  • Steward *
  • November 8, 2024

 


ponchoh
Centreonian
Forum|alt.badge.img+14
  • Centreonian
  • November 8, 2024

Thanks for the images, I was thinking an empty field. Also, did you follow these steps?

 

https://docs.centreon.com/docs/installation/installation-of-a-central-server/using-packages/#secure-the-database


Forum|alt.badge.img+1
  • Author
  • Steward *
  • November 8, 2024

Yes of course 


ponchoh
Centreonian
Forum|alt.badge.img+14
  • Centreonian
  • November 8, 2024

which centreon version are you installing?