portainer: A stack with the name is already running
Bug description
When attempting to start a stack, Portainer fails with the error message A stack with the name <Stack Name> is already running.
Expected behavior The Stack should start without any error messages.
Technical details:
- Portainer version: 2.16.2
- Platform (windows/linux): Linux
- Have you reviewed our technical documentation and knowledge base? Yes
Additional context The Stack in question is stopped. There are no containers running on this instance when the error is reported. This is validated through Portainer and from Docker too.
The current workaround to start the Stack is to go to the Stack Editor and click on the Update the stack
button without making any changes to the yaml.
I run multiple environments managed by the same Portainer instance and this errors happens in only one of the environments.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 23
I fixed mine by openning the stack, clicking on
Editor
tab and clickingUpdate the stack
without anyting else (like image repulling or so, just update stack) and it appears as active now and i can stop it.same issue here, my solution without modify the bolt database
Same. More than a year after and still unresolved?
Hi @tamarahenson
Might be a bit too late. I resolved the issue by shutting down portainer and manually deleting what seems to have been an orphan Stack in portainer.db using boltbrowser
The 2nd/Orphan Stack had the same name and same endpoint but there was no way I could make it show up in the UI even when I enabled the
Show all orphaned stacks
option.I even tried to delete the Stack using the API (
DELETE stacks/{id}
) but was getting an error messageObject not found inside the database
Anyways thankfully I figured out how to resolve it but have no idea how it occurred.
Thanks