Solved

MySQL Slave Server doesn't restart

Posted on 2014-01-07
7
988 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
  • 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 500 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
Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

 

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help With Simple Database Design 7 57
Unix Help with:  mailx -s 17 57
simple bash script needed to unpack tar.gz 4 25
Run Server 2012 on PowerEdge 2950 13 26
The purpose of this article is to demonstrate how we can use conditional statements using Python.
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

685 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