Resolving a Missing Image Tag (Docker Installation)

When troubleshooting issues with Private Locations (formerly known as OPLs - On-Premise Locations), you may discover one or more image tags missing. This article will walk you through how to check if this problem is present and how to resolve it.

When to Check

Check for missing image tags any time that a test fails to run properly on a Private Location. A number of unexpected behaviors can occur when a Private Location has one or more images missing tags.

How to Check

There are two methods to check for any missing images on your Private Location.

Method #1: Check through the API

The quickest way is to check through the BlazeMeter API's Private Locations resource, which will list out all images for all Agents, among other details:

GET https://a.blazemeter.com/api/v4/private-locations/{Location_ID}

Or to check images for a specific agent, use the following instead:

GET https://a.blazemeter.com/api/v4/private-locations/{Location_ID}/ships/{Agent_ID}

To learn how to identify the IDs, see the How to Find the Harbor ID and Ship ID article.

Method #2: Check through Docker

The other method is by checking directly on the Docker host itself:

  1. Log on to the machine hosting your Docker containers.
  2. From the terminal, run the command sudo docker images. You should see a list of various images appear, similar to the following example:
    [user@server_name ~]# sudo docker images
    REPOSITORY                  TAG                 IMAGE ID            CREATED             SIZE
    blazemeter/proxy-recorder   1.7.0-450           a62e139fe6f6        10 days ago         494 MB
    blazemeter/proxy-recorder   latest              a62e139fe6f6        10 days ago         494 MB
    apm-image                   1.1.1-471           e066d0456184        10 days ago         283 MB
    apm-image                   latest              e066d0456184        10 days ago         283 MB
    taurus-cloud                1.1.0-472           fcde0b4d129a        10 days ago         3.83 GB
    taurus-cloud                latest              fcde0b4d129a        10 days ago         3.83 GB
    blazemeter/crane            2.2.0-425           26568c546609        10 days ago         256 MB
    blazemeter/crane            latest              26568c546609        10 days ago         256 MB
    Versions are updated regularly so your version numbers may differ from the ones above, which were current as of the time of this writing.
  3. Each of the following images should be included in the list:
    blazemeter/proxy-recorder
    apm-image
    taurus-cloud
    blazemeter/crane
    If any of the above are not listed, you must regenerate the agent.
  4. Once you verify all images are present, next make sure there are two of each image: one with a version number tag, and the other with a "latest" tag.
    For example, "blazemeter/crane" should appear twice, one with a version tag ("2.2.0-425" in this example) and another with a "latest" tag, such as in this example:
    [user@server_name ~]# sudo docker images
    blazemeter/crane            2.2.0-425           26568c546609        10 days ago         256 MB
    blazemeter/crane latest 26568c546609 10 days ago 256 MB
  5. If if you have all of the images above and a version and "latest" tag for each image, then you likely are not missing any tags. If you are missing any of the above, please proceed to the next section of this article.

How to Fix

Let's say, for example, after running sudo docker images you see something similar to the following among the other images listed (the list of images here is shortened to save space - see the previous example for the full list you should see):

REPOSITORY                  TAG                 IMAGE ID            CREATED             SIZE
blazemeter/crane            2.2.0-425           26568c546609        10 days ago         256 MB
blazemeter/crane            latest              26568c546609        10 days ago         256 MB
blazemeter                  1.0.16              dca5e51f853a        4 months ago        5.46 GB

Notice how the "blazemeter" image has no "latest" tag? This is easy to fix using the following steps:

  1. Enter the command sudo docker tag <IMAGE_ID> <REPOSITORY>:latest
    Replace <IMAGE_ID> with the value from the column above, and <REPOSITORY> with the image name from the respective column.
    So for our "blazemeter" image, we would enter:
    [user@server_name ~]# sudo docker tag dca5e51f853a blazemeter:latest
  2. After running the above command to add the missing tag, list the images again vis sudo docker images to ensure the added tag now appears in the list.

You should now have all of your tags updated and are ready to resume executing your tests.