I have a daemon (/Library/LaunchDaemons/...) configured to launch on boot. However, I get the following error:
Nov 17 20:36:24 server.local java[28972]: This user is not allowed access to the window system right now.
Nov 17 20:36:24 server com.apple.launchd[1] (net.java.server): Throttling respawn: Will start in 10 seconds
I have the daemon configured to run under a daemon user account, and the java command uses nodisplay
.
Sometimes, when I start, the server works fine. HOWEVER, sometimes (I can't determine what causes it) the server throws up the preceding error. The error repeats, and only a reboot will solve it.
What would cause this, and how do I prevent it from happening? My guess is that Java is trying to display something, but I have no control over the source code so if it is, I need to prevent it from affecting the launchd system in this way.