Solved

MySQL Slave Server doesn't restart

Posted on 2014-01-07
7
958 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:RDM1776
Comment Utility
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
Comment Utility
awesome glad to hear it!
0
 

Author Comment

by:RDM1776
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

More or less everybody in the IT market understands the basics of Networking, however when we start talking about Storage Networks, things get a bit dizzier, and this is where I would like to help.
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now