• 搭建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

  • 相关阅读:
    2019 西安邀请赛 D
    time 库
    字符串处理+格式化输出
    数据类型
    turtle1
    格式问题
    字符串1
    基础操作
    链表去重
    PAT 1093
  • 原文地址:https://www.cnblogs.com/jonathanyue/p/9301140.html
Copyright © 2020-2023  润新知