I just upgraded my system, the upgrade indicated that there weren’t any issues but I re3ceived 4 e-mails with problems. Can anyone tell me if these need to be resolved?
Exception: 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) in file
/var/www/html/admin/libraries/utility.functions.php on line 202 Stack trace:
Exception: 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) in file
/var/www/html/admin/libraries/utility.functions.php on line 202 Stack trace:
Exception: 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) in file /var/www/html/admin/libraries/utility.functions.php
on line 202 Stack trace:
I think it is. See below: (I’m not very knowledgeable with Linux.)
[[email protected] ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2357
Server version: 5.1.73 Source distribution
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql> connect
Connection id: 2366
Current database: *** NONE ***
mysql> status
mysql Ver 14.14 Distrib 5.1.73, for redhat-linux-gnu (x86_64) using readline 5.1
Connection id: 2366
Current database:
Current user: [email protected]
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.1.73 Source distribution
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: latin1
Conn. characterset: latin1
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 5 hours 19 min 23 sec
Threads: 5 Questions: 150313 Slow queries: 0 Opens: 109 Flush tables: 1 Open tables: 64 Queries per second avg: 7.843
This is usually indicative of the /var/lib/asterisk/bin/pagepro-scheduler.php program is not executable by Asterisk.
Check the ownership of the files and directories and make sure that asterisk can read and execute the program and the …/bin directory.
Check your MySQL my.cnf file and make sure that your are specifying the same socket name is being used in your FreePBX deployment. ALso, check your directory permissions to make sure that the Asterisk user can access the socket.
The easiest way I can think of to do this is to log into the server as ‘root’. Use ‘su -m asterisk’ to change to the asterisk user and then try to access the files.
Thanks for the response Dave; I think it looks good but I’m not sure. I seem to have links to the actual file and socket. To be honest, I’ve never seen “s” as the first character of a permissions string.
I checked the permissions, and everything looks OK to me. It is accessed via a link, and owned by asterisk with execution authority. Does the second ll need write authority?
Here is my my.cnf file, I think I need to enable symbolic links?? Note that I am able to read CDRs from the FreePBX interface, I believe that uses SQL.
Try running “fwconsole chown” and see what that does.
Your old installation of FreePBX used a program called “amportal” for a lot of management stuff. With the advent of Version 12 (13?), the control program is now “fwconsole”. Run that without any arguments to see all of the options.
How do I resolve the errors the I encountered in the last install? I used the module update within FreePBX and installed 31 modules.
Another couple of errors I’ve seen for some time shows up when I sign into Linux that seems related to fwconsole (I don’t have the new Symfony application installed, so I’ve been ignoring them):
Using username “mike”.
Authenticating with public key
Last login: Mon Jul 11 05:54:59 2016 from 192.168.0.9
PHP Warning: include_once(/etc/asterisk/freepbx.conf): failed to open stream: Permission denied in /var/lib/asterisk/bin/fwconsole on line 13
PHP Warning: include_once(): Failed opening ‘/etc/asterisk/freepbx.conf’ for inclusion (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/libasterisk/bin/fwconsole on line 13
PHP Fatal error: Class ‘Symfony\Component\Console\Application’ not found in /var/www/html/admin/libraries/FWApplication.class.php on line 11
The install for some of the most recent updates seemed to have failed due to errors. I don’t notice any specific problems but want to make sure that I don’t need to run the updates that failed again. I’m worried that since those failed, I might have an issue down the road.
By the way, I appreciate all of your help. I’d like to send you a bag of our Kona coffee as a token of appreciation. Send me your name and mailing address if you’re interested.
As you go forward, the “module admin” option on the GUI should keep you reasonably up-to-date.
Note that these will sometimes fail (especially is you are tracking the “edge” release). Just power through them until the routine completes without errors. If you can’t, there are specific “fwconsole” commands that you can use to remove and reinstall modules that fail to correctly upgrade.
In my experience, when upgrading, it doesn’t pay to “apply changes” after every step in the update process. I find that doing it once, at the end of the installation chain, is usually sufficient.