AutoSys Workload Automation

 View Only
Expand all | Collapse all

is this right?

  • 1.  is this right?

    Posted Jan 22, 2020 10:35 AM
    I'm trying to make an agent run a windows job, I want it to execute a batch file or a ps file but so far it doesn't work. All I want is to open an app, im testing with opening Word, I don't know if I lack something or if I should put something in the job, right now is as follows

    Application Name 01_PRUEBA_RUBEN
    Generation Number 67
    Job Name 1313262448_HEBER_WORDBAT
    State EXEC
    Job ID 7580
    Job Type NT
    Conditions Overdue
    Status Executing at MXVMW10CO0089. Overdue due to late completion.
    Start Time Wed 22 Jan 2020 09:31:35 CST
    Agent Name MXVMW10CO0089
    Member of subApplication PRECIOS_PMM
    Overdue if execution time exceeds (in minutes) 25
    Resource dependencies (REC_INFORMATICA,1)
    Submission Count 2
    Job ancestor wait LAST
    Command to run D:\word.bat
    Interactive job Yes


    I don't know if for example the job type is the correct one or where or how to change it, when I execute the job the result I get is 

    C:\Windows\SYSTEM32>start /wait /d"C:\Program Files\Microsoft Office\root\Office16\" winword.exe
    ---------------- The end of the file ----------------

    I hope someone could help me please 

    Greetings



  • 2.  RE: is this right?

    Broadcom Employee
    Posted Jan 22, 2020 11:00 AM
    Hi Heber, 
    The job looks correct to me. Instead of trying to open Word. In the .bat file try something simple like a DIR command. 
    The problem with Word is that it may open on the server but you may not see it and it won't end unless someone clicks on the X in the top right corner. 

    I have asked to open a case to get this resolved. I have also given you my phone number.   I think we could get this resolved in a few minutes.  

    If you have any questions respond here or give me a call.

    Don Powell 
    Broadcom Technical Support  Engineer | CA Technologies Products

    5465 Legacy Drive Suite 700 | Plano, TX 75024-3106 
    Office: Contact 1-800-225-5224 enter 2 & 2 then case number | Donald.Powell@broadcom.com

    For More information, search the available resources 
    ESP Community     ESP Enhancements     ESP Knowledge Docs     ESP Tuesday Tips

        






  • 3.  RE: is this right?

    Posted Jan 22, 2020 11:08 AM
    Hello Don, I can't open a ticket because I get asked info I don't know, I'm a consultant in a enterprise where they use this software and Im a SDET and the scripts I made they want to execute them through cmd, the server as you mention is a Virtual Machine I have access to, and it doesn't do anything, I've tried with something simple like a ipconfig or hostname and it works so I don't know what could be wrong with this :(


  • 4.  RE: is this right?
    Best Answer

    Broadcom Employee
    Posted Jan 22, 2020 11:21 AM
    Hi Heber, 
    So you are able to run jobs.  This means that the agent is working correctly. 
    Why would you need to open Word?  
    Depending on how the Windows server is set up and what userid is being used to run and sign into the server it may or may not be visible to you.  You could look in the task manager for the "word" application. 
    By default processes run in the background. 

    If you have any questions respond here or give me a call.

    Don Powell 
    Broadcom Technical Support  Engineer | CA Technologies Products

    5465 Legacy Drive Suite 700 | Plano, TX 75024-3106 
    Office: Contact 1-800-225-5224 enter 2 & 2 then case number | Donald.Powell@broadcom.com

    For More information, search the available resources 
    ESP Community     ESP Enhancements     ESP Knowledge Docs     ESP Tuesday Tips

        






  • 5.  RE: is this right?

    Posted Jan 22, 2020 11:29 AM
    my God! it does indeed run it in the background I just close everything and ran it again and it appeared in the task manager but it doesn't open it (visibly) how can I do this do you have any idea?, the opening of word is just a test, what I want is to open the internal tool they use for the scripts and send the id of the script to run with some other parameters  something like start /wait /d"C:\turing\" turing.exe "12345" "user" "pass" and it should open the browser and do what is supposed to do 





  • 6.  RE: is this right?

    Broadcom Employee
    Posted Jan 22, 2020 12:41 PM
    Issue the command and it will do what it is supposed to do in the background. It is not good to leave a bunch of windows opened up..... 

    If you have any questions respond here or give me a call.

    Don Powell 
    Broadcom Technical Support  Engineer | CA Technologies Products

    5465 Legacy Drive Suite 700 | Plano, TX 75024-3106 
    Office: Contact 1-800-225-5224 enter 2 & 2 then case number | Donald.Powell@broadcom.com

    For More information, search the available resources 
    ESP Community     ESP Enhancements     ESP Knowledge Docs     ESP Tuesday Tips

        






  • 7.  RE: is this right?

    Posted Jan 22, 2020 12:48 PM
    how can I make it NOT run in the background? and show me all that it is doing, in some scripts the tool needs to "see" whats in the screen for it to click it 

    Thank you for your help


  • 8.  RE: is this right?

    Broadcom Employee
    Posted Jan 22, 2020 12:58 PM
    There should be a job attribute to like 'interactive' that can be set. This is required for the agent to execute the job in the foreground.

    ------------------------------
    Broadcom - CA Technologies
    ------------------------------



  • 9.  RE: is this right?

    Posted Jan 22, 2020 01:08 PM
    Hi Daniel, thank you for your response, that checkbox is indeed checked along with this property in the agentparam.txt file oscomponent.interactive=true and it doesn't show it in the foreground :(


  • 10.  RE: is this right?

    Broadcom Employee
    Posted Jan 22, 2020 05:17 PM
    Are the user ID executing the job and the one being used to see if it is running the same? If not, you won't see the window. You would only see the program running in task manager. The oscomponent.interactive=true agent setting does not need to be set if the job is defined as interactive. I'm able to run notepad.exe via a notepad.bat file I created. The oscomponent.interactive setting is not specified...because I don't need all jobs run interactively. As can be seen in the agent's log\receiver.log file, the InteractiveJob keyword is being sent to the agent to force the individual job to run interactively.

    ------------------------------
    Broadcom - CA Technologies
    ------------------------------



  • 11.  RE: is this right?

    Posted Jan 22, 2020 05:30 PM
    Thank you for your response, I feel like the user ID is the thing I am missing, what do I need to set as user ID? is it the windows user? or the user that is assigned to the agent in the windows service?


  • 12.  RE: is this right?

    Broadcom Employee
    Posted Jan 22, 2020 05:52 PM
    Yes. It needs to be the Windows User ID. If you're able to see the process running in the Windows Task Manager, you can see the user ID that was used to launch the application on the Details tab.

    ------------------------------
    Broadcom - CA Technologies
    ------------------------------



  • 13.  RE: is this right?

    Posted Jan 22, 2020 06:09 PM
    wel.. I put the one it has the machine im working on, and before, it was working, now I just get SUBERROR, do yo have any idea on what it could be the error?


  • 14.  RE: is this right?

    Broadcom Employee
    Posted Jan 22, 2020 06:38 PM
    If you look in the agent log/transmitter.log file, you will see the message that is sent to the agent. The messages will contain 'State SUBERROR' text along with the 'Status()' string which contains the reason for the error.

    ------------------------------
    Broadcom - CA Technologies
    ------------------------------



  • 15.  RE: is this right?

    Posted Jan 23, 2020 11:38 AM

    I have put the user ID and defined it in the topology as you mentioned, and this is what I got, the user I defined is eva which is the Windows user, I don't kno if I should have defined the MXVM10CO0089 which is the name of the Virtual Machine


    01/23/2020 10:27:16.965 CST-0600 5 TCP/IP Controller Plugin.Transmitter pool thread <Regular:1>.CybTargetHandlerChannel.call[:687] - Attempting to send: 20200123 10271696+0600 CENTRAL_MANAGER MXVMW10CO0089 1313262448_HEBER_WORD/01_PRUEBA_RUBEN.71/MAIN STATE SUBERROR Failed SetEnd Status(Invalid AFM) Plugin(runner) User(MXVMW10CO0089) Host(MXVMW10CO0089)
    01/23/2020 10:27:16.966 CST-0600 5 TCP/IP Controller Plugin.Transmitter pool thread <Regular:1>.CybTargetHandlerChannelLogHelper.logConnectionAttempt[:75] - Attempting to open conversation to CENTRAL_MANAGER@SCA2011145:7507 using plain socket
    01/23/2020 10:27:16.970 CST-0600 5 TCP/IP Controller Plugin.Transmitter pool thread <Regular:1>.CybTargetHandlerChannelLogHelper.logConnectionInfo[:109] - Opened conversation to CENTRAL_MANAGER@SCA2011145:7507 with partner at 192.168.91.145:7507 with timeout of 10000 from 110.152.14.44:49701
    01/23/2020 10:27:17.058 CST-0600 2 TCP/IP Controller Plugin.Transmitter pool thread <Regular:1>.CybTargetHandlerChannel.call[:721] - Message has been sent: 20200123 10271696+0600 CENTRAL_MANAGER MXVMW10CO0089 1313262448_HEBER_WORD/01_PRUEBA_RUBEN.71/MAIN STATE SUBERROR Failed SetEnd Status(Invalid AFM) Plugin(runner) User(MXVMW10CO0089) Host(MXVMW10CO0089)
    01/23/2020 10:27:17.059 CST-0600 5 TCP/IP Controller Plugin.Transmitter pool thread <Regular:1>.CybTargetHandlerChannelLogHelper.logConnectionClose[:133] - Conversation with CENTRAL_MANAGER closed
    01/23/2020 10:27:17.454 CST-0600 5 TCP/IP Controller Plugin.Transmitter pool thread <Regular:2>.CybTargetHandlerChannel.call[:687] - Attempting to send: 20200123 10271745+0600 CENTRAL_MANAGER MXVMW10CO0089 1313262448_HEBER_WORDBAT/01_PRUEBA_RUBEN.71/MAIN State SUBERROR Failed SetEnd Status("Unable to locate interactive logon session") Cmpc(20013) JobLogId(791BCC48BC4F51787FF7399A654CD650F929C107) User(MXVMW10CO0089) Host(MXVMW10CO0089)
    01/23/2020 10:27:17.454 CST-0600 5 TCP/IP Controller Plugin.Transmitter pool thread <Regular:2>.CybTargetHandlerChannelLogHelper.logConnectionAttempt[:75] - Attempting to open conversation to CENTRAL_MANAGER@SCA2011145:7507 using plain socket
    01/23/2020 10:27:17.457 CST-0600 5 TCP/IP Controller Plugin.Transmitter pool thread <Regular:2>.CybTargetHandlerChannelLogHelper.logConnectionInfo[:109] - Opened conversation to CENTRAL_MANAGER@SCA2011145:7507 with partner at 192.168.91.145:7507 with timeout of 10000 from 110.152.14.44:49703




  • 16.  RE: is this right?

    Broadcom Employee
    Posted Jan 22, 2020 07:03 PM
    If you put the User ID in the job, you need to define the user in the Topology. Make sure you define the User ID/password as an Agent user in the Topology in Admin view and save it. See the link for details.


  • 17.  RE: is this right?

    Posted Jan 23, 2020 11:37 AM

    I have put the user ID and defined it in the topology as you mentioned, and this is what I got, the user I defined is eva which is the Windows user, I don't kno if I should have defined the MXVM10CO0089 which is the name of the Virtual Machine


    01/23/2020 10:27:16.965 CST-0600 5 TCP/IP Controller Plugin.Transmitter pool thread <Regular:1>.CybTargetHandlerChannel.call[:687] - Attempting to send: 20200123 10271696+0600 CENTRAL_MANAGER MXVMW10CO0089 1313262448_HEBER_WORD/01_PRUEBA_RUBEN.71/MAIN STATE SUBERROR Failed SetEnd Status(Invalid AFM) Plugin(runner) User(MXVMW10CO0089) Host(MXVMW10CO0089)
    01/23/2020 10:27:16.966 CST-0600 5 TCP/IP Controller Plugin.Transmitter pool thread <Regular:1>.CybTargetHandlerChannelLogHelper.logConnectionAttempt[:75] - Attempting to open conversation to CENTRAL_MANAGER@SCA2011145:7507 using plain socket
    01/23/2020 10:27:16.970 CST-0600 5 TCP/IP Controller Plugin.Transmitter pool thread <Regular:1>.CybTargetHandlerChannelLogHelper.logConnectionInfo[:109] - Opened conversation to CENTRAL_MANAGER@SCA2011145:7507 with partner at 192.168.91.145:7507 with timeout of 10000 from 110.152.14.44:49701
    01/23/2020 10:27:17.058 CST-0600 2 TCP/IP Controller Plugin.Transmitter pool thread <Regular:1>.CybTargetHandlerChannel.call[:721] - Message has been sent: 20200123 10271696+0600 CENTRAL_MANAGER MXVMW10CO0089 1313262448_HEBER_WORD/01_PRUEBA_RUBEN.71/MAIN STATE SUBERROR Failed SetEnd Status(Invalid AFM) Plugin(runner) User(MXVMW10CO0089) Host(MXVMW10CO0089)
    01/23/2020 10:27:17.059 CST-0600 5 TCP/IP Controller Plugin.Transmitter pool thread <Regular:1>.CybTargetHandlerChannelLogHelper.logConnectionClose[:133] - Conversation with CENTRAL_MANAGER closed
    01/23/2020 10:27:17.454 CST-0600 5 TCP/IP Controller Plugin.Transmitter pool thread <Regular:2>.CybTargetHandlerChannel.call[:687] - Attempting to send: 20200123 10271745+0600 CENTRAL_MANAGER MXVMW10CO0089 1313262448_HEBER_WORDBAT/01_PRUEBA_RUBEN.71/MAIN State SUBERROR Failed SetEnd Status("Unable to locate interactive logon session") Cmpc(20013) JobLogId(791BCC48BC4F51787FF7399A654CD650F929C107) User(MXVMW10CO0089) Host(MXVMW10CO0089)
    01/23/2020 10:27:17.454 CST-0600 5 TCP/IP Controller Plugin.Transmitter pool thread <Regular:2>.CybTargetHandlerChannelLogHelper.logConnectionAttempt[:75] - Attempting to open conversation to CENTRAL_MANAGER@SCA2011145:7507 using plain socket
    01/23/2020 10:27:17.457 CST-0600 5 TCP/IP Controller Plugin.Transmitter pool thread <Regular:2>.CybTargetHandlerChannelLogHelper.logConnectionInfo[:109] - Opened conversation to CENTRAL_MANAGER@SCA2011145:7507 with partner at 192.168.91.145:7507 with timeout of 10000 from 110.152.14.44:49703




  • 18.  RE: is this right?

    Posted Jan 23, 2020 12:58 PM
    Now I have this error "CreateProcessAsUser failed due to A required privilege is not held by the client" what is this about? I found something about adding the user to some setting in local policies and restarted and still getting it :( please help, this is so frustrating


  • 19.  RE: is this right?

    Broadcom Employee
    Posted Jan 23, 2020 04:58 PM
    This is the current error message Heber is facing...

    I am signed into the server with the user and clicked the .bat file, I defined the user in the dSeries

    At the moment of running the job its as follows

    And the error I get is

    CreateProcessAsUser failed due to A required privilege is not held by the client.

     

    What could be wrong?




  • 20.  RE: is this right?

    Broadcom Employee
    Posted Jan 24, 2020 08:46 AM
    Is the agent running as a service under local system account? I am able to run the winword.exe in .bat file and opened the app in interactive mode. See suggestions in KB and Community on the error;
    https://ca-broadcom.wolkenservicedesk.com/external/article?articleId=95744
    https://community.broadcom.com/communities/community-home/digestviewer/viewthread?MID=718131#bmdc959d53-4980-4103-82ca-df55f0615924

    Hope it helps.


  • 21.  RE: is this right?

    Posted Jan 24, 2020 09:19 AM
    yes it is, I don't know if it should be like this 
    https://imgur.com/8TIz4PL
    I can't paste images in here so I had to do it with Imgur I hope it's ok
    Thank you for the help


  • 22.  RE: is this right?

    Posted Jan 26, 2020 02:54 PM
    I've managed to run the agent and the jobs with the user of the machine, but I still don't see the apps visually, could it be the UAC? that's the only thing I miss to check out, but I can't access to the setting because it prompts me credentials I don't have, maybe tomorrow I'll go with the IT personal so they can give me access to that setting


  • 23.  RE: is this right?

    Posted Jan 26, 2020 11:21 PM

    Hi Heber

     

    I did a test on my LAB and it only worked after UAC was disabled !!

     

     

     

    Enjoy IT,

     

    Carlos Jessé D. Jupiá

    Services Consultant - CA Services

    HCL Technologies Ltd.

    Rua Olimpíadas, 205 – 1st Floor – Vila Olímpia – São Paulo/SP - Brazil

    Mob: +55 11 98635-6742

    www.hcltech.com

    www.hcl.in

    Fact_File_d8

    Logo-CA-ServiceEducation Preto (reduzido)

     






  • 24.  RE: is this right?

    Posted Jan 27, 2020 10:33 AM
    Hello Carlos, thank you for the reply, how did you get to that section? to see if I have the same configuration,because all I see is some screen with "Never notify" selected in panel control


  • 25.  RE: is this right?

    Posted Jan 27, 2020 04:08 PM

    Well, this is just and update, I have assigned the user of the machine to the jobs, I no longer have the error of insufficient privileges but I still can't see whatever I am running, visually

    I've assigned some properties  in the local security poliicies,

    Act As A Part Of The Operating System
    Access This Computer From The Network
    Logon As A Service
    Increases Quota
    Logon As A Batch Job
    Log On Locally
    Replace A Process Level Token
    Create a token object
    Create global object
    Impersonate a client after authentication
    Take ownership of files and other objects

    I've turned off UAC and still don't see my job running visually 




  • 26.  RE: is this right?

    Broadcom Employee
    Posted Jan 27, 2020 06:20 PM
    Heber,

    Are you logged on as the same ID used to run the job? For example, if you're logged in as 'administrator' but running the job using another ID, you won't see the window pop up. It will remain in the background because you're not that user.

    ------------------------------
    Broadcom - CA Technologies
    ------------------------------



  • 27.  RE: is this right?

    Posted Jan 27, 2020 11:20 PM
    Edited by Heber Solis Jan 27, 2020 11:23 PM
    Well I have this, in the Job definition I have HEBMTY/eva which is the user corresponding to the one in the machine, I checked this in task manager in details with everytime I open winword app, the user eva is the one doing it, I enable or disable many things in the local policies section just as carlos pointed out earlier, and still can't get to show the execution of the job on screen, I uploaded some images with this for better understanding I hope, thank you all for the help I hope we can get this sorted out I have been struggling with this for the past 2 months :(


  • 28.  RE: is this right?

    Broadcom Employee
    Posted Jan 28, 2020 08:55 AM
    Heber,

    You need to be logged on as the 'eva' user when the job is started in order to see the window in the foreground. If you logon as 'eva' after the job is started I'm not sure the window would show up. If might. I have not tested that. Also, the 'eva' user is the only ID that would be able to see the window. Is this how you are running your test?

    ------------------------------
    Broadcom - CA Technologies
    ------------------------------



  • 29.  RE: is this right?

    Posted Jan 28, 2020 09:02 AM
    Hello, Yes im logged in at all times as Eva, Thats the only way I can access the machine, in the services.msc the agent has the Eva account assigned


  • 30.  RE: is this right?

    Broadcom Employee
    Posted Jan 28, 2020 09:28 AM
    Please post the log entry in the agent log/receiver.log file that includes the request to run the job. You should be able to scan for 'winword' to locate it.

    ------------------------------
    Broadcom - CA Technologies
    ------------------------------



  • 31.  RE: is this right?

    Posted Jan 28, 2020 09:47 AM
    this is the job and this is what I get in the receiver file

    01/28/2020 08:39:09.032 CST-0600 5 TCP/IP Controller Plugin.Receiver pool thread <Regular:2>.CybReceiverSession.accept[:269] - Message accepted: 20200128 08390905+0600 MXVMW10CO0089 CENTRAL_MANAGER PRUEBA_INTERACTIVE/01_PRUEBA_RUBEN.81/MAIN RUN . Data(Command="D:\Prueba.bat") User(HEBMTY\eva) Password(FDCE17B34FB7BD2964E46CAD8AA4C399) TargetSubsystem(WIN) MFUser(L041409) InteractiveJob
    01/28/2020 08:39:09.036 CST-0600 2 TCP/IP Controller Plugin.Receiver pool thread <Regular:2>.CybReceiverSession.accept[:276] - Message received: 20200128 08390905+0600 MXVMW10CO0089 CENTRAL_MANAGER PRUEBA_INTERACTIVE/01_PRUEBA_RUBEN.81/MAIN RUN . Data(Command="D:\Prueba.bat") User(HEBMTY\eva) Password(FDCE17B34FB7BD2964E46CAD8AA4C399) TargetSubsystem(WIN) MFUser(L041409) InteractiveJob


  • 32.  RE: is this right?

    Broadcom Employee
    Posted Jan 28, 2020 10:36 AM
    The entries look as expected. It's obvious the job is starting and running under the proper ID, eva. Not sure what would be blocking this. It think it has to be something at the OS level. What version of Windows is this running on?

    ------------------------------
    Broadcom - CA Technologies
    ------------------------------



  • 33.  RE: is this right?

    Posted Jan 28, 2020 10:41 AM
    windows 10 Enterprise 2016 LTSB


  • 34.  RE: is this right?

    Posted Jan 28, 2020 10:46 AM
      |   view attached

    Hi Heber

    Attached a step by step that I did .

     

     

    Carlos Jessé D. Jupiá

    Services Consultant - CA Services

    HCL Technologies Ltd.

    Rua Olimpíadas, 205 – 1st Floor – Vila Olímpia – São Paulo/SP - Brazil

    Mob: +55 11 98635-6742

    www.hcltech.com

    www.hcl.in

    Fact_File_d8

    Logo-CA-ServiceEducation Preto (reduzido)

     

    De: Carlos Jupia
    Enviada em: segunda-feira, 27 de janeiro de 2020 01:21
    Para: BROADCOM-workloadautomation1@ConnectedCommunity.org
    Assunto: RES: Workload Automation : is this right?

     

    Hi Heber

     

    I did a test on my LAB and it only worked after UAC was disabled !!

     

     

     

    Enjoy IT,

     

    Carlos Jessé D. Jupiá

    Services Consultant - CA Services

    HCL Technologies Ltd.

    Rua Olimpíadas, 205 – 1st Floor – Vila Olímpia – São Paulo/SP - Brazil

    Mob: +55 11 98635-6742

    www.hcltech.com

    www.hcl.in

    Fact_File_d8

    Logo-CA-ServiceEducation Preto (reduzido)

     




    Attachment(s)

    pdf
    SAMPLE APPL.pdf   308 KB 1 version


  • 35.  RE: is this right?

    Posted Jan 28, 2020 11:33 AM
    Hi Carlos, Thank you, I have it exactly like that and it's not showing anything, the only thing that I was missing is the agent in the application in "Agent/Advanced Integration" but I already assigned the agent, and still had no luck :/


  • 36.  RE: is this right?

    Posted Jan 28, 2020 11:46 AM

    Heber

    Please , Can you export the application and sent to me  ?

    And tell me informations about your environment ?

    CA WA DE VERSION ?

    Operating System  where CA WA DE was installed ?

    Operating System that you try exec winword in foreground ?

    Thx

     

     

    Carlos Jessé D. Jupiá

    Services Consultant - CA Services

    HCL Technologies Ltd.

    Rua Olimpíadas, 205 – 1st Floor – Vila Olímpia – São Paulo/SP - Brazil

    Mob: +55 11 98635-6742

    www.hcltech.com

    www.hcl.in

    Fact_File_d8

    Logo-CA-ServiceEducation Preto (reduzido)

     






  • 37.  RE: is this right?

    Posted Jan 28, 2020 12:02 PM
    yeah sure, I'll reply you privately, thank you