portainer/portainer · error · HandlerError

Stack deployment is in progress

Error message

Stack deployment is in progress

What it means

Error "Stack deployment is in progress" thrown in portainer/portainer.

Source

Thrown at api/http/handler/stacks/stack_stop.go:102

	if !access {
		return httperror.Forbidden("Access denied to resource", httperrors.ErrResourceAccessDenied)
	}

	canManage, err := handler.userCanManageStacks(securityContext, endpoint)
	if err != nil {
		return httperror.InternalServerError("Unable to verify user authorizations to validate stack deletion", err)
	}
	if !canManage {
		errMsg := "stack management is disabled for non-admin users"
		return httperror.Forbidden(errMsg, errors.New(errMsg))
	}

	if stack.Status == portainer.StackStatusInactive {
		return httperror.BadRequest("Stack is already inactive", errors.New("Stack is already inactive"))
	}

	if stack.Status == portainer.StackStatusDeploying {
		return httperror.Conflict("Stack deployment is in progress", errors.New("stack deployment is in progress"))
	}

	stopErr := handler.stopStack(r.Context(), securityContext.UserID, stack, endpoint)
	if stopErr != nil {
		if err := handler.DataStore.UpdateTx(func(tx dataservices.DataStoreTx) error {
			stackutils.UpdateStackStatusFromUndeploymentResult(stack, stopErr)
			return tx.Stack().Update(stack.ID, stack)
		}); err != nil {
			log.Warn().Err(err).Str("context", "StackStop").Msg("Unable to update stack status after failed stop attempt")
		}

		return httperror.InternalServerError("Unable to stop stack", stopErr)
	}

	err = handler.DataStore.UpdateTx(func(tx dataservices.DataStoreTx) error {
		stackutils.UpdateStackStatusFromUndeploymentResult(stack, nil)
		if err := tx.Stack().Update(stack.ID, stack); err != nil {
			return httperror.InternalServerError("Unable to update stack status", err)

View on GitHub (pinned to 17e74456ff)

When it happens

Trigger: Thrown at api/http/handler/stacks/stack_stop.go:102 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of portainer/portainer@17e74456ff (2026-08-26). Data as JSON: /api/errors/7b2dcbaff0d40c15. Report an issue: GitHub.