{"id":6644,"date":"2021-07-15T15:19:18","date_gmt":"2021-07-15T09:49:18","guid":{"rendered":"https:\/\/www.skynats.com\/?p=6644"},"modified":"2024-12-11T17:41:39","modified_gmt":"2024-12-11T12:11:39","slug":"error-failed-to-start-firewalld-service-unit-is-masked","status":"publish","type":"post","link":"https:\/\/www.skynats.com\/blog\/error-failed-to-start-firewalld-service-unit-is-masked\/","title":{"rendered":"Error: Failed to start firewalld service: unit is masked"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Firewalld is one of the firewall management tools for Linux and it will control your server&#8217;s incoming and outgoing traffic. Failed to start firewalld.service: unit is masked is a common error that can happen due to masking issues.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On our <a href=\"https:\/\/www.skynats.com\/linux-server-management\/\" target=\"_blank\" rel=\"noreferrer noopener\"><span style=\"color:#08668f\" class=\"has-inline-color\">server management<\/span><\/a> plan, our support team are dealing with similar issues and we will provide support within no time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Some of our clients faced this issue when restarting the firewalld service in their server. When they were tried to restart the firewalld service they got the below error:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/07\/firewalld-failederror.png\" alt=\"\" class=\"wp-image-6645\" width=\"772\" height=\"94\" srcset=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/07\/firewalld-failederror.png 544w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/07\/firewalld-failederror-300x36.png 300w\" sizes=\"(max-width: 772px) 100vw, 772px\" \/><\/figure>\n\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color:#3189af\"><strong><span class=\"has-inline-color has-primary-color\">Cause for this Issue:<\/span><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This firewalld failed issue mainly occurs due to the firewalld service is locked. Another cause of this error is the mask symbolic link is broken.<\/p>\n\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color:#449abf\"><strong><span class=\"has-inline-color has-primary-color\">Solution:<\/span><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We can fix this issue by unlocking or unmasking the firewalld service. In order to unmask the firewalld service, we can use the below command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>systemctl unmask firewalld<\/strong><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"928\" height=\"312\" src=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/07\/firewallderror.png\" alt=\"\" class=\"wp-image-6647\" srcset=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/07\/firewallderror.png 928w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/07\/firewallderror-300x101.png 300w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2021\/07\/firewallderror-768x258.png 768w\" sizes=\"(max-width: 928px) 100vw, 928px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After running this command we can start and enable the firewalld service using the below command,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>systemctl start firewalld\nsystemctl enable firewalld<\/strong><\/code><\/pre>\n\n\n\n<p class=\"has-text-color wp-block-paragraph\" style=\"color:#3aafe1\"><strong><span class=\"has-inline-color has-primary-color\">When mask link is broken:<\/span><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Another main reason for this error is when starting the service the masked link is broken. Then we have to link the mask location once again to resolve this error.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the firewalld service still fails to unmask the service even after running the previous command, then we need to manually mask it first. (The location will change based on Linux OS type)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>ln -s \/etc\/systemd\/system\/firewalld.service \/dev\/null<\/strong><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then again start the firewalld service using this command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>systemctl start firewalld<\/strong><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then check the firewalld status using the below given command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>firewall-cmd -state<\/strong><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you need any assistance in fixing the firewalld failure issue, Our <a href=\"https:\/\/www.skynats.com\/contact-us\/\" target=\"_blank\" rel=\"noreferrer noopener\"><span style=\"color:#03809c\" class=\"has-inline-color\">technical support team<\/span><\/a> will always ready to help you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Firewalld is one of the firewall management tools for Linux and it will control your server&#8217;s incoming and outgoing traffic. Failed to start firewalld.service: unit is masked is a common error that can happen due to masking issues. On our server management plan, our support team are dealing with similar issues and we will provide [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,266,68],"tags":[446],"class_list":["post-6644","post","type-post","status-publish","format-standard","hentry","category-blog","category-firewall","category-server-management","tag-firewalld-issues"],"_links":{"self":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/6644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/comments?post=6644"}],"version-history":[{"count":0,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/6644\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/media?parent=6644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/categories?post=6644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/tags?post=6644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}