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

本文涉及的产品
公共DNS(含HTTPDNS解析),每月1000万次HTTP解析
全局流量管理 GTM,标准版 1个月
云解析 DNS,旗舰版 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.


完成啦!


相关实践学习
日志服务之使用Nginx模式采集日志
本文介绍如何通过日志服务控制台创建Nginx模式的Logtail配置快速采集Nginx日志并进行多维度分析。
相关文章
|
4月前
|
网络协议 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
312 3
|
9月前
|
Kubernetes Docker 容器
Job for docker.service failed because the control process exited with error code.
Job for docker.service failed because the control process exited with error code.
319 0
|
9月前
|
关系型数据库 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
206 1
|
9月前
|
Java
failed to solve with frontend dockerfile.v0: failed to create LLB definition: unexpected status code
failed to solve with frontend dockerfile.v0: failed to create LLB definition: unexpected status code
163 0
|
9月前
|
Shell
etcd.service: main process exited, code=exited, status=203/EXEC
etcd.service: main process exited, code=exited, status=203/EXEC
277 1
|
9月前
|
消息中间件
ERROR 65639 --- [Container#0-217] o.s.a.r.l.SimpleMessageListenerContainer Failed to check/redeclare
ERROR 65639 --- [Container#0-217] o.s.a.r.l.SimpleMessageListenerContainer Failed to check/redeclare
135 0
|
网络协议
Job for named.service failed because the control process exited with error code.
Job for named.service failed because the control process exited with error code.
857 0
|
关系型数据库 MySQL Java
解决方案 --Failed to initialize JPA EntityManagerFactory: Unable to create requested service
解决方案 --Failed to initialize JPA EntityManagerFactory: Unable to create requested service
解决方案 --Failed to initialize JPA EntityManagerFactory: Unable to create requested service
|
资源调度
yarn start error Command failed with exit code 1解决
yarn start error Command failed with exit code 1解决
1225 0