dns服务器修改521错误,搭建dns服务器时报错error: bind: address already in use

日志:

Jun 24 20:16:49 localhost systemd: Starting Unbound recursive Domain Name Server...Jun 24 20:16:49 localhost unbound-checkconf: unbound-checkconf: no errors in /etc/unbound/unbound.conf

Jun 24 20:16:49 localhost systemd: Started Unbound recursive Domain Name Server.

Jun 24 20:16:49 localhost systemd: Reached target Host and Network Name Lookups.

Jun 24 20:16:49 localhost systemd: Starting Host and Network Name Lookups.

Jun 24 20:16:49 localhost unbound: Jun 24 20:16:49 unbound[2446:0] warning: increased limit(open files) from 1024 to 8266

Jun 24 20:16:49 localhost unbound: Jun 24 20:16:49 unbound[2446:0] error: bind: address already in use

Jun 24 20:16:49 localhost unbound: Jun 24 20:16:49 unbound[2446:0] fatal error: could not open ports

Jun 24 20:16:49 localhost systemd: unbound.service: main process exited, code=exited, status=1/FAILURE

Jun 24 20:16:49 localhost systemd: Unit unbound.service entered failed state.

Jun 24 20:16:49 localhost systemd: unbound.service failed.

Jun 24 20:16:50 localhost systemd-logind: Removed session c1.

Jun 24 20:16:50 localhost systemd: Removed slice User Slice of gdm.

Jun 24 20:16:50 localhost systemd: Stopping User Slice of gdm.

Jun 24 20:16:53 localhost systemd: Started The Apache HTTP Server.

Jun 24 20:16:53 localhost systemd: Reached target Multi-User System.

Jun 24 20:16:53 localhost systemd: Starting Multi-User System.

Jun 24 20:16:53 localhost systemd: Reached target Graphical Interface.

Jun 24 20:16:53 localhost systemd: Starting Graphical Interface.

Jun 24 20:16:53 localhost systemd: Starting Update UTMP about System Runlevel Changes...

Jun 24 20:16:53 localhost systemd: Started Update UTMP about System Runlevel Changes.

Jun 24 20:16:53 localhost systemd: Startup finished in 607ms (kernel) + 1.405s (initrd) + 53.140s (userspace) = 55.154s.

[root@localhost ~]# systemctl status unbound

● unbound.service - Unbound recursive Domain Name Server

Loaded: loaded (/usr/lib/systemd/system/unbound.service; disabled; vendor preset: disabled)

Active: failed (Result: exit-code) since Sun 2018-06-24 20:16:49 CST; 1min 4s ago

Process: 2446 ExecStart=/usr/sbin/unbound -d $UNBOUND_OPTIONS (code=exited, status=1/FAILURE)

Process: 2442 ExecStartPre=/usr/sbin/unbound-anchor -a /var/lib/unbound/root.key -c /etc/unbound/icannbundle.pem (code=exited, status=0/SUCCESS)

Process: 2441 ExecStartPre=/usr/sbin/unbound-checkconf (code=exited, status=0/SUCCESS)

Main PID: 2446 (code=exited, status=1/FAILURE)

解决:

# netstat -ntulp |grep 53

tcp        0      0 192.168.122.1:53        0.0.0.0:*               LISTEN      1481/dnsmasq

udp        0      0 192.168.122.1:53        0.0.0.0:*                           1481/dnsmasq

udp        0      0 0.0.0.0:5353            0.0.0.0:*                           778/avahi-daemon: r

[root@localhost ~]#kill -9 1481

[root@localhost ~]# netstat -ntulp |grep 53

udp        0      0 0.0.0.0:5353            0.0.0.0:*                           778/avahi-daemon: r

[root@localhost ~]# systemctl restart unbound

[root@localhost ~]# systemctl status unbound

● unbound.service - Unbound recursive Domain Name Server

Loaded: loaded (/usr/lib/systemd/system/unbound.service; disabled; vendor preset: disabled)

Active: active (running) since Sun 2018-06-24 20:25:54 CST; 5s ago

Process: 2756 ExecStartPre=/usr/sbin/unbound-anchor -a /var/lib/unbound/root.key -c /etc/unbound/icannbundle.pem (code=exited, status=0/SUCCESS)

Process: 2755 ExecStartPre=/usr/sbin/unbound-checkconf (code=exited, status=0/SUCCESS)

Main PID: 2759 (unbound)

CGroup: /system.slice/unbound.service

└─2759 /usr/sbin/unbound -d

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值