portainer: Editing a container gives out status code 400

When trying to edit/duplicate a container, upon deploying it says “Request failed with status code 400”.

  1. Click on container
  2. Click edit/duplicate
  3. Click deploy
  4. Enjoy the error
  • Portainer version: 2.13.1
  • Target Docker version (the host/cluster you manage): 20.10.16
  • Platform (windows/linux): debian
  • Command used to start Portainer (docker run -p 9443:9443 portainer/portainer): docker run -d -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
  • Target Swarm version (if applicable): no
  • Browser: Chrome

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (3 by maintainers)

Most upvoted comments

Please fix it. Literally the worst part of Portainer is that it does not tell you at all what you have been doing wrong. Good luck guessing why there’s a “Request failed with status code 400” error for a container that you just deployed seconds ago. Sometimes stopping the containers will fix it, sometimes removing the start commands, and other times it won’t work nonetheless what you have been doing. What a buggy mess!!

+1, please don’t throw random HTTP error codes without a descriptive message. This is extremely frustrating to the point where I’m better off doing a lot of stuff manually instead.

Same here. I saw this error when removing an environment variable for a running container. When I stop the container before, it is working. Thus, re-installing is not necessary.

Going into the browser console helped, turns out i had another container that was causing a conflict and the console in the browser actually had some other messages which were more useful. I was hoping the portainer notification log would have had some more details beyond the generic 400 error but it didn’t.