Freepbx17 - fresh install error

Installing on -
Linux freepbx17 6.1.0-9-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.27-1 (2023-05-08) x86_64 GNU/Linux

Made it quite a ways, but failing on the fwconsole command from the log file. Same result if run manually.

root@freepbx17:/tmp# fwconsole ma install sysadmin
Exception: SQLSTATE[HY000] [2002] Connection refused::SQLSTATE[HY000] [2002] Connection refused in file /var/www/html/admin/libraries/utility.functions.php on line 120

Caused by
PDOException: SQLSTATE[HY000] [2002] Connection refused in file /var/www/html/admin/libraries/BMO/Database.class.php on line 141
Stack trace:

  1. Exception->() /var/www/html/admin/libraries/utility.functions.php:120
  2. die_freepbx() /var/www/html/admin/libraries/BMO/Database.class.php:147
  3. PDOException->() /var/www/html/admin/libraries/BMO/Database.class.php:141
  4. PDO->__construct() /var/www/html/admin/libraries/BMO/Database.class.php:141
  5. FreePBX\Database->__construct() /var/www/html/admin/libraries/BMO/FreePBX.class.php:83
  6. FreePBX->__construct() /var/www/html/admin/bootstrap.php:144
  7. require_once() /etc/freepbx.conf:12
  8. include_once() /var/lib/asterisk/bin/fwconsole:12

Just playing around on a fresh install to see what’s new. Going to need to update soon.

Looks like it fails to connect to the database.

You can check manually if your mysql is up and running or not.

mysql -u freepbxuser -h localhost asterisk -p

password you can find from “/etc/freepbx.conf”


Looks like that’s the issue -

root@freepbx17:/var/log/pbx# mysql -u freepbxuser -h localhost asterisk -p
Enter password: 
ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (111)

The only database I see running is -

root@freepbx17:/etc/mysql# ps -efl |grep db
4 S message+     492       1  0  80   0 -  2074 do_epo 14:23 ?        00:00:05 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
4 S mongodb    69553       1  2  80   0 - 660432 futex_ 14:55 ?       00:00:58 /usr/bin/mongod --config /etc/mongod.conf
0 S root      139858    2587  0  80   0 -   969 pipe_r 15:35 pts/0    00:00:00 grep db

I don’t see any mysqld in the services startup stuff, but ran

service mysqld start

And it’s proceeding.

Thank you.

Just to add more -

root@freepbx17:/etc# ps -efl | grep db
4 S message+     492       1  0  80   0 -  2074 do_epo 14:23 ?        00:00:05 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
4 S mongodb    69553       1  2  80   0 - 660432 futex_ 14:55 ?       00:01:04 /usr/bin/mongod --config /etc/mongod.conf
4 S mysql     140601       1  2  80   0 - 275683 do_sys 15:38 ?       00:00:06 /usr/sbin/mariadbd
0 S root      150031   50493  2  80   0 -   969 pipe_r 15:42 pts/1    00:00:00 grep db

So looks like mariadb is mysql? Been out of touch for a while :slight_smile:

Anyway, it didn’t get started for some reason during the setup script, from what I can tell. I don’t see any errors in the log related to that.

Sorry, I’m not good with bash. Is this command valid in Debian?

`if ps -p "${pid}" > /dev/null`

If I run it standalone, it complains about the “-p” argument.

I’m pretty sure my installer died but when I try to rerun it has the error about running. ps -efl doesn’t find the PID.

@kgupta I’m pretty sure my database was dying due to lack of memory. I’m playing on a tiny VM. I increased the memory and started over and everything is installing fine now. It didn’t quite recover when I just re-ran the install script. I had errors about .htaccess and others. But I started from a fresh Debian image and a new VM and all good.

Appreciate the insight!

I do see this warning.

Unable to configure networking service: systemd-networkd conflict

Not quite sure how to resolve that one and google isn’t helping me, yet anyway. Still hunting.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.