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.的问题。

问题:


[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月前
|
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.
50 0
|
22天前
|
Shell
etcd.service: main process exited, code=exited, status=203/EXEC
etcd.service: main process exited, code=exited, status=203/EXEC
22 1
|
网络协议 网络安全 Docker
Docker Swarm 解决报错Error response from daemon: rpc error: code = Unavailable desc = connection error:
本文是博主学习docker swarm遇到的问题记录,希望对大家有所帮助。
1219 0
Docker Swarm 解决报错Error response from daemon: rpc error: code = Unavailable desc = connection error:
|
11月前
|
网络协议
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.
510 0
|
资源调度
yarn start error Command failed with exit code 1解决
yarn start error Command failed with exit code 1解决
872 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
How to resolve ASSERTION_FAILED error when you register the odata service expose
How to resolve ASSERTION_FAILED error when you register the odata service expose
130 0
How to resolve ASSERTION_FAILED error when you register the odata service expose
Starting a Gradle Daemon, 5 busy and 1 incompatible and 1 stopped Daemons could not be reused, use --status for details FAILURE: Build failed with an
执行gradle build出的问题,查看hs_err_pid11064.log日志文件发现,是电脑的RAM不足导致
3969 0
|
Dubbo 应用服务中间件 容器
关于Failed to check the status of the service com.taotao.service.ItemService. No provider available fo
原文:http://www.bubuko.com/infodetail-2250226.html 项目中用dubbo发生:     Failed to check the status of the service com.taotao.service.ItemService. No provider available for the service 原因: Dubbo缺省会在启动时检查依赖的服务是否可用,不可用时会抛出异常,阻止Spring初始化完成,以便上线时,能及早发现问题,默认check=true。
2673 0