SQL Error after upgrade

Status
Not open for further replies.

meale00

New Member
Sep 26, 2022
10
0
1
24
Hi,
i have a fatal error after an upgrade, to be clear i upgraded the "Source Code" from the GUI. (The First Checkbox)
After the reload, it showed me the classical first screen of the installation (like i haven't had installed FusionPBX).
I've inserted the requested data, firstly the login and password info, then it asked for db access.
I've inserted for an error my login user password and then i had a fatal error:
error: SQLSTATE[08006] [7] FATAL: password authentication failed for user "fusionpbx" FATAL: password authentication failed for user "fusionpbx"

The server is working, also my phones are registered, but i cannot access to the GUI.
I tried to reboot the server but it's not working too.

In which way i can solve the issue?
Also, where i could find the DB password to insert in that form, if i never saw it?
I just followed the installing procedure.

Waiting for someone to help me please!
 

cemotyz09

Member
Apr 23, 2020
83
7
8
Not an expert but i think you'll have to create new passwords for the DB. If you look in the script for
Code:
/usr/src/fusionpbx-install.sh/debian/resources/postgresql.sh
you should be able to find the commands used to create a new password. If you're using a different distro just change "debian" to the respective name
 

dotfront

New Member
Aug 30, 2019
4
1
3
51
Hi Mealle00, I was upgrading our box, and have the same problem, were you able to fix this issue?
 

meale00

New Member
Sep 26, 2022
10
0
1
24
No, unfortunately i haven't tried yet.
So at this point is a bug of FusionPBX. We have to signal it at the development of the software
 

markjcrane

Active Member
Staff member
Jul 22, 2018
447
162
43
49
Run this as root from on your server console or through ssh.
cd /var/www/fusionpbx
php /var/www/fusionpbx/core/upgrade/upgrade.php

I have mentioned this multiple time here in the forum and even the past 5 to 10 day.

The web GUI upgrade can update the source but it can't always do everything as its a web application and there are valid limits to what it can do and what it should do.

When not upgrading or adding a feature it is a good idea for the files to be read only for the web server.
chown -R root:root /var/www/fusionpbx

If the files are read only then the Upgrade Source in the GUI will disappear as it doesn't have permission to run.
 

dotfront

New Member
Aug 30, 2019
4
1
3
51
Thanks Mark, still getting same error:

error: SQLSTATE[08006] [7] connection to server at "localhost" :):1), port 5432 failed: FATAL: password authentication failed for user "fusionpbx" connection to server at "localhost" :):1), port 5432 failed: FATAL: password authentication failed for user "fusionpbx"
:(
 

markjcrane

Active Member
Staff member
Jul 22, 2018
447
162
43
49
Compare the password in config.php, config.lua and the new config.conf file. Also where did the message come from web browser or FreeSWITCH fs_cli or FreeSWITCH logs? Fixing something over text based means is not as effective as a phone call and remote desktop
 

markjcrane

Active Member
Staff member
Jul 22, 2018
447
162
43
49
Newest version sets FreeSWITCH to use its default database in /varlib/freeswitch/db directory so there is no password for that by default. Adjusted that for new upgrades yesterday.

Did have some useful bug fixes yesterday that everyone should make sure they have.
 

meale00

New Member
Sep 26, 2022
10
0
1
24
@markjcrane when i try to execute the given command
Code:
cd /var/www/fusionpbx
php /var/www/fusionpbx/core/upgrade/upgrade.php

I receive this error:
Code:
error: SQLSTATE[08006] [7] FATAL:  password authentication failed for user "fusionpbx"
FATAL:  password authentication failed for user "fusionpbx"

What do you suggest?
 

markjcrane

Active Member
Staff member
Jul 22, 2018
447
162
43
49
Make sure the password to the database is correct in /etc/fusionpbx/config.conf you can look at the old /etc/fusionpbx/config.php file for the password.
 

markjcrane

Active Member
Staff member
Jul 22, 2018
447
162
43
49
I just updated the install and upgrade code so that if the config.php exists it will redirect to the install automatically.

- From there if the config directory is writable it will make the config.conf automatically from the config.php
- If the config directory isn't writable it will tell you the commands to run from root to make the config.conf file using the upgrade.php
- If the config.php doesn't exist it provides the option to install
- If the config.conf exists then the install is disabled

This should help to make the upgrade to the new config.conf file about as easy as it can be.
 
Status
Not open for further replies.