Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MySQL Slave Server doesn't restart

Posted on 2014-01-07
7
Medium Priority
?
1,020 Views
Last Modified: 2016-02-11
Dear Experts,

This is regarding a MySQL error connected to FreeRADIUS 2.1 on FreeBSD 8.1.

I am quite new to both FreeRADIUS and MySQL. The basic issue is that I had to insert data into some tables in a master server that was configured to replicate those settings to two other slaves. Slave1 responded and replicated. Slave2 did not, further, on looking at the radius.log file, it was clear that the server was not connecting (to the database?).

In the past, similar issues were resolved by: stopping /usr/local/etc/rc.d/radiusd
and restarting  /usr/local/etc/rc.d/mysql-server

This didn't work. After killing mysql pid, now, mysql will not start.
when I ran a tail command on the radius.log file, I got these errors:
Tue Jan 7 20:18:00 2014 : Error: Failed to load clients from SQL.
Tue Jan 7 20:18:00 2014 : Info: rlm_sql (sql): Closing sqlsocket 4
Tue Jan 7 20:18:00 2014 : Info: rlm_sql (sql): Closing sqlsocket 3
Tue Jan 7 20:18:00 2014 : Info: rlm_sql (sql): Closing sqlsocket 2
Tue Jan 7 20:18:00 2014 : Info: rlm_sql (sql): Closing sqlsocket 1
Tue Jan 7 20:18:00 2014 : Info: rlm_sql (sql): Closing sqlsocket 0
Tue Jan 7 20:18:00 2014 : Error: /usr/local/etc/raddb/sql.conf[22]: Instantiation failed for module "sql"
Tue Jan 7 20:18:00 2014 : Error: /usr/local/etc/raddb/sites-enabled/default[177]: Failed to load module "sql".
Tue Jan 7 20:18:00 2014 : Error: /usr/local/etc/raddb/sites-enabled/default[69]: Errors parsing authorize section.
Tue Jan 7 20:18:00 2014 : Error: Failed to load virtual server <default>

this is one error that no solution seems to work for: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Attached is the error log. I have no idea what that means.

Thanks for any help!

Ryan
server3.error.rtf
0
Comment
Question by:RDM1776
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 17

Expert Comment

by:jrm213jrm213
ID: 39766018
It looks like there was a problem with the installation of the software on that server.

Did the software install MySQL for you or did you install it yourself?

What happens if you issue "/usr/local/etc/rc.d/mysql-server start" what error do you get?
0
 

Author Comment

by:RDM1776
ID: 39766042
running the command "/usr/local/etc/rc.d/mysql-server start" yields no error code. The shell prompt comes up again. so when I run "/usr/local/etc/rc.d/mysql-server status", I just see "mysql is not running".

This server has been running for at least 5-6 years. I have been with the company 9months! I have no idea how the installation was done. The server is also running PowerDNS as well, which uses mysql, so I cannot say how the install was done.

This is a case where I inherited a network.
0
 
LVL 17

Accepted Solution

by:
jrm213jrm213 earned 2000 total points
ID: 39766128
Did you recently run any updates to FreeRadius or MySQL?

It is very odd to not get an error starting MySQL but for MySQL to not be running...

What does your MySQL error log have in it?

If you don't know where it is the following link might help.
http://www.cyberciti.biz/faq/location-of-mysql-logs-in-linux-unix-bsd-apple-osx/
0
Command Line Tips and Tricks

The command line is a powerful tool at the disposal of every Linux user. Although Linux distros come with beautiful user interfaces, it's worthwhile to learn the command line because it allows you to do a number of things that you otherwise cannot do from the GUI.  

 

Author Comment

by:RDM1776
ID: 39766287
I appreciate the help, I just solved this on my own. I did look at the radius error log, and there was a bit about "can't write to disk" "disk full".

So I "df -h" and saw that the "/var/" directory had -100M left of space (!?) and found that the radius detail files were "full".

Just deleting old files (2011, 2012) was sufficient to start the mysql-server right up, and then the radius server.

Thanks for the help, but this is what did it, and now the slave is replicating!
0
 
LVL 17

Expert Comment

by:jrm213jrm213
ID: 39766297
awesome glad to hear it!
0
 

Author Comment

by:RDM1776
ID: 39766312
I've requested that this question be closed as follows:

Accepted answer: 0 points for RDM1776's comment #a39766287

for the following reason:

I solved this issue myself. I found that by looking at the disk usage, or how much space was used (using commands like "df -h" and "du -sh" gave me a clue that a key directory was 100% full.

That lead me to find the radius server "detail" files in /var/log/radacct/. By removing some of those--old files--that enabled the mysql server and then the radius server to start up again.
0
 

Author Closing Comment

by:RDM1776
ID: 39766313
Checking the logs for errors was the key to finding out that the disk space was used up 100%! I thought I had damaged the database, but it was just log files that were too full. The error logs, first the mysql, then the radius ones showed the errors.

So I would say this was a helpful answer because it pointed me to think the right direction, and not to panic! :)
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question