Posted on 03-05-2017 01:28 PM
Hi! I just recently installed the newest update this month, and I am unable to get access back into the JSS. This is the error message I get when I try to access the site:
Database Connection Error
The following error was encountered:
QueryException: Could not connect: Access denied for user 'jamfsoftware'@'localhost' (using password: YES) - An error occurred while connecting to the database. Verify the username, password, and database name, then try again
Please verify the following items:
MySQL is running on localhost
MySQL is accepting network connections
The user jamfsoftware@localhost has been granted privileges to the jamfsoftware database
I am running the JSS and SQL server on the same Windows server, and I have verified that Tomcat and MySQL services are running. Unfortunately I cannot get access to the MySQL command prompt as I do not know the root password.
Any help would be appreciated.
Thanks!
Posted on 03-05-2017 02:18 PM
Hi @ctktech, can you advise the exact JSS version you installed? eg 9.9X.XXXXXXXX and what you were on beforehand?
Cheers,
Pat
Posted on 03-05-2017 02:59 PM
Current Version: 9.97.1488392992
Previous Version: 9.97.1482356336
Previous version worked just fine. The current version is the one that was just released this past weekend.
Posted on 03-05-2017 05:54 PM
Hmm I feared that was the case. I would probably speak with Jamf if you haven't already incase it is a larger issue with the new Hotfix.
Can you logon to the server and start the MySQL cli and confirm the credentials are correct (login with them?) and have access to the jamfsoftware DB?
Seriously though I jump on the phone to Jamf support.
Posted on 03-05-2017 06:18 PM
Yeah, I was afraid of that. I did reach out to my Jamf buddy yesterday morning, so I'm hoping to have him call me tomorrow morning ASAP. Thankfully, the database was backed up before the update took place, so at least the database will be recoverable.
When I login to the server and run the MySQL cli, I am prompted with a password, but unfortunately any password I use doesn't work. I get a "Access denied for user root@localhost" message on the cli (which I'm assuming means I typed in the wrong password).
Posted on 03-05-2017 06:33 PM
:/ Sorry to hear. Do you have a test box that you can run up and install MySQL and restore one of your JSS DB backups to so you can login to that one and confirm that you do actually know the root password? Not that I'm doubting you but I know what these thing can be like especially if someone else was the one to build it initially.
Doesn't have to be anything special, you could even do it with a spare Mac if you have one lying around.
Posted on 03-05-2017 08:20 PM
I've experienced this before, the issue for me was that the database.xml had the wrong permissions and keystore.jks was missing. I had to set the appropriate permissions and restore keystore.jks from the backup folder. This was on Linux though. I would check your database.xml to make sure it's right
Posted on 03-06-2017 05:37 AM
Bookmarking, as I saw the same issue on my Windows server when installing the latest JSS patch. My SQL database is on an external box.
I rolled back and everything is working again.
@ctktech Please post an update of the fix, if you would...
Posted on 03-06-2017 07:52 AM
I saw the same issue this weekend upgrading to 9.97.1488392992. The fix for me was uninstalling the JSS completely via Add/Remove Programs then installing the JSS from scratch. Of course, this required adding my SSL cert, resetting Tomcat memory settings, connection pool settings, etc. Not ideal.
Posted on 03-06-2017 08:49 AM
This thread below...
Posted on 03-06-2017 05:46 PM
So I found out that we had a previous snapshot in place back in July of 2016, so I reverted back to that snapshot (thank goodness for VMWare snapshots), and I upgraded to version 9.97.1482356336, and recovered the database to the most recent version (thankfully it was a snapshot before the botched upgrade). So I have recovered very well.
I would say the easiest option is to recover from a previous snapshot or backup if you are able to, otherwise it does look like you may have to reinstall the whole thing.
Posted on 04-27-2017 09:00 AM
So I am now having the same issue as this but I have not performed any JSS upgrades. In my setup what is happening is that the server on my internal network is fine, but I'm getting the same error trying to let my DMZ server communicate with the internal DB. Everything was fine and then suddenly this? Didn't make any server changes, but network changes could have occurred but nothing I'm aware of.
Posted on 10-31-2019 06:25 AM
I got the same error on my Linux JSS because I forgot to become root before issuing the command:
jamf-pro database backup
I was using JAMF Pro 10.15.1 and just upgraded to 10.16.1 this morning.