I'm setting up a BuildBot worker in a Windows Server 2016 Datacenter Edition VM running on Azure. This is going build our product for Windows, using the Visual Studio C++ compiler.
I've got to the point where the worker is installed and running in an administrative desktop session. It connects to our build master server, and seems to be able to access all of the tools and services it needs to, based on the results of test builds.
I have been working on getting the worker to run as a service. This will make it possible to automatically run the worker as an unprivileged user.
Except... the service doesn't start. When I look in the Event Log I see two errors in 'Windows Logs → System':
Event ID: 7000
The BuildBot service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion.
Event ID: 7009
A timeout was reached (30000 milliseconds) while waiting for the BuildBot service to connect
There are no events from BuildBot itself logged in 'Windows Logs → Application', and these events are logged (and the service is reported as failed) immediately on trying to start it.
Currently, the service is set to run as 'LocalSystem' (I was planning to clamp down on permissions later). As I understand it, 'LocalSystem' is supposed to have access to all local resources, so I don't think that filesystem permissions are likely to be causing this problem.
Are there any commonly-encountered reasons for services to fail like this?
Are there any other logs or diagnostic information that I should be looking at?
What other steps could I take to determine what's causing this failure?
Edit: This issue is reproducible even using the simple test service provided in this Stack Overflow answer.