无法安装 tftpd-hpa

无法安装 tftpd-hpa

apt-get install dnsmasq pxelinux syslinux-common我正在尝试通过集群控制节点运行,但在安装时不断出现此错误。

Job for tftpd-hpa.service failed because the control process exited with error code.
See "systemctl status tftpd-hpa.service" and "journalctl -xe" for details.
invoke-rc.d: initscript tftpd-hpa, action "start" failed.
● tftpd-hpa.service - LSB: HPA's tftp server
     Loaded: loaded (/etc/init.d/tftpd-hpa; generated)
     Active: failed (Result: exit-code) since Mon 2020-05-18 12:42:03 EDT; 10ms ago
       Docs: man:systemd-sysv-generator(8)
    Process: 15949 ExecStart=/etc/init.d/tftpd-hpa start (code=exited, status=71)

May 18 12:42:02 anthonys-cluster systemd[1]: Starting LSB: HPA's tftp server...
May 18 12:42:02 anthonys-cluster tftpd-hpa[15949]:  * Starting HPA's tftpd in.tftpd
May 18 12:42:03 anthonys-cluster in.tftpd[15975]: cannot bind to local IPv4 socket: Address already in use
May 18 12:42:03 anthonys-cluster systemd[1]: tftpd-hpa.service: Control process exited, code=exited, status=71/OSERR
May 18 12:42:03 anthonys-cluster systemd[1]: tftpd-hpa.service: Failed with result 'exit-code'.
May 18 12:42:03 anthonys-cluster systemd[1]: Failed to start LSB: HPA's tftp server.
dpkg: error processing package tftpd-hpa (--configure):
 installed tftpd-hpa package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 tftpd-hpa
E: Sub-process /usr/bin/dpkg returned an error code (1)

这是输出ifconfig

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:b3:49:90:ad  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

docker_gwbridge: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.18.0.1  netmask 255.255.0.0  broadcast 172.18.255.255
        inet6 fe80::42:a3ff:fe62:49f2  prefixlen 64  scopeid 0x20<link>
        ether 02:42:a3:62:49:f2  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 135  bytes 27926 (27.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp0s25: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.186  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::50a:8d5:b9c1:c8ef  prefixlen 64  scopeid 0x20<link>
        ether b8:ae:ed:7b:8a:fc  txqueuelen 1000  (Ethernet)
        RX packets 433599  bytes 628271274 (628.2 MB)
        RX errors 0  dropped 62  overruns 0  frame 0
        TX packets 55323  bytes 18656592 (18.6 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  memory 0xaa000000-aa020000  

enx8cae4cfd9c9b: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.42.0.1  netmask 255.255.255.0  broadcast 10.42.0.255
        inet6 fe80::3939:f3fa:f9f5:da4  prefixlen 64  scopeid 0x20<link>
        ether 8c:ae:4c:fd:9c:9b  txqueuelen 1000  (Ethernet)
        RX packets 595  bytes 205585 (205.5 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 950  bytes 234026 (234.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enx8cae4cfd9f86: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.42.1.1  netmask 255.255.255.0  broadcast 10.42.1.255
        inet6 fe80::9294:993b:90c8:b630  prefixlen 64  scopeid 0x20<link>
        ether 8c:ae:4c:fd:9f:86  txqueuelen 1000  (Ethernet)
        RX packets 891  bytes 370852 (370.8 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 703  bytes 177021 (177.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 57907  bytes 614653529 (614.6 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 57907  bytes 614653529 (614.6 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

我的总体目标是让集群的节点通过 PXE 启动并连接到位于控制节点上的 docker swarm。现在,我按照此处显示的说明进行操作:https://manski.net/2016/09/pxe-server-on-existing-network-dhcp-proxy-on-ubuntu/。如何解决上面显示的错误?有没有更简单的方法可以做到这一点?

编辑:我在控制节点上使用 Ubuntu Desktop 20.04,所有其他节点都设置为 PXE 启动。

答案1

您是否先安装了另一个 tftp 服务器?错误似乎很明显,有其他东西正在监听 tftp 端口 (69)

in.tftpd[15975]: cannot bind to local IPv4 socket: Address already in use

要查看端口上正在监听的内容,请尝试

ss -lpn | grep :69

针对同一错误的其他一些提示

相关内容