Skip to main content

Can Somebody explain to me how to solve this?

 is someone else facing this issue as well? I do get this error very frequently. but i used to delete control room registration and uninstall previous bot agent and re-install all pre-requisites but nothing worked. 

 

Hi @Enab 2226 

Can you check your C Drive has free space and there are no errors in your task bot?


no errors in bot. and I have a huge space of 200 gb available in C drive.


@Enab 2226 

Summary
Unable to run the bot in Automation 360 (formerly Automation Anywhere Enterprise A2019). The following error is encountered: 
"Unable to download the bot or the dependencies to the device"

Cause
Cause 1: The disk space on the Bot Runner is full
Cause 2 : Control Room Access URL in the Control Room Settings is incorrect
Cause 3 : Copy-Paste of the bots
Cause 4 : Inaccessibility of the Control Room due to Network
Cause 5 : Permissions over Bots in the Role is not provided to the Runner user
Cause 6 : SSL Handshake Error (On-Prem CR with Self Signed certificate)
Cause 7 : Bot deployment path too long and exceeding 255 characters. On Node Manager logs, below error is seen

 
 
com.automationanywhere.nodemanager.service.impl.GlobalCacheServiceImpl - {} - lambda$downloadFile$44(GlobalCacheServiceImpl.java:697) - Unexpected error downloading and saving file https://XXXXX.my.automationanywhere.digital/v1/repository/5/7741/download?version=latest java.lang.RuntimeException: Error creating or updating cache file    at com.automationanywhere.nodemanager.service.impl.CacheDataAccessServiceImpl.lambda$createOrUpdateCacheEntry$1(CacheDataAccessServiceImpl.java:124) ~anode-manager.jar:?]    ...Caused by: org.h2.jdbc.JdbcSQLDataException: Value too long for column """LOCAL_PATH"" VARCHAR(255)": "'C:\Users\<username>\AppData\Local\AutomationAnywhere\dad5bdc2-c53b-4ae3-85d2-a102651730a9_d58e4cadd8eeea31\Automation Anywhere\... (280)"; SQL statement:INSERT INTO CACHE_STORE (id, local_path, e_tag, update_time) values (?, ?, ?,  CURRENT_DATE()) N22001-199]    at org.h2.message.DbException.getJdbcSQLException(DbException.java:455) ~onode-manager.jar:?]
Cause 8: Wrong CR URL set up in Control Room Settings. Following error is seen in WEBCR_Commons log
com.automationanywhere.common.util.logutil.LogUtil - traceId:10abb456c456fd9a spanId:10abb456c456fd9a url:http://XXXXX/assets//v2/packages/artifacts/package/bot-command-recorder-2.0.7-20200726-053131.jar method:GET code:500 requestbody:null responsebody:{"message":"The request was rejected because the URL contained a potentially malicious String \"//\""} org.springframework.security.web.firewall.RequestRejectedException: The request was rejected because the URL contained a potentially malicious String "//"    at com.automationanywhere.authn.spring.ControlRoomHttpFirewall.rejectedBlacklistedUrls(ControlRoomHttpFirewall.java:304) ~ekernel.jar:?]    at com.automationanywhere.authn.spring.ControlRoomHttpFirewall.getFirewalledRequest(ControlRoomHttpFirewall.java:267) ~Fkernel.jar:?]
Cause 9: The Repository URL "https://aai-artifacts.my.automationanywhere.digital/" is blocked and not accessible within the environment. The below error is seen in Node_Manager.log
Error Stack: ERROR "Thread-35] - com.automationanywhere.nodemanager.service.impl.GlobalCacheServiceImpl - {} - onFailedDownloadAttempt(GlobalCacheServiceImpl.java:709) - attempt 3 download failure java.lang.RuntimeException: Unexpected error downloading file https://aai-artifacts.my.automationanywhere.digital/packages/bot-command-messagebox-2.0.0-20200721-222213.jar
Cause 10: Permissions over the Bot Runner and Global Cache Folder on the system where the device is registered

Cause 11: If the control room server is on AWS Server and the control room URL is pointing to the local hostname, the following error is seen in the Node_Manager.js file
2020-Nov-18 Wed 10:09:08.215 ERROR WForkJoinPool.commonPool-worker-7] - com.automationanywhere.nodemanager.service.impl.GlobalCacheServiceImpl - {} - onFailedDownloadAttempt(GlobalCacheServiceImpl.java:992) - attempt 1 download failure java.lang.RuntimeException: Unexpected error downloading file http://XXXXX/v2/repository/bot/runtime2020-Nov-18 Wed 10:09:08.215 ERROR Wpool-7-thread-1] - com.automationanywhere.nodemanager.service.impl.GlobalCacheServiceImpl - {} - onFailedDownloadAttempt(GlobalCacheServiceImpl.java:992) - attempt 1 download failure java.lang.RuntimeException: Unexpected error downloading file http://XXXXX/v2/repository/files/packaging/78446b1e-e3ca-42d5-b7c0-ca74f99938a1/18.jar
Cause 12: Network Proxy blocks the Jar File which includes executables like DLL, Javascript, Python script, VB script are unable to download
2020-Dec-26 Sat 15:36:46.824 INFO 2pool-2-thread-1] - com.automationanywhere.nodemanager.service.impl.GlobalCacheServiceImpl - {} - lambda$downloadWithRetries$76(GlobalCacheServiceImpl.java:1119) - retrying download https://XXXXX.my.automationanywhere.digital/v1/repository/0/1045/download?version=latest... (attempt 1)2020-Dec-26 Sat 15:36:46.869 ERROR 6pool-2-thread-1] - com.automationanywhere.nodemanager.service.impl.GlobalCacheServiceImpl - {} - lambda$downloadFile$78(GlobalCacheServiceImpl.java:1314) - Unexpected response code 403 downloading the file https://XXXXX.my.automationanywhere.digital/v1/repository/0/1045/download?version=latest
Cause 13: Some of the .jar files are missing or not accessible
2021-Jan-11 Mon 16:17:12.721 ERROR 1pool-2-thread-1] - com.automationanywhere.nodemanager.service.impl.GlobalCacheServiceImpl - {} - lambda$downloadFile$78(GlobalCacheServiceImpl.java:1314) - Unexpected response code 500 downloading the file http://XXXXX/v2/repository/files/packaging/88176aa3-ba21-4e59-b00c-961d669037a2/19.jar
Cause 14: Updated.jar (Bot Package) files can be downloaded from outside Automation Anywhere using the Artifact link (https://aai-artifacts.my.automationanywhere.digital/packages/) but the same package cannot be downloaded while running the task bot and giving us the "Unable to download the bot or the dependencies to the device" Error message.

Entries in Node Manager Log:
2021-Nov-15 Mon 12:57:22.515 ERROR -pool-2-thread-1] - com.automationanywhere.nodemanager.service.impl.GlobalCacheServiceImpl - {} - run(GlobalCacheServiceImpl.java:1879) - Error deleting the cache entries during expiry java.lang.RuntimeException: Unexpected error getting cache file at com.automationanywhere.nodemanager.service.impl.CacheDataAccessServiceImpl.getExpiredCacheEntries(CacheDataAccessServiceImpl.java:140) ~cnode-manager.jar:?]--------------------------------------------------Caused by: org.h2.jdbc.JdbcSQLNonTransientException: General error: "java.lang.IllegalStateException: Chunk 1919655 not found n1.4.200/9]"; SQL statement:SELECT * FROM CACHE_STORE WHERE update_time < CURRENT_DATE() - INTERVAL 30 DAY T50000-200]--------------------------------------------------------------------------------------------------------------------------Caused by: java.lang.IllegalStateException: Chunk 1919655 not found n1.4.200/9]--------------------------------------------------------------------------------------------------------------------​2021-Nov-15 Mon 12:58:19.959 ERROR opool-4-thread-1] - com.automationanywhere.nodemanager.service.impl.GlobalCacheServiceImpl - {} - lambda$checkForExceptions$53(GlobalCacheServiceImpl.java:940) - Unable to download java.util.concurrent.CompletionException: java.lang.RuntimeException: Unexpected error downloading file https://aai-artifacts.my.automationanywhere.digital/packages/bot-command-datetime-2.2.0-20210722-143808.jar (Here You will get the package Name)------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Caused by: java.lang.RuntimeException: Unexpected error downloading file https://aai-artifacts.my.automationanywhere.digital/packages/bot-command-datetime-2.2.0-20210722-143808.jar (Here You will get the package Name)-------------------------------------------------------------------------------------------------------------------------------------------------Caused by: java.lang.RuntimeException: Unexpected error getting cache file-----------------------------------------------------------------------------------------------------------------Caused by: org.h2.jdbc.JdbcSQLNonTransientException: General error: "java.lang.IllegalStateException: Chunk 1919655 not found i1.4.200/9]"; SQL statement:SELECT * FROM CACHE_STORE where id = ? R50000-200]---------------------------------------------------------------------------------------------------------------------------------
 
 
Cause 15: The TLS might be causing a handshake error
javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake at sun.security.ssl.SSLSocketImpl.handleEOF(Unknown Source) ~I?:?]
Cause 16 : Bot getting stuck at downloading dependency which uses Excel and Recorder commands / Actions after upgrade 
Cause 17 : Metadata was deleted from Repository

Cause 18: The control room is configured with node-level SSL instead of load balancer SSL.

Cause 19: Control room URL resolution is getting failed at the DNS server

 
2022-Dec-07 Wed 19:40:21.665 ERROR 0pool-4-thread-1] - com.automationanywhere.nodemanager.service.impl.GlobalCacheServiceImpl - {} - lambda$checkForExceptions$54(GlobalCacheServiceImpl.java:960) - Unable to download java.util.concurrent.CompletionException: java.lang.RuntimeException: Unexpected error downloading file https://***.my.automationanywhere.digital/v2/repository/bot/runtimeCaused by: java.net.UnknownHostException: ***.my.automationanywhere.digital
Resolution/Workaround
Solution 1:
If the disk is getting full or the available disk space is not enough on the bot runner machine, it will not download the dependencies file and give this error. In this case, work with your IT team and increase/clear the disk space.

Solution 2:
Check whether the CR URL entered under Control Room > Administrator > Settings > General is correct and pointing to the required control room. If it's an LB setup, then make sure it has LB url and not any node-specific url. Also, it should not have any space or '/' character at the end of the URL. CR URL should be like (i.e : https://CR-URL.com) and It should not be like (i.e : https://CR-URL.com/) or (https://CR-URL.com )

Solution 3:
This error also occurs when the bot is copy and pasted from some other folder with its dependencies and when the dependency files are not able to be accessed through a user due to restricted access rights on the folder. 

Solution 4:
If the Control Room is accessed from a different network other than the corporate network (VPN), please make sure that the IP Address resolves to a hostname.

Solution 5:  
1. Verify the roles assigned to the Runner user.
2. Out of the User-defined roles assigned to the user, edit one of them.
3. Go to the Bots section.
4. Provide the 'Run and Schedule' permissions on the Repository folders.

Here, the BotCreator is the User-defined role assigned to the user. 'Run and Schedule' permission should be checked.

Solution 6:
To resolve this issue, import the SSL certificate to the local system's certificate store & CR's keystore by following the below steps.
  1. Open the Microsoft Management Console (MMC) using the following steps: 
    1. Open the Run utility.
    2. Type "mmc" and click Enter.
    3. Navigate to File > Add or Remove Snap-ins.
    4. Click on Certificates in the Snap-in section and click on Add.
    5. Select Computer account and click on Next.
    6. Choose the Local Computer option and click on Finish.
  2. Import the certificate by following the below steps: 
    1. Navigate to Certificates (Local Computer) > Trusted Root Certification Authorities.
    2. Right-click on Trusted Root Certification Authorities and navigate to All Tasks > Import.
    3. Browse the path where you have placed the root certificate and click on Next.
    4. Make sure the "Place all certificates in the following store" option is selected and click Next followed by Finish.
  3. Import the SSL certificate to the CR keystore by following the below steps:
    1. Run the command prompt as administrator
    2. Navigate to C:\Program Files\Automation Anywhere\Bot Agent\jre\bin
    3. Use the following command to import the certificate in the keystore:
    4. keytool -import -alias example -keystore "C:\Program Files\Automation Anywhere\Bot Agent\jre\lib\security\cacerts" -file "D:\cert\xyz.cer"
      Note: Mention the destination path of the certificate along with the file name.
    5. Enter password : "changeit"
    6. Enter "Y"
    7. You will see the message that the certificate was imported successfully
    8. Please restart the machine and you will be able to execute the task successfully.


Solution 7:

  • This is a known issue in Automation 360 v11 and later, seen in situations where the bot path inside the CR repository exceeds 255 characters.
  • To resolve the issue, shorten the folder path on the UI to be less than 255 characters.
  • This issue is resolved in Automation 360 v15 and later.


Solution 8:
1. Log in to CR as admin.
2. Navigate to Administration->Settings
3. Expand the General Tab and click on Edit
4. Ensure the CR URL does not have a "/" at end for e.g. http://<<CR_URL>>; and not should be like http://<<CR_URL>>/
5. Post changing the URL, save the changes and proceed with bot deployment.

Solution 9:
Unblock the https://aai-artifacts.my.automationanywhere.digital/ URL or Automation Anywhere Domain Name System (DNS) to the safe recipients or allowed list and make this URL part of the proxy server exception list. Once the URL is accessible via the device, the repository will get downloaded and the issue will be fixed.

See the following document for URL whitelisting:
https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/deployment-planning/cloud-whitelist-cr-urls.html

Solution 10:
​​​​​The users should have read\execute\modify\full control permissions to the GlobalCache and BotRunner. Validate the same. If the permissions are not given then we need to give permissions to the Everyone group. 

Solution 11 :
Update the control room URL to AWS URL and make the repository path as shared and make it accessible outside the AWS server.

Solution 12 :
Ask your IT Team to whitelist the URL in network proxy which initiates with string - "https://XXXXXX.my.automationanywhere.digital/v1/repository/"followed by some dynamic string.

Solution 13:
This solution needs to be applied only when the .jar file mentioned in the ERROR entry in Node Manager log is not found under the jar-cache/uuid folder.
Note: Take back-up of the database table and the jar-cache folder before performing the below steps.

  1. Delete the table data of AAFILE_COMPILER_CACHE.
  2. Clear .jar files under jar-cache. By doing that, when recompilation happens, the files are created again and the missing jar error disappears. 
Control Room server path:
C:\ProgramData\AutomationAnywhere\Server Files\jars-cache\<uuid>\

Sample picture of jar-cache folder
image-20210608-100714.png
  1. Restart the Control Room and Bot Agent services.
  2. Run the task bot again and the issue will be resolved this time.


Solution 14:
Steps to Resolve the issue:

  1. Stop the bot agent services
  2. Open the folder location "C:\Windows\System32\config\systemprofile\AppData\Local\AutomationAnywhere"
  3. Delete the AA-DB.mv and AA-DB.trace files.
  4. Start the Bot agent Service
  5. Try to run the bot with the latest package and let us know the outcome of the bot
Solution 15:
Go to Regedit and find the following:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Automation Anywhere Bot Agent\Parameters
  1. Change the below value of AppParameters.
-Dhttps.protocols=TLSv1.1,TLSv1.2,TLSv1.3 -Dlog4j.configurationFile=file://"C:\Program Files\Automation Anywhere\Bot Agent\config\nodemanager-logging.xml" -Dext.properties.dir="C:\Program Files\Automation Anywhere\Bot Agent\config" -jar "C:\Program Files\Automation Anywhere\Bot Agent\node-manager.jar"
 
This will force the use of TLSv.1.1, 1.2 and v1.3.
However, as I'm writing this solution, our case was solved by forcing to not use the TLSv1.3. Should your issue be similar, you may use:
-Dhttps.protocols=TLSv1.1,TLSv1.2

Solution 16:
1. In the package settings
2. Update the packages to default by selecting the default value from the drop down list
3. Save the changes
 
Solution 17:
If  the bot has been backup, please copy and past the Metadata folder to the specific repository folder 
If you did not backup the bot, please recapture the window for Recorder, Image Recognition command etc in order to re-generate Metadata folder.

Solution 18:
The client had a certificate setup as individual node SSL certificates on the two nodes rather than having SSL certificate in the CR URL name.

SSL certificates presented by the nodes are not the same as the CR URL configured on the LB. The LB is configured in SSL passthrough mode where the LB simply routes the traffic to the underlying nodes. However, in this case, the SSL certificates on the nodes should be the ones pointing to CR URL and should not be node-named certificates.

Re-configure the control room with the LB certificate on both nodes by following the below steps and docs link:-
https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/deployment-planning/on-prem-install/cloud-config-control-room-https-import-cert.html

jdk11\bin\java -jar certmgr.jar -appDir "C:\Program Files\Automation Anywhere" -setServerCert "C:\Users\cradmin\Desktop\test_automationanywhere_com.pfx" -privateKeyPass <PFX Password>

Import HTTPS and CA certificates

Further, import the root certificate in java cacerts.
  • keytool -import -alias example -keystore "C:\Program Files\Automation Anywhere\Bot Agent\jre\lib\security\cacerts" -file "D:\cert\xyz.cer"

Now we have an LB level certificate on both the nodes.

Solution 19:
Whitelist the control room URL from the firewall and fix the DNS server so that the resolution of the domain to the IP address is allowed.

Also, try adding the DNS entries in the window host file by following the below steps:-
  1. Open the CMD in admin mode
  2. Now execute (nslookup HOSTNAME_OF_CR)
  3. Open your text editor in Administrator mode.
  4. In the text editor, open C:\Windows\System32\drivers\etc\hosts.
  5. Add the IP Address which we got from 2nd point and the hostname.
    Example:
    171.10.10.5 test.server.com
  6. Save the changes.

@Enab 2226 

Please let us know what error messages you notice in the logfile Node_Manager.log

C:\ProgramData\AutomationAnywhere\BotRunner\Logs

The intention is get more information regarding the issue.

Regards


Hi @Enab 2226,

Are you trying to run Cloned bots in Dev from your ‘Private’ tab? 

If so, I had this issue as well, and resolved it by doing the following:

  1. On the ‘Private’ tab, delete the cloned bots that you’re trying to run
  2. Go to your ‘Public’ tab, and re-clone the bots (both master and child bots)
  3. Go to your ‘Private’ tab, and try running them again

 

Regards,
Lisa


Reply