Resolving the Error "Forbidden: Not enough available resources"

When trying to execute a test against your own Private Location, you may at some point encounter the following error:

error

The error means that, as it states, the test in question is configured to run on a Private Location, 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

Follow these steps:

  1. Log into your BlazeMeter account.
  2. Navigate to Settings, Workspace, Private Locations
    private locations.png
    A page with a preview of your Agent statuses for each location opens.
  3. Select the location your test failed to run from.
    agent location
  4. You can see each engine status in more detail.
    agent status
    Note:
    The status of each Agent 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.

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:

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.