Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1032
  • Last Modified:

MySQL Slave Server doesn't restart

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
RDM1776
Asked:
RDM1776
  • 4
  • 3
1 Solution
 
jrm213jrm213Commented:
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
 
RDM1776Author Commented:
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
 
jrm213jrm213Commented:
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
RDM1776Author Commented:
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
 
jrm213jrm213Commented:
awesome glad to hear it!
0
 
RDM1776Author Commented:
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
 
RDM1776Author Commented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now