HOST post publish action not working from portal
search cancel

HOST post publish action not working from portal

book

Article ID: 221198

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

TDM portal version 4.9.1 is being used to issue a host action that consist of calling a CMD file. The purpose of the CMSD is to write a start and  a stop message to a log file before/after calling a powershell script.
The powershell script logs in on a remote machine and starts a BAT file that in turn starts a Javelin procedure.

When executed the CMD file directly form a command window, everything works as expected.
When the portal executes the CMD file (as a POST action), all that is seen is the start message in the log, but nothing is executed on the remote machine.

Each time the CMD is run through the portal a message is seen in the Windows Eventlog under Applications and Services/Microsoft/Windows/Powershell/Operational: 

Error Message = Exception calling ".ctor" with "2" argument(s): "Cannot process argument because the value of argument "userName" is not valid. Change the value of the "userName" argument and run the operation again."
Fully Qualified Error ID = ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand

This seems to come from the remote login in the Powershell, which, works fine in a command window.
It looks like the portal is somehow preventing the correct execution of Powershell.

 

Environment

Release : 4.9.1

Component : CA Test Data Manager - Others

Cause

This issue is happening because when the command is being run directly run from the command window, it runs the powershell process under the logged in user and not under the Service account that is running the TDM Portal Service.

When the HOST action is executed, it runs the powershell process under the Service account.  

Resolution

 

It was found that:

When logged into machine using user credentials and run the powershell, everything is fine.
When logged into machine using the credentials of the service user, the powershell aborts, looks like it cannot find something or is not allowed to
 

This points in the direction of some setting that is different for the service account and needs to be investigated together with the system administrators.