"Life is all about sharing. If we are good at something, pass it on." - Mary Berry

launchctl: Bootstrap failed: 5: Input/output error

2025-09-26

Initial symtoms

We have an internal service that needs to start a boot. The responsible team wrote a simple launchd script, like this:

<?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>Label</key>
    <string>com.example.watchdog</string>

    <key>ProgramArguments</key>
    <array>
        <string>/usr/local/bin/watchdog</string>
    </array>

    <key>RunAtLoad</key>
    <true/>

    <key>KeepAlive</key>
    <true/>

    <key>SessionCreate</key>
    <true/>

    <key>StandardOutPath</key>
    <string>/var/log/watchdog.out</string>

    <key>StandardErrorPath</key>
    <string>/var/log/watchdog.err</string>
</dict>
</plist>

Read More...