Oct 11 2014
_xcsbuildd user preventing logout after running OS X Server
Having given OS X Server a trial-run, I suddenly found that I was encountering all manner of weird system issues:
- From the Apple menu, About This Mac, Restart…, Shutdown…, and Log Out… could be selected, but did nothing;
- Complaints when trying to restart/shutdown or when trying to perform other tasks that another user was logged-in and blocking the action;
- Restarting from the login screen cleared the screen to grey (and still be a usable mouse-cursor) but progressed no further;
- Graphical logins failing after a reboot as if the password was wrong, despite the same password working for SSH access – but only after a warm restart. Cold-booting still allowed login as expected;
- Multiple un-named “Admin” accounts in System Preferences’ Users & Groups pane, one of which could not be removed.
Removing OS X Server (drag the application to trash and manually remove /Library/Preferences/com.apple.server* and /Library/Server) didn’t resolve the issue.
It turns out, though, that the problematic behaviour is due to tools which are a part of Xcode but which are invoked by OS X Server – and the fix is maddeningly simple:
To disable the Xcode Server components with:
sudo xcrun xcscontrol --shutdown # Stops Xcode Server
… in order to shutdown all of _xcsbuildd’s processes and prevent restart from being blocked.
However, if you don’t actually need Xcode Server, then running:
sudo xcrun xcscontrol --reset # Resets Xcode Server, removing all service data and stopping all services
… will totally remove all users, services, and system changes. Running this resolved all of the above problems. If only Apple had mentioned this before OS X Server enabled Xcode Server in the first place…
Russell Quinn
13th October 2014 @ 3:19 am
Yes, I’m seeing all this too — so annoying.
But, I need Xcode Server 🙁
Andreas
29th October 2014 @ 9:10 am
Thanks Stuart, was exactly what I needed!
Dave Webb
15th January 2015 @ 5:28 pm
Thanks Stuart
Given I want git server repositories but don’t need the continuous integration server from Xcode server your command of
sudo xcrun xcscontrol –shutdown
then rebooted
fixed my screen share problem on OSX 10.10.1
accatyyc
14th June 2015 @ 9:01 pm
Thanks for this. This has saved me twice… But the last time I had to look for hours to find it again. Learned by my mistake and favorited it now though!
Zsolt
9th October 2015 @ 12:38 pm
if I want to run the command, I need sudo access, but I don’t know the _xcsbuildd password, and it won’t take my own admin password. I also cannot run easily a terminal window, only by running a ‘New Command…’ from the menu.
I need the CI, but at this point this is just blocking my other plans.