Skip to main content
Question

Manual installer upgrades and schema changes

  • July 31, 2016
  • 2 replies
  • 18 views

Forum|alt.badge.img+5

Does anyone know if restarting Tomcat w/ an updated WAR will automatically update the database schema on restart or do you need to access the web interface to kickstart that process?

Unrelated, is there a way to query either through the DB or on the server itself that the JSS is fully loaded/updated and ready to take connections? I'm modeling a way to do unattended upgrades of a cluster and want to make sure the master JSS is all set before spinning up the remaining JSSs.

2 replies

Forum|alt.badge.img+13
  • Contributor
  • July 31, 2016

First thought is to take a look at the API. I bet you could make a single API call that if successful would allow your model to verify the state of the JSS. For example, doing a

GET

for the activation code and just checking for a 200 response from Tomcat. That would tell you that Tomcat is up and is communicating with the database.


Forum|alt.badge.img+22
  • Employee
  • August 1, 2016

The only way a manual upgraded JSS (i.e. ROOT.war placed in webapps folder) would automatically upgrade a database is if you were using the default credentials for database, username and password as listed in the administrators guide or in the install guide. But its generally best practice not to use those in production. One method to get around this is to manually unpack the .war, make the modifications to the DataBase.xml and likely the log4j.properties to have logs wrote to a correct directory (default its trying to write to /Library/JSS/Logs which doesnt exist on linux), repack as a .war and then put it in that location.

As for querying the status of the JSS you can curl agains the HealthCheck page with something similar to

curl -k https://jss.addresss.com:8443/healthCheck.html

If it returns "[ ]" your JSS is up and running correctly. Other states such as database connection error, setup assistant, etc present different errors. You can see all the available status by searching healthCheck within the admin guide.