wdtj
wdtj

Reputation: 5955

Running tomcat7 (or just java) as NT AUTHORITY\LocalService

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.

Upvotes: 0

Views: 491

Answers (1)

Saad Surya
Saad Surya

Reputation: 505

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.

Upvotes: 0

Related Questions