Solved

MySQL Slave Server doesn't restart

Posted on 2014-01-07
7
1,008 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 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
Understanding Linux Permissions

Linux for beginners: How to view the permissions associated with files and directories and also how you can change them.

 

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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
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…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:

623 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