Failed to create site config directory and/or Site is not running at activation although site is accessible

"Failed to create site config directory" error and how to resolve.

LAST TESTED ON CHECKMK 2.2.0P1

Table of Contents

Problem

After the Update to 2.0, you may face this issue while trying to activate changes.


Also, you might encounter this error in conjunction:

Solution

Please check the web.log inside the Site directory (~/var/log/web.log). You will receive a message that the hard link cannot be created. 

/omd/sites/mysite/var/check_mk/site_configs/fe/local: b"cp: cannot create hard link 
'/omd/sites/mysite/var/check_mk/site_configs/fe/local/share/check_mk/agents/custom/my_mrpe_plugins/bin/check_http_ntlm' 
to '/omd/sites/mysite/local/share/check_mk/agents/custom/my_mrpe_plugins/bin/check_http_ntlm': Operation not permitted\n"


You might want to add the command to fix it:

root@linux:~# chown <sitename.> /PATH/of/the/hardlink

The Activate Changes should run now without problems.