GUI Not Coming Up

Hey guys,

I tried logging into one of our FreePBX (this one is running 13) instances and the page refuses to load. I log into the server via SSH and am greeted with the following message (instead of the usual FreePBX banner):

Exception: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through so                                                                             cket '/var/lib/mysql/mysql.sock' (111)::SQLSTATE[HY000] [2002] Can't connect to                                                                              local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in file /var                                                                             /www/html/admin/libraries/utility.functions.php on line 204
Stack trace:
  1. Exception->() /var/www/html/admin/libraries/utility.functions.php:204
  2. die_freepbx() /var/www/html/admin/libraries/BMO/Database.class.php:136
  3. PDOException->() /var/www/html/admin/libraries/BMO/Database.class.php:133
  4. PDO->__construct() /var/www/html/admin/libraries/BMO/Database.class.php:133
  5. FreePBX\Database->__construct() /var/www/html/admin/libraries/BMO/FreePBX.c                                                                             lass.php:69
  6. FreePBX->__construct() /var/www/html/admin/bootstrap.php:139
  7. require_once() /etc/freepbx.conf:9
  8. include_once() /var/lib/asterisk/bin/fwconsole:12
Exception: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through so                                                                             cket '/var/lib/mysql/mysql.sock' (111)::SQLSTATE[HY000] [2002] Can't connect to                                                                              local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in file /var                                                                             /www/html/admin/libraries/utility.functions.php on line 204
Stack trace:
  1. Exception->() /var/www/html/admin/libraries/utility.functions.php:204
  2. die_freepbx() /var/www/html/admin/libraries/BMO/Database.class.php:136
  3. PDOException->() /var/www/html/admin/libraries/BMO/Database.class.php:133
  4. PDO->__construct() /var/www/html/admin/libraries/BMO/Database.class.php:133
  5. FreePBX\Database->__construct() /var/www/html/admin/libraries/BMO/FreePBX.c                                                                             lass.php:69
  6. FreePBX->__construct() /var/www/html/admin/bootstrap.php:139
  7. require_once() /etc/freepbx.conf:9
  8. include_once() /var/lib/asterisk/bin/fwconsole:12
[[email protected] ~]#

So it looks like MySQL stopped… Great… I manually start that service and then do a fwconsole restart:

[[email protected] ~]# fwconsole restart
Running FreePBX shutdown...

Stopping RestApps Server
Stopped RestApps Server
Stopping UCP Node Server
Stopped UCP Node Server
Zulu Server is not running
Shutting down Asterisk Gracefully. Will forcefully kill after 30 seconds.
Press C to Cancel
Press N to shut down NOW
[============================] 30 secs
Killing asterisk forcefully.

Wanrouter: No valid Sangoma Hardware found, if you have no Sangoma cards this is OK
Stopping DAHDi for Digium Cards
DAHDi Stopped
Queue Callback Server is not running
Running FreePBX startup...
Wanrouter: No valid Sangoma Hardware found, if you have no Sangoma cards this is OK
Starting DAHDi for Digium Cards
DAHDi Started
Running Sysadmin Hooks
Restarting fail2ban
fail2ban Restarted
Updating License Information for 73692167
Starting Asterisk...
[============================] 2 secs
Asterisk Started
Starting RestApps Server...
[>---------------------------] 1 sec
Started RestApps Server. PID is 2768
Starting UCP Node Server...
[>---------------------------] 1 sec
Started UCP Node Server. PID is 2989
RestApps is not licensed.
This product is not licensed
[[email protected] ~]#

No joy…

I also ran the following command to get the exact version of FreePBX this is running and it gave me the following errors:

[[email protected] ~]# amportal a ma list | grep framework
/var/lib/asterisk/bin/freepbx_engine: line 222: /var/lib/asterisk/bin/freepbx_engine_hook_dahdiconfig: No such file or directory
/var/lib/asterisk/bin/freepbx_engine: line 222: /var/lib/asterisk/bin/freepbx_engine_hook_endpoint: No such file or directory
/var/lib/asterisk/bin/freepbx_engine: line 222: /var/lib/asterisk/bin/freepbx_engine_hook_pagingpro: No such file or directory
/var/lib/asterisk/bin/freepbx_engine: line 222: /var/lib/asterisk/bin/freepbx_engine_hook_restapps: No such file or directory
/var/lib/asterisk/bin/freepbx_engine: line 222: /var/lib/asterisk/bin/freepbx_engine_hook_ucp: No such file or directory
/var/lib/asterisk/bin/freepbx_engine: line 222: /var/lib/asterisk/bin/freepbx_engine_hook_ucpnode: No such file or directory
/var/lib/asterisk/bin/freepbx_engine: line 222: /var/lib/asterisk/bin/freepbx_engine_hook_vqplus: No such file or directory
/var/lib/asterisk/bin/freepbx_engine: line 222: /var/lib/asterisk/bin/freepbx_engine_hook_xmpp: No such file or directory
| framework            | 13.0.191.11  | Enabled                                | GPLv2+     |
[[email protected] ~]#

Sounds like something happened to some of the files?

Any assistance with this would be greatly appreciated!

Thanks!!

Hi:
You can disable the modules first if you are not using.

Hi James,

I ended up rebooting it last night and it decided it would start working again.

No indication why it started working though.

Gotta go through the logs…

Thanks for the suggestion though.