When trying to install, join, or restore a DTR replica, you might get the following error:
Failed to create new container
There are multiple instances when you might receive this error. To debug this, check the constraints mentioned. They could look something like this:
Failed to create new container dtr-nginx-12a34b56c78d: Couldn't create container 'dtr-nginx-12a34b56c78d' from image 'docker/dtr-nginx:2.0.4': Error response from daemon: Unable to find a node that satisfies the following conditions [port 80 (Bridge mode) port 443 (Bridge mode)] [available container slots] [container!=ucp-controller (soft=false) container!=dtr-api-* (soft=false)] [node==node1]
The error could be caused by any of the constraints mentioned in the console output. Try the following:
- Check that the node name mentioned in the constraints and ensure that it matches the name of the node listed in the UCP dashboard's Node page.
- Ensure the ports mentioned are not currently in use by another process or container.
- If you see the line container!=dtr-api-*, check your UCP's Admin Settings page. Under the Scheduler settings, ensure the option "Allow Administrators to deploy containers on UCP controllers or nodes running DTR" is checked.
- In the unlikely event that all three steps above are already verified and the issue still cannot be resolved, file a support ticket to further investigate the issue.