Server Failures Fixed By Spinning My Wheels
I noticed that my web server, this web server, was having failures in running its Tomcat services.
Earlier in the week I had been poking at the root of this website, and some of the pages and stuff that make it run. Much of that is served by a set of JSP scripts served by a Tomcat server connected to this Apache server using AJP. This blog, and a couple other things, are served by PHP; in the case of the blog, in a Docker container leveraging Nginix, so things like this and the static content were unaffected.
Checking the Tomcat logs, there were class version discrepancies, which usually mean that I've made an incompatible JDK selection. Usually this is because I've built a JAR or WAR file on a newer JDK than the one the server is using. In the tinkering I'd been doing, I did update my development machine to use JDK 23, while the server is using either JDK 17 or JDK 21, depending on which app it's running. I had added the latest Tomcat v10 server, and configured my start script to use JDK 21 to run it, but couldn't remember if I did the natural thing of checking to see if everything was working after I did this.
I probably had, because I normally would, but maybe in my retirement I've slipped a little.
Curiously, though, while I had changed the things on my development workstation, I hadn't built or deployed anything with the new JDK. I checked the Tomcat site, thinking maybe their bits weren't JDK 21 compatible, but they are. I changed the script to use the old Tomcat 9 deployment (which it was before I changed it, even though I had installed a previous Tomcat 10 version), with no better success. I changed it back, committing to make it work with Tomcat 10.
Checking the logs more carefully, I noticed that the Tomcat 10 failed also because there were permission problems on the conf, bin, and lib folders. If I started the site as root, it worked fine, but if I started it as the normal process owner, it failed. A quick chmod and that was resolved. Still, the version conflict occurred.
I pondered what JAR files might be in the WARs that run on the site, and considered rebuilding all of that, but that's a daunting thought, too.
I checked my daily archive of the script folder and saw that a few days ago (and probably spanning back to the day I installed Tomcat 9 or JDK 21, whichever was later), the startup script used that combo. Although I had tried it in the early diagnostics, I tried it again. This time it worked.
This week I hope to get some more time to refine the website. It's dated, has some old bits I'd like to remove (like, did you know Dilbert/Scott Adams got "cancelled," so now you need to subscribe on X to see the strip?) and some things I'd like to finish or add. I'll make sure everything works on Tomcat 10 and JDK 23 in the process.