Internal I/O error: Deploying locally works but re...
# help
c
When using
Copy code
bash
cargo shuttle run
my poise bot starts without any issue. However when trying to deploy it, I get the following error:
Copy code
bash
 ❯ cargo shuttle logs --name <name> -l

2023-05-09T16:51:46.858819480Z  INFO Entering queued state
2023-05-09T16:51:46.864477901Z TRACE shuttle_deployer::deployment::queue: getting a build slot
2023-05-09T16:51:46.871537677Z TRACE {uri="http://gateway:8001/stats/load"} shuttle_deployer::deployment::gateway_client: calling gateway
2023-05-09T16:51:46.876255935Z DEBUG hyper::client::pool: reuse idle connection for ("http", gateway:8001)
2023-05-09T16:51:46.881347637Z DEBUG hyper::client::pool: pooling idle connection for ("http", gateway:8001)
2023-05-09T16:51:46.885494815Z TRACE {response="Response { status: 200, version: HTTP/1.1, headers: {\"content-type\": \"application/json\", \"content-length\": \"38\", \"date\": \"Tue, 09 May 2023 14:51:46 GMT\"}, body: Body(Streaming) }"} shuttle_deployer::deployment::gateway_client: Load response

2023-05-09T16:51:46.890465959Z  INFO Entering building state
2023-05-09T16:52:09.725436425Z  INFO     Blocking waiting for file lock on build directory
2023-05-09T16:55:13.084883320Z  INFO     Finished release [optimized] target(s) in 3m 26s
2023-05-09T16:55:13.088509441Z  INFO shuttle_deployer::deployment::queue: Running tests before starting up
2023-05-09T16:55:13.294767489Z  INFO     Blocking waiting for file lock on package cache
2023-05-09T16:55:27.678093800Z  INFO     Blocking waiting for file lock on package cache
2023-05-09T16:55:39.951473483Z  INFO     Blocking waiting for file lock on build directory
2023-05-09T16:56:05.926654451Z  INFO     Finished release [optimized] target(s) in 52.82s
2023-05-09T16:56:05.930632995Z  INFO      Running unittests src/main.rs (opt/shuttle/shuttle-builds/<name>/target/release/deps/<name>-e1bb3518bf861a3a)

2023-05-09T16:56:05.948939759Z  INFO Entering crashed state
2023-05-09T16:56:05.950695955Z ERROR {error="Internal I/O error: No such file or directory (os error 2)"} shuttle_deployer::deployment::queue: service build encountered an error
It used to start correctly two months ago, I updated my code to use the newest
0.16.0
release according to the docs and examples.
My bot doesn't access any files, it doesn't do anything special for now.
e
Hmm I've only ever seen the file locking stuff happen during build if there's multiple deployments trying to build at once.
Does this same error happen if you start a new deployment? Might be worth checking the deployment list to verify whether there's any runners still stuck building / running in a bad state. If there are, I'd suggest stopping them before trying a new deployment
g
Just to double check: did you restart the project after upgrading?
cargo shuttle project restart
(add idle minutes if u want)
c
Yep twice, but I'll try it once more just to check
e
and make sure you stop anything that's still running after the restart too
c
Ok I think I fixed the problem by restarting once more and discovered a bug in serenity that I'm gonna report
Thank you for your help!