Just wasted another chunk of time on a Force.com site.
Everything was fine by the time the development work was finished. But when set up for a demo the site just output the “is down for maintenance” page. Now I understand the idea of not exposing internal site problems to customers. But here there was no additional information reported – no debug log entry and no email to the “Site Contact” User – an exceedingly poor design choice. (And yes I did add the automatically created “Site Guest User” to the “Monitored Users” for debug logging.)
So what was it this time? I eventually found the answer in this post Force.com Sites and licensed managed package in LMA. As well as being a managed package, my package has licensing configured. Now I had looked at the normal license UI accessed via “View Installed Packages” and did not see any mention of “Site Guest User” so had made the bad assumption that sites were probably not “license aware”. But it turns out (as detailed reading of the post will tell you) that the UI to associate a license with a “Site Guest User” is well hidden and must be used to allocate a license before the site can use the package.
The fix was quick and it all makes sense. It was just way harder to find than it should have been.