Java Based agent fails to start: Error: Unable to open WinSta0
search cancel

Java Based agent fails to start: Error: Unable to open WinSta0

book

Article ID: 452538

calendar_today

Updated On:

Products

Automic Automation

Issue/Introduction

Automic Service Manager fails to start database agents (such as DBSERVICE, SQL_WIN, or ORACLE).

Error message in the Service Managers' trace file  with tcp/ip=9:

U00022005 ... with command line 'C:\Program Files\Java\jdk-####\bin\java ...'U00022081 Process '0' started in Console. WindowStation=Service-####\Default No desktop interaction detected Unable to open WinSta0: Access is denied. Unable to delete permissions from station: The handle is invalid.

 

Additional Information: The Java Based agent is started with a different user than the user that starts the Service Manager. 

 

Environment

  • Product: Service Manager version 24.x, Java Based agent(DB Service, SQL, etc...) version 24.x 
  • OS: Windows

Cause

When an agent has an explicit account set under Log On As in the Service Manager properties, the Service Manager must create a new, isolated logon session for that account. It then attempts to grant that account access to a freshly created window station.

Performing this grant requires the Service Manager's own service account (configured in the Windows services.msc properties for the Automic Service Manager) to hold the WRITE_DAC permission on the window station object.

LocalSystem and local Administrators possess this right by default. A standard, least-privilege domain service account does not, leading to the "Access is denied" error when Service Manager tries to adapt permissions for the agent process.

Resolution

Please make sure that the user used to start the Service Manager belongs to the Administrators group on Windows.