说明:刚刚使用systemctl start firewalld命令开启防火墙的时候,却开不成功,出现Failed to start firewalld.service: Unit is masked的错误,经过搜索下后,发现是firewalld服务被锁定了,这里说下方法。

 

方法

执行命令,即可实现取消firewalld的锁定

systemctl unmask firewalld

解锁后,就可以再开启firewalld防火墙了。

再需要锁定firewalld时执行命令

systemctl mask firewalld

工具/原料

 
  • 阿里云服务器centos

方法/步骤

 
  1.  

    执行firewall-cmd --permanent --zone=public --add-port=3306/tcp,提示FirewallD is not running,如下图所示。

  2.  

    通过systemctl status firewalld查看firewalld状态,发现当前是dead状态,即防火墙未开启。

  3.  

    通过systemctl start firewalld开启防火墙,没有任何提示即开启成功。

  4.  

    再次通过systemctl status firewalld查看firewalld状态,显示running即已开启了。

  5. 5

    如果要关闭防火墙设置,可能通过systemctl stop firewalld这条指令来关闭该功能。

  6. 6

    再次执行执行firewall-cmd --permanent --zone=public --add-port=3306/tcp,提示success,表示设置成功,这样就可以继续后面的设置了。

    END
 

CentOS 7出现Failed to start firewalld.service: Unit is masked的解决办法和firewalld 防火墙开关的更多相关文章

  1. centos7 Failed to start firewalld.service: Unit is masked.

    centos7 启动防火墙失败:Failed to start firewalld.service: Unit is masked.   ---- 刚yum安装了iptables 解决: 执行”sys ...

  2. 执行 systemctl start firewalld 命令后出现Failed to start firewalld.service: Unit is masked

    firewalld服务被锁定,不能添加对应端口 执行命令,即可实现取消服务的锁定 # systemctl unmask firewalld 下次需要锁定该服务时执行 # systemctl mask ...

  3. CentOS 7 防火墙 出现Failed to start iptables.service: Unit iptables.service failed to load

    错误信息如下: [root]# service iptables start Redirecting to /bin/systemctl start iptables.service Failed t ...

  4. [ISSUE] [Centos] Centos Start Nginx Show: Failed to start nginx.service:unit not found

    CMD Line:systemctl start nginx.serviceFailed to start nginx.service: Unit not found. Solution: 1.vim ...

  5. Failed to stop iptables.service: Unit iptables.service not loaded.解决方法

    CentOS7中执行 service iptables start/stop 会报错Failed to start iptables.service: Unit iptables.service fa ...

  6. Failed to stop iptables.service: Unit iptables.service not loaded.

    redhat 7 [root@lk0 ~]# service iptables stop Redirecting to /bin/systemctl stop iptables.service Fai ...

  7. centOS7中启动MySQL数据库提示: Failed to start mysqld.service: Unit not foundc

    现象: 在centOS7中启动MySQL数据库提示: Failed to start mysqld.service: Unit not found [明明已经安装了,为什么提示不存在呢?] 原因: 在 ...

  8. centos7安装MariaDB以及Failed to start mariadb.service: Unit not found的错误解决

    centos7下yum安装MariaDB CentOS 7下mysql下替换成MariaDB了.MariaDB数据库管理系统是MySQL的一个分支,主要由开源社区在维护,采用GPL授权 许可 Mari ...

  9. Failed to start mongod.service: Unit not found

    其实自己用惯的是MYSQL,然后项目最后一步完善数据读写的部分,本来打算用mysql的,然而在centOS系统上发现安装总是出问题,后来查找一下资料,发现centOS系统上一般用的是Mariadb,这 ...

随机推荐

  1. uml系列(七)——互动图

    互动图uml描述如何对象的描述在系统交互动作 . 废话不多说,还是来张图: 概念          交互图,主要描写叙述的是系统中的一组对象的消息的传递的.为对象间的交互定义了一个可视的表示方法. 构 ...

  2. 在wpf datagrid中,想要根据一个条件来改变datagrid行的背景颜色

    原文:在wpf datagrid中,想要根据一个条件来改变datagrid行的背景颜色 在wpf datagrid中,想要根据一个条件来改变datagrid行的背景颜色 例如根据学生的年龄来修改,年龄 ...

  3. memmove、memccpy和memcpy

    这三个函数都是内存拷贝,目的都是将N个字节的源内存地址的内容拷贝到目标内存地址中.        void *memmove(void *dest,void*src,int count)      v ...

  4. Something write in FSE 2014

    Now, I find a problem, I have become my personal CSDN into a personal electronic diary. Actually, th ...

  5. 【shell】分享高通平台刷版本简单的一个shell脚本

    #!/bin/shadb wait-for-deviceadb reboot bootloaderecho "start download"wait 5sudo fastboot ...

  6. asp.net文件流下载的代码摘要

    try { var workbook = new XLWorkbook(); if (Workbook != null) { workbook = Workbook; } if (this.Expor ...

  7. SQL Server 2017 SELECT…INTO 创建的新表指定到文件组

    原文:SQL Server 2017 SELECT-INTO 创建的新表指定到文件组 SELECT-INTO 在 SQL Server 中也是常见的一个功能,过去用此方法创建的新表只能存储到默认的文件 ...

  8. “重定向次数过多”或者“Too many automatic redirections were attempted”的错误:

    C# 代码 C# code? 1 2 3 4 5 6 7 8 9 String url="http://www.google.com.hk/search?hl=zh-CN&q=孟宪会 ...

  9. 什么是TOML?

    配置文件的使用由来已久,从.ini.XML.JSON.YAML再到TOML,语言的表达能力越来越强,同时书写便捷性也在不断提升. TOML是前GitHub CEO, Tom Preston-Werne ...

  10. 零元学Expression Blend 4 - Chapter 23 Deep Zoom Composer与Deep Zoom功能

    原文:零元学Expression Blend 4 - Chapter 23 Deep Zoom Composer与Deep Zoom功能 最近有机会在工作上用到Deep Zoom这个功能,我就顺便介绍 ...