Before you look up for specific issue you are facing, make sure the following pre-requisite is established by running the javac command on command prompt.
accelQ local agent requires JDK 1.8 (or higher versions). Make sure you have JDK (Java Development Kit) installed, not just the JRE.
Run the following command at the command prompt.
Output must show a version above 1.8. Once you confirm you have the right version of JDK available, use the following guidelines to resolve any issues you may encounter when starting and registering local agent in your network.
Multiple Java versions or Java not installed properly
If Java is not installed properly, you might encounter an error as follows.
Error occurred during initialization of VM
press any key to exit....
Please make sure that JAVA_HOME environment variable is pointing to the absolute path of the JDK folder (e.g: C:\Program Files\Java\jdk1.8.0_181)
JDK is not installed
Local agent requires JDK (not just JRE) to execute tests. If you encounter error as in the image below (screenshot of test report), make sure JDK is installed on your local agent machine. You can check for the existence of JDK by typing the following command at a command prompt. The response should indicate version 1.8.* or higher.
Incompatible Java version
Local agent is compatible with JDK version 1.8 or higher. If you encounter the following error, please upgrade your java version and setup Java 1.8 or higher.
Could not determine java version from 'x.x.x'
You can check for correct version of JRE by typing following command at a command prompt
Issues with JAVA_TOOL_OPTIONS and JAVA_OPTIONS
When you run the agent, if you see any output on the console with exceptions and at the same time JAVA_OPTIONS or JAVA_TOOL_OPTIONS is set, please remove these environment variables by following the steps in the section.
When this occurs, please remove the environment variables or if you do not have permissions, set the value to empty as follows:
Remove the following environment variables. (Go to “Environment Variables” in control panel and remove it on Windows)
Then restart the local agent
If you are not able to delete the above environment variables, then open a command prompt in the Agent folder.
Type following 2 commands and put nothing after the "=" sign.
In the same command window, now run the agent start batch file.
Special characters in Agent folder name
Make sure the agent folder path does not contain white spaces, parenthesis, or any other special characters. You may encounter an error such as the following:
com.beust.jcommander.ParameterException: Was passed main parameter 'with' but no main parameter was defined
Security warning on Windows desktop
When you run the startup batch file for windows, you may be prompted with a security warning as below. Click on "More Info" link and then click "Run Anyway" button.
Agent name already in use
Agent name specified in the agent.properties file may already be taken. Try updating the agent name in the properties and invoke again.
Agent names are allocated on-demand. If an agent goes inactive for more than 30 seconds, the same name may become available for another registration.
Note: It may sometimes be possible that the required agent name may not be listed as active, but it may take up to 60 seconds to free up the name for fresh registration. If you are sure about a particular agent not used anywhere else, try waiting for 60 seconds and invoke the agent again with the same name.
Port is busy
Port number used for the agent may be in use by another process on your desktop. Try with a different port number.
Note: In case you find previous port number you used for the agent as not available, try with a different number. Sometimes, the Operating System may hold on to the port number even after the termination of the process holding it originally.
Setting up proxy
In case incoming traffic to the local agent machine is routed through a Proxy, make sure to provide this information in the agent properties file. You may be able to get this information from your network admin.
If a proxy is required, you may get an error message indicating Forbidden
Note: In some cases, both http and https may be routed through different proxy servers. Update both the sections as required in the properties file.
Do not run local agent as sudo on Mac / Linux
Make sure you are not running the local agent as sudo on Mac or Linux. Browser invocation and subsequent behavior may be unpredictable.
Permissions issue on MacBook
If you encounter any of the following errors while starting the agent on your MacBook, follow the steps outlined.
Possible error messages:
- Error while downloading gradle dependencies. Exiting...
- java.io.IOException: Cannot run program
- error=13, Permission denied
Steps to resolve:
In the terminal window, type the following command:
chmod -R 777 <agent folder name>
After executing this step, restart the agent.
Note: You may encounter the same error messages one more time. Repeat the chmod step once again.
Failed to setup sandbox
If you encounter an error similar to one displayed here with sandbox setup, check the following:
- Permissions to the agent folder: Current user must have read/write permission to the folder where the agent is running
- Disk space: Check that the disk has not run out of space