No database connection (Fresh JSS Install on RHEL 7 headless)

Bobdole
New Contributor

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.

64d34d4b865149aba792f7820c8ea3cb

6 REPLIES 6

thomas_moser
New Contributor III

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

bobdole01
New Contributor III

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.

Lady_SilkBlues
New Contributor

@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?

Dr_Jones
New Contributor III

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

  1. <DataBaseName>db name</DataBaseName>
  2. <DataBaseUser>db user</DataBaseUser>
  3. <DataBasePassword>db user password</DataBasePassword>
  4. <ServerName>IP or DNS</ServerName>
  5. <ServerPort>your port</ServerPort>

Hugonaut
Valued Contributor

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.
________________
Looking for a Jamf Managed Service Provider? Look no further than Rocketman

dbrisser
New Contributor II

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!