TFT启动报错

TFT启动报错

问题

执行命令service tftpd-hpa restart提示

root@localhost:~# service tftpd-hpa restart
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.

排查

按照提示,执行journalctl -xe命令查看错误信息

root@localhost:~# journalctl -xe
--
-- A start job for unit tftpd-hpa.service has begun execution.
--
-- The job identifier is 1694.
May 05 15:14:08 localhost tftpd-hpa[3007]:  * Starting HPA's tftpd in.tftpd
May 05 15:14:08 localhost in.tftpd[3014]: cannot open IPv6 socket, disable IPv6: Address family not supported by protoc>
May 05 15:14:08 localhost in.tftpd[3014]: Cannot set nonblock flag on socket: Bad file descriptor
May 05 15:14:08 localhost systemd[1]: tftpd-hpa.service: Control process exited, code=exited, status=71/OSERR
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit tftpd-hpa.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 71.
May 05 15:14:08 localhost systemd[1]: tftpd-hpa.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit tftpd-hpa.service has entered the 'failed' state with result 'exit-code'.
May 05 15:14:08 localhost systemd[1]: Failed to start LSB: HPA's tftp server.
-- Subject: A start job for unit tftpd-hpa.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support

其中
在这里插入图片描述
这两行提示cannot open IPv6 socket, disable IPv6: Address family not supported by protoc
笔者之前确实禁用了WSL的ipv6服务

解决

找到原因了,那么指定tftp不使用ipv6服务

  1. 使用vim /etc/default/tftpd-hpa命令打开tftp的默认配置文件
  2. TFTP_OPTIONS参数中添加-4
    # /etc/default/tftpd-hpa
    
    TFTP_USERNAME="tftp"
    TFTP_DIRECTORY="/home/imx6ull/tftp_dir"
    TFTP_ADDRESS=":69"
    TFTP_OPTIONS="-4 -l -c -s"
    
  3. 使用service tftpd-hpa restart命令重新启动tftp
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值