AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 617205
Accepted
mahmood
mahmood
Asked: 2014-08-02 05:43:58 +0800 CST2014-08-02 05:43:58 +0800 CST 2014-08-02 05:43:58 +0800 CST

dnsmasq:未能创建监听套接字:地址已在使用中

  • 772

操作系统是 Scientific Linux 6.3(类似于 redhat、centos 和 fedora),我安装了 dnsmasq,配置如下

interface=eth1
domain=hpclab
expand-hosts
dhcp-range=10.0.2.51,10.0.2.100,static
dhcp-option=42,0.0.0.0
dhcp-boot=pxelinux.0
enable-tftp
tftp-root=/var/lib/tftpboot
dhcp-host=08:00:27:69:73:7A,ws04,10.0.2.51

当前节点(运行 dnsmasq)有这个 ip

eth1  Link encap:Ethernet  HWaddr 08:00:27:A9:20:C0  
      inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
      inet6 addr: fe80::a00:27ff:fea9:20c0/64 Scope:Link
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

但是,尝试启动 dnsmasq 服务时出现错误

[root@localhost mahmood]# /etc/init.d/dnsmasq status
dnsmasq is stopped
[root@localhost mahmood]# /etc/init.d/dnsmasq start
Starting dnsmasq: 
dnsmasq: failed to create listening socket: Address already in use
                                                       [FAILED]

netstat 命令显示以下信息

[root@localhost mahmood]# netstat -anlp | grep -w LISTEN
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      1252/rpcbind        
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      1445/cupsd          
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      1685/master         
tcp        0      0 0.0.0.0:46556               0.0.0.0:*                   LISTEN      1348/rpc.statd      
tcp        0      0 :::111                      :::*                        LISTEN      1252/rpcbind        
tcp        0      0 :::80                       :::*                        LISTEN      4884/httpd          
tcp        0      0 ::1:631                     :::*                        LISTEN      1445/cupsd          
tcp        0      0 :::51096                    :::*                        LISTEN      1348/rpc.statd      

和

[root@localhost mahmood]# netstat -aunp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
udp        0      0 0.0.0.0:69                  0.0.0.0:*                               5110/xinetd         
udp        0      0 0.0.0.0:34136               0.0.0.0:*                               1323/avahi-daemon   
udp        0      0 0.0.0.0:38756               0.0.0.0:*                               1348/rpc.statd      
udp        0      0 0.0.0.0:5353                0.0.0.0:*                               1323/avahi-daemon   
udp        0      0 0.0.0.0:1003                0.0.0.0:*                               1252/rpcbind        
udp        0      0 0.0.0.0:111                 0.0.0.0:*                               1252/rpcbind        
udp        0      0 0.0.0.0:631                 0.0.0.0:*                               1445/cupsd          
udp        0      0 0.0.0.0:676                 0.0.0.0:*                               1348/rpc.statd      
udp        0      0 0.0.0.0:68                  0.0.0.0:*                               5189/dhclient       
udp        0      0 :::1003                     :::*                                    1252/rpcbind        
udp        0      0 :::111                      :::*                                    1252/rpcbind        
udp        0      0 :::43248                    :::*                                    1348/rpc.statd      

什么会导致此类错误,我该如何解决?

networking
  • 1 1 个回答
  • 41045 Views

1 个回答

  • Voted
  1. Best Answer
    Steven Monday
    2014-08-02T06:49:53+08:002014-08-02T06:49:53+08:00

    问题是您已配置dnsmasq为提供 TFTP 服务(通过 中的enable-tftp选项dnsmasq.conf)。TFTP的服务端口是UDP/69,所以dnsmasq想绑定,但是xinetd已经绑定了,两个不同的进程不可能绑定同一个服务端口。

    如果要dnsmasq提供 TFTP 服务,则需要编辑xinetd配置(可能/etc/xinetd.conf)以关闭其 TFTP 服务。或者,如果您希望xinetd提供 TFTP 服务,则需要enable-tftp从dnsmasq.conf.

    • 5

相关问题

  • 谁能指出我的 802.11n 范围扩展器?

  • 我怎样才能得到一个网站的IP地址?

  • 在一个 LAN 中使用两台 DHCP 服务器

  • 如何在 Linux 下监控每个进程的网络 I/O 使用情况?

  • 为本地网络中的名称解析添加自定义 dns 条目

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve