The most common reason of this error is that Tomcat occasionally deleted the XML configuration.
There is a bug in Tomcat 9 which sometimes deletes the XML configuration after the update.
Please check the contents of the folder /var/lib/tomcat9/conf/Catalina/localhost/.
If this folder is empty, you got this case and need to restore the XML configuration.
Get the XML template from this GitHub link (works for Headwind MDM Enterprise as well!).
Replace the variables in this file:
_SQL_* - your SQL access data
_BASE_DIRECTORY_ - the directory where Headwind MDM stores files: /var/lib/tomcat9/work
_PROTOCOL_ = https (or http if you're using plain http, a legacy installation)
_BASE_HOST_, _BASE_DOMAIN_ - your domain
_BASE_PATH_ - path-part of the URL (/hmdm or empty if installed in a root folder)
_INSTALL_FLAG_ - this file is used for first installation only, use /tmp/hmdm_install_flag
Then store the file on the server:
/var/lib/tomcat9/conf/Catalina/localhost/ROOT.xml
(the file name must be ROOT.xml or be the same as the path-part of the URL, for example, hmdm.xml).
Restart Tomcat to apply the changes.
After successful deployment, make a backup of the file to avoid issues in the future:
cp /var/lib/tomcat9/conf/Catalina/localhost/ROOT.xml /var/lib/tomcat9/conf/Catalina/localhost/ROOT.xml~