Docker Community Forums

Share and learn in the Docker community.

Error scaling container 500 Internal Server Error: Could not get container for <Container name>


(Ken42) #1

Possibly related to my other thread, not sure how to reproduce consistently.

When I try to scale a single container that is part of an app that was created with docker-compose, I will get the “Error scaling container 500 Internal Server Error: Could not get container for (container name)” message, where (container name) is the name of one of the other containers that is part of the app.

When I go back to the application view after this error occurs, I will see a few “dead” instances of the container is was trying to scale. Their icon will be colored red but the count of “exited” containers will still be 0. When I investigate the container, it will have a status of “created” but no logs will display for that container.

I ran the Docker compose command from the node with the UCP leader and the dead containers it creates are on one of the other follower nodes in the cluster. I have confirmed that all the images associated with the application are present on that follower node so it should have no trouble getting the images for the new containers.

I have no clue why this is happening or what else to try. Please let me know any further information I can provide to help debug.

Software versions:
Redhat 7.2
Docker Engine 1.10
Docker-compose 1.6.0
UCP 0.8.0
Swarm 1.1.0-rc2 (installed by the UCP install)

All on EC2 instances.


(Ken42) #2

Some more information:

This is the docker-compose application I am using:

I notice that I can scale the redis and ha-load balancer without issue. However, for some reason I cannot scale the “web” container and get the error mentioned in the above post.

Any help would be greatly appreciated.


(Alm. Brand Docker admins) #3

I could understand it if you could not scale the “lb” service, since it bridges the internal port 80 to host port 80 - which is only possible once.


(Ken42) #4

I’m thinking this might be occurring because of the way I am using Docker compose.

The web container and Redis container are linked together and I believe linked containers must reside on the same machine(?) Thus the “could not get container for…” error.

I may need to switch to use the multi-host networking networking in Docker 1.9 instead.


(Ken42) #5

Docker staff, please disregard this issue for now - I think this was just due to me not having multi-host networking configured properly and misunderstanding how links vs networking was suppose to work. I’ll update this thread later when I know for sure.