We had our Casper server (Mac mini) crash a few weeks back, so we decided to upgrade to newer hardware.
The server (9.81) is online and running with clients communicating. Nothing seems out of the ordinary from that standpoint. The problem seems to be with the MySQL server possibly. Since this was a new machine I decided to keep everything current. So it's running OS X 10.11.2 and MySQL 5.7.9.
I cannot get the JSS database utility to connect reliably. It will report:
Unable to connect to the database: mysql: Warning] Using a password on the command line interface can be insecure. ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
If I restart the MySQL service, I can get the JSS database utility to work and make a backup, but eventually it fails again. Oddly, the MySQL status from the command line says running, but the preference pane in System Preferences keeps jumping between Stopped and Running.
I'm wondering if there's a compatibility issue with this version of MySQL? Do I need to downgrade to 5.6.x? I didn't see any warnings against using 5.7.x it in the JAMF forums. Or is it an El Capitan issue? Both? We were originally running Mavericks before. I guess I should have stayed with what was working and not get greedy. :-)
I had read about there being an issue with port 3307 in com.oracle.oss.mysql.mysqld.plist. But that doesn't appear to be it. There wasn't any hardcoded port in the plist file. I added "<string>--port=3306</string>" just in case that was the issue.
While MySQL is running, I can run "sudo /usr/local/mysql/support-files/mysql.server status" and it will report:
/usr/local/mysql/support-files/mysql.server: line 365: pidof: command not found
ERROR! MySQL is not running
But the server is running, the site is accessible, and Casper is working. The JSSDatabaseUtil.jar will connect just fine. Then for some unknown amount of time, the JSSDatabaseUtil.jar will stop connecting with the error I mentioned above. So far my only fix is to unload and load the plist file:
sudo launchctl unload -w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
sudo launchctl load -w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
But that only lasts for so long. I can verify everything...
sudo lsof -i -P | grep -i mysql
mysqld 16110 _mysql 28u IPv6 <removed> 0t0 TCP *:3306 (LISTEN)
mysqld 16110 _mysql 51u IPv6 <removed> 0t0 TCP localhost:3306->localhost:51473 (ESTABLISHED)
mysqld 16110 _mysql 54u IPv6 <removed> 0t0 TCP localhost:3306->localhost:51474 (ESTABLISHED)
mysqld 16110 _mysql 57u IPv6 <removed> 0t0 TCP localhost:3306->localhost:51475 (ESTABLISHED)
mysqld 16110 _mysql 68u IPv6 <removed> 0t0 TCP localhost:3306->localhost:51476 (ESTABLISHED)
mysqld 16110 _mysql 82u IPv6 <removed> 0t0 TCP localhost:3306->localhost:51477 (ESTABLISHED)
Then I attempt to log in to MySQL via the terminal:
mysql -u root -p
Enter password:
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 102
I go back to check the JSSDatabaseUtil.jar and it can no longer connect again. If it helps, here are some example mysqld.local.err log reports this around the same time:
2015-12-22T19:07:15.716888Z 27 2Note] Access denied for user 'admin'@'localhost' (using password: NO)
2015-12-22T19:15:18.356625Z 0 Warning] File Descriptor 1104 exceedeed FD_SETSIZE=1024
2015-12-22T19:16:32.938129Z 0 Warning] File Descriptor 1177 exceedeed FD_SETSIZE=1024
Obviously something is trying to access something with 'admin'@'localhost', but this user doesn't exist. Not sure if this is somehow causing the problems.
+--------------+-----------+
| user | host |
+--------------+-----------+
| jamfsoftware | localhost |
| mysql.sys | localhost |
| root | localhost |
+--------------+-----------+
3 rows in set (0.00 sec)
I'm at a loss as to what else to try, besides wiping the server and starting over with Mavericks and 5.6.x.
Thank you for the help.