When trying to execute a test against your own On-Premise Locations (OPLs), you may at some point encounter the following error:
The error means that, as it states, the test in question is configured to run on an OPL, but is unable to start due to a lack of available resources. By "resources", the message means Agents, so in other words, not enough Agents are available in the Private Location(s) used.
For example, if you try to run a test that requires ten Agents, but only eight Agents are available (thus two are unavailable), then not enough resources are available to run your test.
But what causes this to happen? The following steps will lead you to an answer.
Step 1: Check Agent Status
- While logged into Blazemeter, navigate to your personal settings, then under Workspace, select Private Locations.
- On the next screen, you'll get a preview of your Agents' statuses for each location. Select the location your test failed to run from.
- Here we can see each engine status in more detail.
- Note the status of each Agent, which will show as either "Idle", "Running", "Downloading" or "Error". If the agent is running, it will also show which test is currently running on it. If it is disabled, you will see extra messaging denoting as such, which means it will not be used.
The above steps will show exactly what resources are and are not available. For unavailable resources, the status column will give you an idea as to why they are unavailable.
Note: What resources are available for a particular Private Location will also depend on the type of Private Location ("load engine" or "CI - multi engine") that was set up. For further details, please refer to the "Basic Configuration" section of the article How to Create an On Premise Environment (Private Location).
Step 2: Troubleshoot the Agent
Depending on what status you find for the Agent(s) in question, you may need to address an issue with one or more agents.
If an Agent is disabled, then you will need to enable the agent to be able to use it. All disabled agents will be ignored when attempting to spin up a test.
If all the Agents are in Idle status, this likely means that whatever rendered resources unavailable previously has already passed (for example, perhaps an agent just finished running another test), thus the resources are now once again available, in which case, you can attempt to run your test again.
If an Agent is in Running status, this means the Agent is currently occupied running another test, which is why the resource is unavailable. In this case, wait for the agent to complete running its current test, then try to run your test again. (Note that it may be running another test initiated by another user.)
If an Agent is in Downloading status, this means the Agent is currently occupied with downloading the latest releases of the images used for the installation and unavailable for use. In this case, you must wait for the downloads to finish and complete its update before it can be used.
If an Agent is in Error status, then there is a problem with the Agent itself that has rendered the resource unavailable. There are multiple possible causes for an Agent to go into error status. The best way to start troubleshooting the agent is by consulting the other articles under the Private Location Knowledge Base section of this site, which covers a range of possible error scenarios. Two of the most common problems to check for first are detailed here:
- How To Check For Connectivity From The Container To BlazeMeter's API Server
- How to Resolve a Missing Image Tag
Note: if your test requires multiple engines, ensure that enough agents are in "idle" status to satisfy that requirement. For example, if you are running a 10-engine test, but only eight engines are in "idle" status, then there will not be enough resources available to run the test.