Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Got 409 Conflict when I stop and start my project. #1851

Open
1 task done
ffguven opened this issue Aug 4, 2024 · 1 comment
Open
1 task done

[Bug]: Got 409 Conflict when I stop and start my project. #1851

ffguven opened this issue Aug 4, 2024 · 1 comment
Labels
S-Blocked Implementing this is currently blocked by other issues and/or upstream dependencies T-Bug Something isn't working

Comments

@ffguven
Copy link

ffguven commented Aug 4, 2024

What happened?

Hi folks,

I am playing with a hello world project so that I can know more about Shuttle.

When I deploy my project, everything is fine and then I'm able to use it right away, that's great. But when I stop my project via the Web Console, and then

  • start it via the cargo-shuttle project start, I keep getting the error below:
godis@DESKTOP-T90BDM8:~/shuttle/zort$ cargo-shuttle project start

Project creation failed

Please double-check the project status before retrying:

cargo shuttle project status

If the project creation or retrieving the status fails repeatedly, please check Shuttle status at https://status.shuttle.rs before contacting the team on the Discord server.
Error: failed to make create project request

Caused by:
    409 Conflict
    Message: project 'zort' is already running
  • restart it via the cargo-shuttle project restart and get
godis@DESKTOP-T90BDM8:~/shuttle/zort$ cargo-shuttle project restart
Project "zort" is destroyed
Run `cargo shuttle project start` to recreate project environment on Shuttle.
Project "zort" is ready
Your project will sleep if it is idle for 30 minutes.
To change the idle time refer to the docs: https://docs.shuttle.rs/getting-started/idle-projects

Run `cargo shuttle deploy --allow-dirty` to deploy your Shuttle service.

But still I don't see my project is running via the Web console, or I cannot use my hello-world endpoint at all, keep getting

Project is running but is not responding correctly. Try to restart it
  • And when I hit cargo-shuttle project status
godis@DESKTOP-T90BDM8:~/shuttle/zort$ cargo-shuttle project status
Project "zort" is ready
Idle minutes: 30

I would expect hitting the start or restart via the CLI will execute my already deployed function, but that's not the case.

Maybe my understanding of this stop/start/restart lifecycle is not correct, but could you help me to understand if that's a genuine issue or not?

Project name: zort

Version

cargo-shuttle 0.47.0

Which operating system(s) are you seeing the problem on?

Linux

Which CPU architectures are you seeing the problem on?

ARM64

Relevant log output

godis@DESKTOP-T90BDM8:~/shuttle/zort$ cargo-shuttle project start

Project creation failed

Please double-check the project status before retrying:

cargo shuttle project status

If the project creation or retrieving the status fails repeatedly, please check Shuttle status at https://status.shuttle.rs before contacting the team on the Discord server.
Error: failed to make create project request

Caused by:
    409 Conflict
    Message: project 'zort' is already running

Duplicate declaration

  • I have searched the issues and there are none like this.
@ffguven ffguven added S-Triage Awaiting decision for what to do T-Bug Something isn't working labels Aug 4, 2024
@oddgrd
Copy link
Contributor

oddgrd commented Aug 5, 2024

Hey @ffguven, thanks for the report! The 409 error is a bug from Docker that we hit occasionally, where we send a request to the Docker API to start a project, and even though it isn't running, Docker thinks that it is. It shouldn't happen frequently, but during periods of heavy load it may happen more often. While Docker is great, and we've been able to do a lot with it, we're moving away from it in an upcoming re-architecture, which will resolve this issue. I'm happy to let you know when we open for user-testing, if you're interested!

As for the restarted project deployment still being stopped following a restart, that is because when you re-start a project, it will try to start the last running deployment. If you don't have any, it won't start any. The project represents a Docker container that is started for you, and when you make deployments you will build and start your application inside that container. In the upcoming re-architecture, however, you will not need to concern yourself with the container, there you will just run deploy.

@oddgrd oddgrd added S-Blocked Implementing this is currently blocked by other issues and/or upstream dependencies and removed S-Triage Awaiting decision for what to do labels Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-Blocked Implementing this is currently blocked by other issues and/or upstream dependencies T-Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants