Tuesday, April 5, 2016

No MySQL.sock because Root Partition is 100% Full

Last week our Vicidial Server crashed and our agents couldn't make calls anymore. After restarting the server and trying to do the ol' rename-mysql.sock solution, I found that the mysql.sock file was missing. What gives??!

When I try to access the agent page in Vicidial, the error was: "MySQL connect ERROR: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)". Normally, I would follow the process of renaming or deleting the existing mysql.sock file then restart the mysql service. However, this time, there was no mysql.sock. (Impt: Please DO NOT delete the mysql! They are not the same as mysql.sock!)

After checking with the provider, turns out that the root partition is already full. Here are the steps that the provider gave to resolve the issue.

Steps and SSH commands:
  1. Find out how much space you have left.
    SSH Command: df -h
    In the Admin Page, go to "Reports" and scroll down and look for "Disk". It should provide the percentage of use.
  2. Delete unwanted files. In this case, you can delete the .WAV duplicates. It won't delete your .MP3 recordings.
    SSH Command:
    rm -f /var/spool/asterisk/monitorDONE/ORIG/*.wav
    rm -f /var/log/httpd/*
  3. Restart the server via SSH. Do not just push the power button or pull the plug.
    SSH Command: sudo reboot
And there you go! If that still doesn't work but you have the mysql.sock file already, follow the old process of renaming or deleting the existing mysql.sock file then restart the mysql service

No comments:

Post a Comment