Posted on 12-04-2019 02:46 AM
Trying to spin up an on-prem trial and have been receiving the attached database error accessing the JSS portal via browser. 8443, 3306, 8080 ports are open. I've verified MySQL, Tomcat, Java, Jamf CLI tools are all installed and running. I've run through all the troubleshooting presented in the error. I've googled like a mad man, have tried many possible MySQL fixes with no luck. Has anyone seen this before? I ran through mostly manual steps for setting it up including tomcat. Then I ran the Jamfproinstaller.run file which also configures tomcat. Could that cause an issue if tomcat is already configured on the host? Any help is greatly appreciated.
Posted on 12-04-2019 02:17 PM
Hi Bobdole,
I experience the same after upgrading to JSS v 10.17.1 today.
What helped was to do a
jamf-pro server restart
(tells the CLI to restart jamf server application).
It is not fixed though, after restarting the server, or a shutdown and start up the issue appears again.
In my case too all services are active and running as you posted before.
I will open a case tomorrow and see if Jamf may be of help.
If I can get a resolution I will post it here.
BR Thomas
Posted on 12-04-2019 04:22 PM
After many hours of troubleshooting I self resolved this by manually pointing the MySQL database to the jamf database. Connect to MySQL as root and run “use database;” then a server restart. Apparently my MySQL instance was connecting to the wrong database.
Posted on 12-11-2019 08:41 AM
@Bobdole Could you elaborate on that solution? In my case Jamf Pro and the MySQL database are hosted on different servers, so to attempt this same fix, should I look to work with server that's actually hosting the database or should I look to work with the MySQL service running on the server hosting Jamf Pro?
Posted on 12-11-2019 11:06 AM
You can configure the following lines in /usr/local/jss/tomcat/webapps/ROOT/WEB-INF/xml/DataBase.xml to manually point your JSS to a certain DB @TheJazzDisciple @bobdole01
Posted on 12-11-2019 01:43 PM
also check the config / set the config with the jamf commands on the database server
Usage:
jamf-pro database [command]
Available Commands:
backup Back up the database
config Configure database settings
convert-to-innodb Convert database to InnoDB
init Initialize up the database
restart Restart the database service
restore Restore the database from a file
schedules Manage scheduled backups
start Start the database service
status Show the status of the database service
stop Stop the database service
test-connection Test connection to the database
Flags:
-h, --help help for database
Global Flags:
-v, --verbose Additional output where available
Use "jamf-pro database [command] --help" for more information about a command.
Posted on 03-18-2021 12:02 PM
Thanks for the tip @bobdole01! I just upgraded from MySQL 5.7 to 8 and was getting the database connection error. After going into MySQL and selecting the proper database everything worked again. Thank you!
Posted on 03-02-2023 07:20 PM
Try this:
Modify the DataBase.xml file in /usr/local/jss/tomcat/webapps/ROOT/WEB-INF/xml/ on the Tomcat server, replace this line:
<jdbcParameters>?characterEncoding=utf8&useUnicode=true&jdbcCompliantTruncation=false&useServerPrepStmts=true</jdbcParameters>
with this one:
<jdbcParameters>?characterEncoding=utf8&useUnicode=true&jdbcCompliantTruncation=false&useServerPrepStmts=true&usePipelineAuth=false&useBatchMultiSend=false</jdbcParameters>
then restart the tomcat.