You may wonder about the significance of the title of this post. Tonight I was deploying an update of our application to the production server, and to finish the deployment, I restarted Tomcat and Apache. When I tried to access our Web service, I received the message “No Host matches server name,” followed by the hostname of our Web server. I was very confused, because this clearly looked like a configuration problem. I knew our systems administrator had been working on the configs, and I figured that he broke something and the problem didn’t show up until I restarted.
Having no idea how to fix this problem and not wanting to call my boss or the sysadmin late on a Sunday night, I instead turned to my old pal Google. I entered “No Host matches server name” as my search term (in quotes). Nothing useful was returned. This happens fairly frequently when I’m trying to find out what specific error messages are about.
My hope is that when this problem stings someone else, they won’t go unsatisfied as I have. The problem was actually caused by bad file permissions on the WAR file for my application. I put it in the Tomcat webapps directory, but it wasn’t readable by the Tomcat user, so Tomcat failed to deploy it. Somehow that got turned into the weird message that I received. Anyway, hopefully when someone searches Google for “No Host matches server name,” they’ll see this post at the top of the list and not have to bug their coworkers in the middle of the night, as I did.