DXAGENT service will not start
search cancel

DXAGENT service will not start

book

Article ID: 379417

calendar_today

Updated On:

Products

CA Directory

Issue/Introduction

In this case, customer happens to have a Windows Python installed before installing the Symantec Directory 14.1/sp5.

After a successful installation of Symantec Directory 14.1/SP5, "DxagentService fails to start.DxagentService fails to start." In the Windows Event Viewer and "DxagentService.log":

 

Log Name:      Application
Source:        Python Service
Date:          10/9/2024 7:43:36 AM
Event ID:      14
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      xxxComputerNamexxx
Description:
The description for Event ID 14 from source Python Service cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event: 

ModuleNotFoundError: No module named 'servicemanager'


The specified resource type cannot be found in the image file

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Python Service" />
    <EventID Qualifiers="49152">14</EventID>
    <Level>2</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2024-10-09T13:43:36.634809600Z" />
    <EventRecordID>156490</EventRecordID>
    <Channel>Application</Channel>
    <Computer>infra17.forwardinc.ca</Computer>
    <Security />
  </System>
  <EventData>
    <Data>ModuleNotFoundError: No module named 'servicemanager'
</Data>
  </EventData>
</Event>

 

The application log:

E:\CA\Directory\dxserver\dxagent\dxagent.py:167: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if len(key_value) is not 2:
E:\CA\Directory\dxserver\dxagent\dxagent.py:648: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if ie.errno is 2:
E:\CA\Directory\dxserver\dxagent\dxagent.py:744: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if os_error.errno is not 2:
E:\CA\Directory\dxserver\dxagent\dxagent.py:1020: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if len(tokens) is not 2:
E:\CA\Directory\dxserver\dxagent\dxagent.py:1267: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if ie.errno is 2:
E:\CA\Directory\dxserver\dxagent\dxagent.py:1283: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if oe.errno is 2:
E:\CA\Directory\dxserver\dxagent\dxagent.py:1332: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if self.basedir.find(checkBase) is not 0:
Installing service DxagentService

**** WARNING ****
The executable at "E:\CA\Directory\dxserver\dxagent\python-embed-amd64\Lib\site-packages\win32\PythonService.exe" is being used as a service.

This executable doesn't have pythonXX.dll and/or pywintypesXX.dll in the same
directory, and they can't be found in the System directory. This is likely to
fail when used in the context of a service.

The exact environment needed will depend on which user runs the service and
where Python is installed. If the service fails to run, this will be why.

NOTE: You should consider copying this executable to the directory where these
DLLs live - "E:\CA\Directory\dxserver\dxagent\python-embed-amd64" might be a good place.
****

Service installed

 

 

Environment

Symantec Directory 14.1/SP 5 Windows

Cause

The give-away in this case is the error messages in the log where it stated:

This executable doesn't have pythonXX.dll and/or pywintypesXX.dll in the same
directory, and they can't be found in the System directory. This is likely to
fail when used in the context of a service

This is an indication either the installation was incomplete or there is a conflict of the Python.

Since Python is not installed on a Windows Server by default likely many of the Linux servers these days. The installation of a Symantec Directory on a Windows Server brings in its own copy of Python. As a result, if a Python has been installed before the Symantec Directory, then there will be a chance a conflict can happen.

Resolution

Customers need to be cautious if a separate Python is needed on a Windows server to coexist with a Symantec Directory installation. This is caused by the nature of Windows system environment settings where different software installations share the same "System variables". In this case, the installation of Symantec Directory adds strings similar to "C:\Program Files\CA\Directory\dxserver\bin;C:\Program Files\CA\Directory\dxserver\dxagent\python-embed-amd64" within the System variables "Path". If a Windows Python has been installed before the Symantec Directory, then a searching path to that Python is most likely to appear before the "python-embed-amd64", as a result the attempt to start the dxagent service could actually invoke DLLs of the same names under the separate Python installation and cause the failure.

This can be proven by removing the separate Windows Python path from the system variable "Path", restart the Windows server and see the dxagent service come up correctly.