"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:

 1<?xml version="1.0" encoding="UTF-8"?>
 2<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 3<plist version="1.0">
 4<dict>
 5    <key>Label</key>
 6    <string>com.example.watchdog</string>
 7
 8    <key>ProgramArguments</key>
 9    <array>
10        <string>/usr/local/bin/watchdog</string>
11    </array>
12
13    <key>RunAtLoad</key>
14    <true/>
15
16    <key>KeepAlive</key>
17    <true/>
18
19    <key>SessionCreate</key>
20    <true/>
21
22    <key>StandardOutPath</key>
23    <string>/var/log/watchdog.out</string>
24
25    <key>StandardErrorPath</key>
26    <string>/var/log/watchdog.err</string>
27</dict>
28</plist>

Read More...