Unable to Create Replicated Snapshot - Docker Subnet Range Issue

Jonathan Rivera
Jonathan Rivera
  • Updated

Author: Jonathan Rivera

Date: August 3, 2023

Audience: Everyone

Problem/Summary:

Users are unable to create a Replicated snapshot.

The following errors are seen in replicated.log:

í2023-03-29T12:03:25.310466739Z ERRO 2023-03-29T12:03:25+00:00 [pkg/docker] run.go:95 API error (500): no available IPv4 addresses on this network's address pools: bridge ()
D2023-03-29T12:03:25.320361539Z ERRO 2023-03-29T12:03:25+00:00 snapshots/server/handlers.go:510 Blob 0f5939594bc2d2861ebba8aa6d7fbf5711c5ed7b0126db6d84486ea201cbd841 error: API error (500): no available IPv4 addresses on this network's address pools: bridge ()
v2023-03-29T12:03:25.320954201Z ERRO 2023-03-29T12:03:25+00:00 snapshots/backup.go:485 unexpected response status: 500
2023-03-29T12:03:25.465095240Z ERRO 2023-03-29T12:03:25+00:00 [pkg/piper] container.go:58 Failed to start piper container: API error (500): no available IPv4 addresses on this network's address pools: bridge ()
2023-03-29T12:03:25.465147075Z ERRO 2023-03-29T12:03:25+00:00 snapshots/server/handlers.go:137 Error API error (500): no available IPv4 addresses on this network's address pools: bridge () storing snapshot
v2023-03-29T12:03:25.465798253Z ERRO 2023-03-29T12:03:25+00:00 snapshots/backup.go:378 unexpected response status: 500

Solution:

  1. The message "no available IPv4 addresses on this network's address pools: bridge" indicates that there are no IP addresses left to allocate to containers.

  2. Check the output of the following command:
    docker network inspect bridge
  3. In the output, you will see a section similar to this:
    {
    "Name": "bridge",
    "Id": "1c62e7883b26fcb069c938ea658c40248ca3bbaad92e28324b95999e449b8278",
    "Created": "2023-04-12T12:32:29.128383041Z",
    "Scope": "local",
    "Driver": "bridge",
    "EnableIPv6": false,
    "IPAM": {
    "Driver": "default",
    "Options": null,
    "Config": [
    {
    "Subnet": "192.168.2.64/28",
    "Gateway": "192.168.2.78"
    }
    ]
    }
  4. The key to the problem is in the "Subnet" value: 192.168.2.64/28

    If you are familiar with subnet ranges, then you can already see the problem here. There are only 14 usable addresses available, but we need at least 19 to support all the containers.

  5. If you are unfamiliar with subnet ranges, there are plenty of subnet calculators online that you can use. This one is particularly useful and easy to use: https://www.calculator.net/ip-subnet-calculator.html.

    Plug in the subnet value into the calculator:

    Screenshot 2023-08-03 at 4.30.09 PM.png

    In the resulting screen, you will see a value for "Total Number of Hosts" and "Number of Usable Hosts". The number of usable hosts is the total range - 2, so in this case, there are only 14 usable addresses. (The first IP is used for the network address, and the last IP is used for the broadcast address).

    Screenshot 2023-08-03 at 4.32.39 PM.png
  6. This can be resolved by adjusting the subnet range. Instructions to do this can be found here. 

Cause:

The subnet range in your Docker network configuration was previously altered, resulting in a lack of IP addresses available to assign to containers. This is not something we provide support on, and we do not provide steps to alter this configuration. However, you may choose to do so on your own. 

 

Prevention:

Do not alter the default IP range of the docker containers. 

 

Related Links:

Additional Information/Metadata:

  • Docker network
  • Troubleshooting

Feedback: Did this article help you resolve your slow internet connection? Please leave feedback in the comments below.

 

Related to

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.