Windows Service for Jenkins doesn't start automatically

768 views
Skip to first unread message

Masaru Tsuchiyama

unread,
May 1, 2017, 3:30:16 AM5/1/17
to jenkins...@googlegroups.com
Hi

I'm using Jenkins 2.57 with installing Windows Installer.

I can start Windows Service for Jenkins manually.
But it doesn't start automatically.

How do I make it start automatically?

Regards.
Masaru.



jer...@bodycad.com

unread,
May 1, 2017, 9:13:52 AM5/1/17
to Jenkins Users
On my side, the service needed to be Local System to be able to launch properly, which prevent GUI and graphical context to be run inside the service. Since I needed the GUI context for some unit test (OpenGL unit test was problematic), I had to change the service user for a local user. That prevented the jenkins service from booting at startup. 

Sorry I didn't investigate why, since we moved the master from Windows to Linux to avoid those problems. Starting the slave with a simple batch script that connect to the master solved the problems:

LaunchSlave.bat
"c:\Program Files\Java\jdk1.8.0_121\bin\javaws.exe" "http://MyHost/Jenkins/computer/Windows%%2010%%20Node/slave-agent.jnlp"

Put it into the Start Menu Startup folder for a local user and you are done. You can make the Windows slave machine auto login into that user.

I may suggest to put your master into a VM with Linux, that really solve those problems if you need GUI context, if you don't need it, make sure you use the default Local System as Jenkins service user, it should work.

Reply all
Reply to author
Forward
0 new messages