Reload failed because retrieve_conf encountered an error: 1

I just updated about 8 modules the latest version a few minutes ago and when I click Apply Config, I get this:

Reload failed because retrieve_conf encountered an error: 1

exit: 1
[FATAL] SQLSTATE[HY000] [2002] Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) SQLSTATE[HY000] [2002] Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

Trace Back:

/drbd/httpd/www/html/admin/libraries/BMO/Database.class.php:70 PDO->__construct()
[0]: mysql:host=localhost;dbname=asteriskcdrdb
[1]: username
[2]: password

/drbd/httpd/www/html/admin/modules/cdr/Cdr.class.php:35 Database->__construct()
[0]: mysql:host=localhost;dbname=asteriskcdrdb
[1]: username
[2]: password

/drbd/httpd/www/html/admin/libraries/BMO/Self_Helper.class.php:116 Cdr->__construct()
[0]:

/drbd/httpd/www/html/admin/libraries/BMO/Self_Helper.class.php:36 Self_Helper->autoLoad()
[0]: Cdr

/drbd/httpd/www/html/admin/libraries/BMO/Hooks.class.php:163 Self_Helper->__get()
[0]: Cdr

/drbd/httpd/www/html/admin/libraries/BMO/Hooks.class.php:37 Hooks->preloadBMOModules()

/drbd/asterisk/lib/bin/retrieve_conf:26 Hooks->updateBMOHooks()
1 error(s) occurred, you should view the notification log on the dashboard or main screen to check for more details.

===========================

I manually ran retrieve_conf and it outputs this (Looks the same as from FreePBX):

[[email protected] ~]# /drbd/asterisk/lib/bin/retrieve_conf
[FATAL] SQLSTATE[HY000] [2002] Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) SQLSTATE[HY000] [2002] Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

Trace Back:

/drbd/httpd/www/html/admin/libraries/BMO/Database.class.php:70 PDO->__construct()
[0]: mysql:host=localhost;dbname=asteriskcdrdb
[1]: username
[2]: password

/drbd/httpd/www/html/admin/modules/cdr/Cdr.class.php:35 Database->__construct()
[0]: mysql:host=localhost;dbname=asteriskcdrdb
[1]: username
[2]: password

/drbd/httpd/www/html/admin/libraries/BMO/Self_Helper.class.php:116 Cdr->__construct()
[0]:

/drbd/httpd/www/html/admin/libraries/BMO/Self_Helper.class.php:36 Self_Helper->autoLoad()
[0]: Cdr

/drbd/httpd/www/html/admin/libraries/BMO/Hooks.class.php:163 Self_Helper->__get()
[0]: Cdr

/drbd/httpd/www/html/admin/libraries/BMO/Hooks.class.php:37 Hooks->preloadBMOModules()

/drbd/asterisk/lib/bin/retrieve_conf:26 Hooks->updateBMOHooks()

[[email protected] ~]#

Admin

Asterisk CLI 2.11.0.3 Stable Schmooze Com Inc GPLv3+ Enabled
Backup & Restore 12.0.15 Stable Schmooze Com Inc GPLv3+ Enabled
Blacklist 12.0.1 Stable Schmooze Com Inc GPLv3+ Enabled
Bulk Phone Restart 12.0.1 Stable Schmooze Com Inc GPLv3+ Enabled
Custom Applications 12.0.1 Stable Schmooze Com Inc GPLv3+ Enabled
Digium Addons 2.11.0.10 Stable Digium GPLv2 Enabled
Feature Code Admin 12.0.2 Stable Schmooze Com Inc GPLv3+ Enabled
FreePBX ARI Framework 12.0.7 Stable Schmooze Com Inc GPLv3+ Disabled
FreePBX Framework 12.0.57 Stable FreePBX GPLv2+ Enabled
Phonebook 2.11.0.2 Stable Schmooze Com Inc GPLv3+ Enabled
Phonebook Directory 2.11.0.2 Stable Schmooze Com Inc GPLv3+ Enabled
Recordings 12.0.7 Stable Schmooze Com Inc GPLv3+ Enabled
System Admin 12.0.27.1 Stable Schmooze Com Inc. Commercial Enabled
UCP Node Server 12.0.1alpha8 Stable Schmooze Com Inc Commercial Enabled
User Control Panel 12.0.23 Stable FreePBX AGPLv3+ Enabled
User Management 12.0.26 Stable Schmooze Com Inc AGPLv3+ Enabled
iSymphonyV3 4.1.3 Stable i9 Technologies GPLv3 Disabled
Applications

Announcements 2.11.0.4 Stable Schmooze Com Inc GPLv3+ Enabled
Bulk DIDs 2.11.1.4 Stable Schmooze Com Inc GPLv3+ Enabled
Bulk Extensions 2.11.0.7 Stable Schmooze Com Inc GPLv3+ Enabled
Call Flow Control 2.11.0.6 Stable Schmooze Com Inc GPLv3+ Enabled
Call Forward 12.0.7 Stable Schmooze Com Inc AGPLv3+ Enabled
Call Recording 12.0.2.5 Stable Schmooze Com Inc AGPLv3+ Enabled
Call Waiting 12.0.3 Stable Schmooze Com Inc GPLv3+ Enabled
Conferences 12.0.15 Stable Schmooze Com Inc GPLv3+ Enabled
Core 12.0.28 Stable Schmooze Com Inc GPLv3+ Enabled
Directory 12.0.2 Stable Schmooze Com Inc GPLv3+ Enabled
Do-Not-Disturb (DND) 12.0.3 Stable Schmooze Com Inc GPLv3+ Enabled
Follow Me 12.0.11 Stable Schmooze Com Inc GPLv3+ Enabled
IVR 2.11.0.11 Stable Schmooze Com Inc GPLv3+ Enabled
Info Services 12.0.1 Stable Schmooze Com Inc GPLv2+ Enabled
Misc Applications 2.11.0.2 Stable Schmooze Com Inc GPLv3+ Enabled
Misc Destinations 2.11.0.4 Stable Schmooze Com Inc GPLv3+ Enabled
Paging and Intercom 12.0.14 Stable Schmooze Com Inc GPLv3+ Enabled
Queue Priorities 2.11.0.2 Stable Schmooze Com Inc GPLv3+ Enabled
Queues 12.0.19 Stable Schmooze Com Inc GPLv2+ Enabled
Ring Groups 12.0.3.2 Stable Schmooze Com Inc GPLv3+ Enabled
Set CallerID 2.11.0.4 Stable Schmooze Com Inc GPLv3+ Enabled
Text To Speech 2.11.0.10 Stable Schmooze Com Inc GPLv3+ Enabled
Time Conditions 12.0.7.1 Stable Schmooze Com Inc GPLv3+ Enabled
Connectivity

DAHDi Config 2.11.52 Stable Schmooze Com Inc GPLv3+ Enabled
Digium Phones Config 2.11.2.2 Stable Digium GPLv3+ Enabled
Extension Routes 12.0.11 Stable Schmoozecom.com Commercial Enabled
OSS PBX End Point Manager 2.11.9 Stable GPLv2+ Enabled
SIPSTATION 12.0.8.2 Stable Schmooze Com Inc Commercial Enabled
Reports

Asterisk Info 12.0.1 Stable Schmooze Com Inc GPLv3+ Enabled
Asterisk Logfiles 12.0.6 Stable Schmooze Com. Inc. GPLv3+ Enabled
CDR Reports 12.0.19 Stable Schmooze Com Inc GPLv3+ Enabled
Print Extensions 2.11.0.1 Stable Schmooze Com Inc GPLv3+ Enabled
System Dashboard 12.0.28 Stable FreePBX AGPLv3+ Enabled
Weak Password Detection 12.0.3 Stable Schmooze Com Inc GPLv3+ Enabled
Settings

Asterisk API 12.0.2 Stable FreePBX GPLv2+ Enabled
Asterisk IAX Settings 2.11.0.3 Stable Schmooze Com Inc AGPLv3 Enabled
Asterisk SIP Settings 12.0.11 Stable Schmooze Com Inc AGPLv3+ Enabled
Extension Settings 2.11.0.2 Stable Mikael Carlsson GPLv2 Enabled
Fax Configuration 12.0.7 Stable Schmooze Com Inc GPLv3+ Enabled
High Availability Services 12.0.5.2 Stable Schmooze Com Inc Commercial Enabled
Music on Hold 12.0.1 Stable Schmooze Com Inc GPLv3+ Enabled
Route Congestion Messages 2.11.0.2 Stable Schmooze Com Inc GPLv3+ Enabled
Speed Dial Functions 2.11.0.2 Stable Schmooze Com Inc GPLv3+ Enabled
Text To Speech Engines 2.11.0.3 Stable Schmooze Com Inc Commercial Enabled
Voicemail 12.0.38 Stable FreePBX GPLv3+ Enabled

One more thing, I checked in /var/lib/mysql and it’s empty! no mysql.sock file.

HAH! After looking closer at the error, I removed the cdr module and now FreePBX reloads. However, I reinstalled the cdr module and it won’t install because of the same issue of the freepbxuser not being able to access mysql.

Still looking for help on this. Thanks!

That error means mysql isn’t running. You’ll need to start it

I started mysql and when I try to install the CDR Reports module, I get this:

Please wait while module actions are performed

Installing cdr
FATAL ERROR
SQLSTATE[28000] [1045] Access denied for user ‘freepbxuser’@‘localhost’ (using password: YES)

SQLSTATE[28000] [1045] Access denied for user ‘freepbxuser’@‘localhost’ (using password: YES)

Trace Back

/drbd/httpd/www/html/admin/libraries/BMO/Database.class.php:70 PDO->__construct()
[0]: mysql:host=localhost;dbname=asteriskcdrdb
[1]: freepbxuser
[2]:

/drbd/httpd/www/html/admin/modules/cdr/Cdr.class.php:35 Database->__construct()
[0]: mysql:host=localhost;dbname=asteriskcdrdb
[1]: freepbxuser
[2]:

/drbd/httpd/www/html/admin/libraries/BMO/Self_Helper.class.php:116 Cdr->__construct()
[0]:

/drbd/httpd/www/html/admin/libraries/BMO/Self_Helper.class.php:60 Self_Helper->autoLoad()
[0]: Cdr

/drbd/httpd/www/html/admin/libraries/modulefunctions.class.php:2228 Self_Helper->injectClass()
[0]: Cdr
[1]: /var/www/html/admin/modules/cdr/Cdr.class.php

/drbd/httpd/www/html/admin/libraries/modulefunctions.class.php:1799 module_functions->_runscripts()
[0]: cdr
[1]: install
[2]:

/drbd/httpd/www/html/admin/page.modules.php:283 module_functions->install()
[0]: cdr

/drbd/httpd/www/html/admin/config.php:341 include()
[0]: /drbd/httpd/www/html/admin/page.modules.php