0

We need to start running our Tomcat7 and Java services under the NT_AUTHORITY\LocalService account. Our C services run fine, but the Java and Tomcat services just silently fail.

We install the services under the Local System user, then use SCM to change to LocalService but they won't start.

I've even tried to set up a schedtask as LocalService, but all I seem to get back is error code 4.

Anyone know of any procedures to get more info on the error? Any obvious gotchya on doing this? I tried this on multiple PCs but same issue. Google hasn't reveled anything useful.

wdtj
  • 4,554
  • 3
  • 17
  • 20
  • What do you use for installing services for Java? I can recommend Java Service Wrapperhttp://wrapper.tanukisoftware.com/doc/german/download.jsp – Jan Nov 11 '15 at 20:03
  • We used to use tanuki, but we;ve switched to yajsw. Tomcat, of course, has it's own wrapper. – wdtj Nov 12 '15 at 01:34

1 Answers1

0

I know it's already late, but it may help others.

You might need to check "Event Viewer" for the error. In my case, the user I was trying to log on with, did not have "Log on as a service" rights under Local Policies.

For resolution:

  1. Run secpol.msc.
  2. Navigate to Local Policies --> User Rights Assignment --> Log on as a service.
  3. Add your user to the list.
  4. Restart service.

An article to log on tomcat service with different account than Local System Account.

Saad Surya
  • 507
  • 4
  • 18