Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

OS X 10.11 tftpd no longer loads

After disabling SIP in El Capitan so I could edit the /System/Library/LaunchDaemons/tftpd.plist and enable the TFTP Daemon I tried to launch the daemon but keep getting an error in the system.log file saying the process has died.


tftpd[655]: recfrom: Resource temporarily unavailable

com.apple.pc.launchd[1] (com.apple.tftpd[655]): Service exited with abnormal code: 1


I'm using the standard location /private/tftpboot for where I'll copy files to/from so I would expect this to be fine. Especially since I disabled SIP.

MacBook Pro with Retina display, Apple wireless trackpad firmware: 0x0160

Posted on Oct 22, 2015 11:26 AM

Reply
Question marked as Best reply

Posted on Feb 19, 2016 9:53 AM

May have a solution, but should be confirmed... Contacted Apple Support who tried, but could not provide a clue. <shrug> This may work for you:


Fixed the issue on my system running 10.11.3 by editing the /System/Library/LaunchDaemon/tftpd.plist.


Old tftpd.plist:


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

<key>Disabled</key>

<true/>

<key>InitGroups</key>

<true/>

<key>Label</key>

<string>com.apple.tftpd</string>

<key>ProgramArguments</key>

<array>

<string>/usr/libexec/tftpd</string>

<string>-s</string>

<string>/private/tftpboot</string>

</array>

<key>Sockets</key>

<dict>

<key>Listeners</key>

<dict>

<key>SockServiceName</key>

<string>tftp</string>

<key>SockType</key>

<string>dgram</string>

</dict>

</dict>

<key>inetdCompatibility</key>

<dict>

<key>Wait</key>

<true/>

</dict>

</dict>

</plist>


New tftpd.plist:


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<true/>
<key>InitGroups</key>
<true/>
<key>Label</key>
<string>com.apple.tftpd</string>
<key>ProgramArguments</key>
<array>
<string>/usr/libexec/tftpd</string>
<string>-s</string>
<string>/private/tftpboot</string>
</array>
<key>Sockets</key>
<dict>
<key>Listeners</key>
<dict>
<key>SockFamily</key>

<string>IPv4</string>

<key>SockServiceName</key>
<string>tftp</string>
<key>SockType</key>
<string>dgram</string>
</dict>
</dict>
<key>inetdCompatibility</key>
<dict>
<key>Wait</key>
<true/>
</dict>
</dict>
</plist>


Figured out that the launchd was trying to bind tftptd to an IPv6 UDP socket was probably the problem:


  • Ran lsof to see if the right ports (69/udp) were being bound by launchd, but guessed that as an old service it might not support IPv6.
    sapphire:tftpboot root#lsof -n -i4UDP:69
    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
    launchd 1 root 84u IPv4 0xd34d4a9746fde409 0t0 UDP *:tftp
    launchd 1 root 86u IPv4 0xd34d4a9746fde409 0t0 UDP *:tftp
    sapphire:tftpboot root#lsof -n -i6UDP:69
    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
    launchd 1 root 84u IPv4 0xd34d4a9746fde409 0t0 UDP *:tftp
    launchd 1 root 86u IPv4 0xd34d4a9746fde409 0t0 UDP *:tftp
  • As there was no limit to just IPv4 in the plist, so added to the Listeners dictionary:
    <key>SockFamily</key><string>IPv4</string>
  • Stopped and unloaded tftpd:
    sapphire:tftpboot root#sudo launchctl stop com.apple.tftpd
    sapphire:tftpboot root#
    sudo launchctl unload -F /System/Library/LaunchDaemons/com.apple.syslogd.plist
  • Loaded and started tftpd:sapphire:tftpboot root# sudo launchctl load -F /System/Library/LaunchDaemons/com.apple.syslogd.plist
    sapphire:tftpboot root# sudo launchctl start com.apple.tftpd
That did the trick - either tftpd isn't written to support IPv6 or launchd isn’t handling the IPv6 UDP socket binding correctly. Thus the errors in system.log:

Feb 19 17:19:43 sapphire tftpd[26193]: recvfrom: Resource temporarily unavailable

Feb 19 17:19:43 sapphire com.apple.xpc.launchd[1] (com.apple.tftpd[26193]): Service exited with abnormal code: 1

YMMV

4 replies
Question marked as Best reply

Feb 19, 2016 9:53 AM in response to AKAspuds

May have a solution, but should be confirmed... Contacted Apple Support who tried, but could not provide a clue. <shrug> This may work for you:


Fixed the issue on my system running 10.11.3 by editing the /System/Library/LaunchDaemon/tftpd.plist.


Old tftpd.plist:


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

<key>Disabled</key>

<true/>

<key>InitGroups</key>

<true/>

<key>Label</key>

<string>com.apple.tftpd</string>

<key>ProgramArguments</key>

<array>

<string>/usr/libexec/tftpd</string>

<string>-s</string>

<string>/private/tftpboot</string>

</array>

<key>Sockets</key>

<dict>

<key>Listeners</key>

<dict>

<key>SockServiceName</key>

<string>tftp</string>

<key>SockType</key>

<string>dgram</string>

</dict>

</dict>

<key>inetdCompatibility</key>

<dict>

<key>Wait</key>

<true/>

</dict>

</dict>

</plist>


New tftpd.plist:


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<true/>
<key>InitGroups</key>
<true/>
<key>Label</key>
<string>com.apple.tftpd</string>
<key>ProgramArguments</key>
<array>
<string>/usr/libexec/tftpd</string>
<string>-s</string>
<string>/private/tftpboot</string>
</array>
<key>Sockets</key>
<dict>
<key>Listeners</key>
<dict>
<key>SockFamily</key>

<string>IPv4</string>

<key>SockServiceName</key>
<string>tftp</string>
<key>SockType</key>
<string>dgram</string>
</dict>
</dict>
<key>inetdCompatibility</key>
<dict>
<key>Wait</key>
<true/>
</dict>
</dict>
</plist>


Figured out that the launchd was trying to bind tftptd to an IPv6 UDP socket was probably the problem:


  • Ran lsof to see if the right ports (69/udp) were being bound by launchd, but guessed that as an old service it might not support IPv6.
    sapphire:tftpboot root#lsof -n -i4UDP:69
    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
    launchd 1 root 84u IPv4 0xd34d4a9746fde409 0t0 UDP *:tftp
    launchd 1 root 86u IPv4 0xd34d4a9746fde409 0t0 UDP *:tftp
    sapphire:tftpboot root#lsof -n -i6UDP:69
    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
    launchd 1 root 84u IPv4 0xd34d4a9746fde409 0t0 UDP *:tftp
    launchd 1 root 86u IPv4 0xd34d4a9746fde409 0t0 UDP *:tftp
  • As there was no limit to just IPv4 in the plist, so added to the Listeners dictionary:
    <key>SockFamily</key><string>IPv4</string>
  • Stopped and unloaded tftpd:
    sapphire:tftpboot root#sudo launchctl stop com.apple.tftpd
    sapphire:tftpboot root#
    sudo launchctl unload -F /System/Library/LaunchDaemons/com.apple.syslogd.plist
  • Loaded and started tftpd:sapphire:tftpboot root# sudo launchctl load -F /System/Library/LaunchDaemons/com.apple.syslogd.plist
    sapphire:tftpboot root# sudo launchctl start com.apple.tftpd
That did the trick - either tftpd isn't written to support IPv6 or launchd isn’t handling the IPv6 UDP socket binding correctly. Thus the errors in system.log:

Feb 19 17:19:43 sapphire tftpd[26193]: recvfrom: Resource temporarily unavailable

Feb 19 17:19:43 sapphire com.apple.xpc.launchd[1] (com.apple.tftpd[26193]): Service exited with abnormal code: 1

YMMV

Feb 24, 2016 7:56 AM in response to bill.gertz

Hi


Many thanks for trying here. This did not work for me. What did work for me was :


It is perfectly possible that I could have gotten away without the TFTP Server utility at the link above, but it did help, especially with being able to change the interface over which tftp was being supported.

The key change is the permissions on the directory and files though.

Regards

Nathan

OS X 10.11 tftpd no longer loads

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.