Skip to main content

Hi,

 

We have a VM which is being accessed by multiple users, these users have Bot Runner license.

Since they are performing UAT, when bot fails we deploy a fix(by check in) and they test again.

From last 2 days we have observed that if business users run a task, that task goes in Queued status and does not execute, only when we restart the bot agent service then their task picks up.

 

Does any one know why this is happening ? is there a way to avoid it ?

 

does rapid deployment of task to public repository cause this kind of issue ?

 

Please share if you have any leads.

Hi @ishan mahajan​ ,

 

PFB details

 

Cause

Cause 1 - When the Default device for bot runner is part of device pool then we can observe such issue.

 

Cause 2 - Bot agent was unable to download the Jar files and dependencies because the URL referred for download was "HTTP" and Bot agent was registered with "HTTPs"

Resolution/Workaround

Solution 1 for cause 1:

 

1. Check if the device is a part of any device pool

2. Check if the device is set as a single user or multi user

In case if the device is part of the device pool and set as multi-user, make sure the device is not set as the Default device.

default device.JPG

In case if the device is set as the default device, follow the below steps:

Log in with Admin user and delete the device from CR URL. (it will delete the registration. properties file)

Restart the bot agent service

Log in using runner user on the VDI and add the device again and make sure the device is not set to be the default device (In case if the device is set to default on its own)

The setting Control Room UI > Settings > Devices > General > "Set each user's current device as their default device" should be disabled. Reference snippet as below. 

defaultdevice.JPG

Once the device is not set as default, try deploying the bot locally as well as push from CR to runner machine and check the bot should be stuck in Queued.

 

Solution 2 for cause 1:

 

If Solution 1 does not work, try to reset the device using the following API calls. Once the device is reset you should be able to run the task on the device or delete and re-register the device. Run below APIs using Power Shell.

Call this API to get a token that will be used in the rest of the API calls

curl -UseBasicParsing -Method POST -Uri "https://aa-support-test.my.automationanywhere.digital/v1/authenticationquot; -ContentType "application/json" -Body '{"username": "ReplaceWithActualCRUsernameHere","password": "ReplaceWithActualUserPasswordHere"}' | Select-Object -Expand Content

Token is wrapped between (“ ") and starts after (“Token”:), copy and paste the entire token in Notepad, this is the token which will be used on the rest of API calls. Replace the details in underline with your URL, Username(with AAE_Admin rights) and Password.                                             Sample Token details for reference that should be recovered from the API auth response is as below :

{"token":"eyJhbGciOiJSUzUxMiJ9.eyJzdWIiOiIyMSIsImNsaWVudFR5cGUiOiJXRUIiLCJsaWNlbnNlcyI6W10sImFuYWx5dGljc0xpY2Vuc2VzUHVyY2hhc2VkIjp7IkFuYWx5dGljc0NsaWVudCI6dHJ1ZX0sInRlbmFudFV1aWQiOiJmYTlkZjg2ZC0yNmUyLTQ5NjktYTZlMy04NzhkOWQ2OWUyYzAiLCJoeWJyaWRUZW5hbnQiOiIiLCJpYXQiOjE2NDYxMjQ2MjMsImV4cCI6MTY0NjEyNTgyMywiaXNzIjoiQXV0b21hdGlvbkFueXdoZXJlIiwibmFub1RpbWUiOjMxODQ0MjY1OTg1MjAxNH0.gIhO3GFYNGgQZe9GFjquF1pFzgxZi4eLDbHXOO1YgNOTHEG8EUf4229SqXh6J29Apx2HwOLEiCp0imxNKJIAJ-NBUjVG13T5Z5bcCIgB_E8lAwxJ8KWia6H9uxhhr_VcRq41o7PsrPtd-Z2ufIfLoKo_kYZ_WV679abkNCT2qgO8xsHat52bXVBhiyVeY9bRHYHPMZBAj4g-vlKVd2-0eqT6ohP7i0Q0KAgpbB4kZnLtnxafJEpCxvYL0Ltj84g_n4Ieih-ZKVSoDM6kHeYU9kotHRJ8kvdy8gQ8MLZ-Nuvw_yl3ozUFlUonykgun9a-p_o30r0dgoEzJIah45Y_Eg"                                         

Trigger the call for the below API from Powershell by replacing the highlighted values with underline with your CR URL & the response token received from the API call from above Step1.

Invoke-WebRequest -UseBasicParsing -Uri "https://aa-support-test.my.automationanywhere.digital/v2/devices/listquot; `

-Method "POST" `

-Headers @{

"method"="POST"

"authority"="aa-support-test.my.automationanywhere.digital"

"scheme"="https"

"path"="/v2/devices/list"

"sec-ch-ua"="`"Chromium`";v=`"88`", `"Google Chrome`";v=`"88`", `";Not A Brand`";v=`"99`""

"pragma"="no-cache"

"accept-language"="en-US"

"sec-ch-ua-mobile"="?0"

"user-agent"="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36"

"accept"="application/json"

"cache-control"="no-cache"

"x-authorization"="replace this with token retrieved from the previous API call"

"origin"="https://aa-support-test.my.automationanywhere.digitalquot;

"sec-fetch-site"="same-origin"

"sec-fetch-mode"="cors"

"sec-fetch-dest"="empty"

"referer"="https://aa-support-test.my.automationanywhere.digital/quot; 

"accept-encoding"="gzip, deflate, br"

} `

-ContentType "application/json" `

-Body "{`"sort`":q{`"field`":`"updatedOn`",`"direction`":`"desc`"}],`"filter`":{},`"fields`":a],`"page`":

{`"offset`":0,`"total`":141,`"totalFilter`":141,`"length`":100}}" | Select-Object -Expand Content;

After this you will be receiving an output in which you will get the faulty device by “Nick Name” or by “Host Name”, get the ID of the device and save it to use in Step 3.

Lastly, run the Reset device API as follows by giving the token and DNS as used in above steps. Replace the DeviceID received in Step 2.

curl -UseBasicParsing -Method POST -Uri "https://aa-support-test.my.automationanywhere.digital/v2/devices/resetquot; -Headers @{

"method"="POST"

"authority"="aa-support-test.my.automationanywhere.digital"

"scheme"="https"

"path"="/v2/devices/reset"

"sec-ch-ua"="`"Chromium`";v=`"88`", `"Google Chrome`";v=`"88`", `";Not A Brand`";v=`"99`""

"pragma"="no-cache"

"accept-language"="en-US"

"sec-ch-ua-mobile"="?0"

"user-agent"="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36"

"accept"="application/json"

"cache-control"="no-cache"

"x-authorization"="change this for the value retrieved from the authentication API (token)"

"origin"="https://aa-support-test-2.my.automationanywhere.digitalquot;

"sec-fetch-site"="same-origin"

"sec-fetch-mode"="cors"

"sec-fetch-dest"="empty"

"referer"="https://aa-support-test.my.automationanywhere.digitalquot;

"accept-encoding"="gzip, deflate, br"

} `

-ContentType "application/json" -Body '{"deviceIds": {"ids":

Note: The example above has the Device ID 790 but this may vary depending on your affected device. Replace it with the affected Device ID.

Note: The rest API mentioned in Step-3 when run from Postman gives the response as "204 no content". This HTTP Status 204 (No Content) indicates that the server has successfully fulfilled the request and that there is no content to send in the response payload body. Hence this means that the request was successful.

 

We can also perform the above action from postman by following the below article-

https://apeople.automationanywhere.com/s/article/BOT-struck-in-In-Progress-Stage-and-not-able-to-move-it-to-history-or-BOT-struck-in-Pending-execution-Stage-and-not-able-to-move-it-to-history-on-A2019-CLOUD-environments/p>

Additional Information

Issue may also occur because of ISP blocking downloads from AA Cloud, so try changing the ISP and it should help resolve the issue.


i get this

 

You are not authorized to access this page, kindly reach out to your Account Executive / Company Administrator to enable access.

 


Hi @ishan mahajan​ ,

 

Checkout below KB for resolution, also understand you are in UAT stage i'd recommend placing a ticket with AA for fast pacing the resolution.

 

https://apeople.automationanywhere.com/s/article/Deployed-bots-stuck-as-Queued-on-device-with-message-as-waiting-for-user-and-or-device/p>


Thanks Chand, we are working with admin team to check above points, i will come back and mark answer as best if it worked, else i will update thread with further details.


Sure @ishan mahajan​ 


Hello,

When it happens, Can you just go to Activity-In progress page, and choose all the quequed tasks, and move them to history.

Then restart AA services, wait for 2-3mins for control room to run and try to run one task again.

i have it happened to me twice, and i did this steps, for a long time i dont get this issue

See if it works.Untitled


Reply