Job for named.service failed because the control process exited with error code.怎么解决

本文涉及的产品
日志服务 SLS,月写入数据量 50GB 1个月
简介: 本篇内容记录了如何解决Job for named.service failed because the control process exited with error code.的问题。

问题:


[root@localhost ~]#systemctl restart named
Job for named.service failed because the control process exited with error code.


解决方案:


1.看日志,出现什么问题是不是编辑文档的时候出错之类的错误


[root@localhost ~]#"" > /var/log/messages       #先清空日志
 [root@localhost ~]#cat  >/var/log/messages      #查看日志


微信图片_20220507204456.png


可以看出在我们的httpd主配置文件中我们配置的语法出错了,更改后即可成功。


微信图片_20220507204502.png


这种重启服务错误的情况大部分是因为配置文件写错,如果不是查看日志即可知道错在什么地方了!


下面是我做的DNS正反解析实验。


正向解析:


1.安装DNS域名系统


yum -y install bind-chroot
yum -y install bind-utils


2.修改主配置文件


vim /etc/named.conf
listen-on port 53(any)
allow-query(any)


3.编辑区域配置文件


vim /etc/named.rfc1912.zones
zone "caq.com" IN {
type master;
file "caq.com.zone";
allow-update {none;};
};


4.创建正向区域数据库文件


[root@localhost ~]# cd /var/named/
[root@localhost named]# cp -a named.localhost caq.com.zone
[root@localhost named]# vi caq.com.zone
$TTL 1D
caq.com.        IN SOA  caq.com. root.caq.com. (
                                        0       ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
caq.com.        IN NS   ns1.caq.com.
ns1.caq.com. IN A 192.168.10.10
www.caq.com. IN A 192.168.10.10
lwork.caq.com. IN A 192.168.10.10


5.重启服务


systemctl restart named


6.测试


[root@localhost named]# nslookup ns1.caq.com 
Server:         127.0.0.1
Address:        127.0.0.1#53
Name:   ns1.caq.com Address: 192.168.10.10
Address: 192.168.10.10


反向解析


第1步:编辑区域配置文件


[root@localhost named]# vi /etc/named.rfc1912.zones
zone "0.168.192.in-addr.arpa" IN {
        type master;
        file "test.arpa";
};


第2步:编辑数据配置文件


[root@localhost named]# vi test.arpa
$TTL 1D
@       IN SOA  ns1.caq.com. root.caq.com. (
                                        0       ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
        IN      NS      ns1.caq.com.
83      IN PTR  ns1.caq.com.
83      IN PTR  www.caq.com.


第3步:检验解析结果


[root@localhost named]# nslookup
> 192.168.0.83
83.0.168.192.in-addr.arpa       name = www.caq.com.
83.0.168.192.in-addr.arpa       name = ns1.caq.com.


完成啦!


相关实践学习
【涂鸦即艺术】基于云应用开发平台CAP部署AI实时生图绘板
【涂鸦即艺术】基于云应用开发平台CAP部署AI实时生图绘板
相关文章
|
Oracle 关系型数据库 Linux
Virtualbox上安装Linux系统(CentOS7)(图文超详细)
Virtualbox上安装Linux系统(CentOS7)(图文超详细)
4498 1
|
Linux 应用服务中间件 nginx
CentOS7搭建yum源仓库(阿里源)
CentOS7搭建yum源仓库(阿里源)
3997 0
|
缓存 Linux 开发工具
CentOS 7- 配置阿里镜像源
阿里镜像官方地址http://mirrors.aliyun.com/ 1、点击官方提供的相应系统的帮助 :2、查看不同版本的系统操作: 下载源1、安装wget yum install -y wget2、下载CentOS 7的repo文件wget -O /etc/yum.
258377 0
|
安全 网络协议 Linux
yum出现Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile解决方法
yum出现Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile解决方法
3098 3
|
关系型数据库 MySQL 数据库
MySQL 启动 登录报错Job for mysqld.service failed because the control process exited with error code. See
MySQL 启动 登录报错Job for mysqld.service failed because the control process exited with error code. See
2061 1
|
网络协议 Linux
搭建FTP报错:Job for vsftpd.service failed because the control process exited with error code. See
搭建FTP报错:Job for vsftpd.service failed because the control process exited with error code. See
681 3
|
SQL NoSQL 数据处理
深入探索MongoDB的聚合操作
【10月更文挑战第13天】
327 0
|
存储 缓存 网络协议
搭建dns服务常见报错--查看/etc/named.conf没有错误日志信息却显示出错(/etc/named.conf:49: missing ‘;‘ before ‘include‘)及dns介绍
搭建dns服务常见报错--查看/etc/named.conf没有错误日志信息却显示出错(/etc/named.conf:49: missing ‘;‘ before ‘include‘)及dns介绍
675 0
|
Java Maven
构建Springboot项目、实现简单的输出功能、将项目打包成可以执行的JAR包(详细图解过程)
这篇文章详细介绍了构建SpringBoot项目的过程,包括新建工程、选择环境配置、添加依赖、项目结构说明,并演示了如何编写一个简单的Controller控制器实现输出功能,最后讲解了如何使用Maven将项目打包成可执行的JAR包,并提供了运行JAR包的命令和测试效果。
构建Springboot项目、实现简单的输出功能、将项目打包成可以执行的JAR包(详细图解过程)
|
Ubuntu Python
银河麒麟-麒麟软件操作系统 kylin 搭建yum源 ubuntu搭建yum源 yum软件仓库搭建ftp源、python源、硬盘源
银河麒麟-麒麟软件操作系统 kylin 搭建yum源 ubuntu搭建yum源 yum软件仓库搭建ftp源、python源、硬盘源
2200 1
下一篇
开通oss服务