JSS – Troubleshooting MySQL Connection Errors

JSS – Troubleshooting MySQL Connection Errors

os x yosemite, casper suite, mysql logos

Overview


On our JAMF Software Server (JSS) we noticed and error occurring during scheduled JSS database backup using the JSS Database Utility. The bug is in the implementation of the MySQL binary running on OS X, and isn’t seen on other platforms like Windows or other Unix servers. The Symptoms include, under heavy work loads we see the error: “Lost connection to MySQL server at ‘sending authentication information’, and system error: 32”. Our server is running, JAMF Software Server (JSS) 9.82, OS X 10.10.5 “Yosemite” with server application version 5.0.15, and MySQL MySQL version 14.14 distribution 5.6.24.

JSS Database Utility Error
The following error will occur when trying to do a manual backup of your JSS database using the “JSS Database Utility”:

JSS Database Utility Error During Manual JSS Database Backup

JSS Database Schedule Backup Error
Also, you will get errors with scheduled backups:

JSS Database Utility - Schedule Backup Failure Mail

MySQL Logs
By default, MySQL, no logs are enabled, except the error log on Windows. The following web page outlines the process of enabling MySQL logging:

http://dev.mysql.com/doc/refman/5.7/en/server-logs.html

And JAMF Software doesn’t recommend enabling MySQL logging by default, but only temporarily for troubleshooting purposes, since it may take up a significant amount of disk space without a script to rotate/remove old logs.

http://dev.mysql.com/doc/refman/5.7/en/log-file-maintenance.html

JSS Database Utility Logs
The JSS Database Utility logs are located here:

These logs only appear to output information when the databases are backing up, and this MySQL prevented backup.

MySQL Authentication Error
The issue was repeatable with a simple database import through the mysql client you get the authentication error.

MySQL Exception
Also, passing in the host causes MySQL to throw a different exception:

Restart MySQL
A temporary workaround to make a manual JSS database backup is restarting MySQL:

JSS Database Utility
Using the JSS Database Utility, select the “Restart MySQL…” command from the “Utilities” menu.

JSS Database Utility - Restart MySQL

Command Line
On OS X to restart MySQL pre 5.7 from the command line:

On OS X Yosemite/El Capitan to restart MySQL post 5.7 from the command line:

Then proceed with the manual backup using the JSS Database Utility’s “Save Backup Now…” option.

JSS Database Utility - Save Backup Now...

Workaround


On workaround that might resolve the issue is to edit the configuration of the “my.cnf” file.

This file could be in two different locations:

or

Open up the “my.cnf” file with a text editor, here is the default configuration for MySQL 5.6:

Under the |mysqld| section, add the following three variables:

For example:

Then restart MySQL using the JSS Database Utility or command line noted above and test modifications.

Our testing has shown these steps will allow MySQL to resume successful backups.

MySQL Bug


This appeared tied to the following MySQL bug:

http://bugs.mysql.com/bug.php?id=71960

If you are seeing this issue, please report a confirmation with details.

MySQL Bug ID 71960

2 Comments
  • madden 17 coins
    Posted at 20:58h, 20 October Reply

    madden 17 coins

    Many thanks very useful. Will share website with my buddies

    • Richard Glaser
      Posted at 23:08h, 25 October Reply

      Thanks glad it was useful. Note, you might also find our other post useful if you are running MySQL on OS X, you can avoid errors my increasing the open files descriptor limits…

      https://apple.lib.utah.edu/?p=900

Leave a Reply