Trying to run locally after adding postgres
# help
a
I've got a serenity bot that has been deployed and running successfully for a while. Trying to add postgres, I've encountered some errors when starting up locally to test my changes. I'm on windows 10 with rustc 1.69.0 (84c898d65 2023-04-16), and have installed docker desktop specifically for this. The first time I tried to
cargo shuttle run
I get
Copy code
log
2023-05-27T15:40:20.574720Z ERROR cargo_shuttle::provisioner_server: got unexpected error while inspecting docker container: error trying to connect: The system cannot find the file specified. (os error 2)
2023-05-27T15:40:20.576845Z ERROR cargo_shuttle: failed to load your service error="Custom error: failed to provision shuttle_shared_db :: Postgres"
Subsequent attempts each get
Copy code
log
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: tonic::transport::Error(Transport, hyper::Error(Listen, Os { code: 10048, kind: AddrInUse, message: "Only one usage of each socket address (protocol/network address/port) is normally permitted." }))', C:\Users\<name>\.cargo\registry\src\github.com-1ecc6299db9ec823\shuttle-runtime-0.14.0\src\alpha\mod.rs:88:30
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: status: PermissionDenied, message: "Access is denied. (os error 5)", details: [], metadata: MetadataMap { headers: {} }
I did try updating to
0.17.0
but then I can't even build as I get a
Copy code
log
note: LINK : fatal error LNK1104: cannot open file '<path to my discord bot .exe>'
so wasn't sure which to tackle first (or how)
a
Hey thanks for reporting this! Did you have docker or docker desktop active when running the first time? Sometimes it'll error out if docker isn't running, which can lead to 2) the local port getting used up and you having to use a different port
On the third error maybe try running cargo build before cargo shuttle run? Not sure on this
a
That was running
cargo build
before trying to run 😅 I'll restart to clear the port and make sure docker desktop is running before trying to run the discord bot locally and report back - thanks!
Appears to be working after restart and ensuring docker desktop was running (and docker engine showing as running within it) before running the discord bot
Interestingly 0.17.0 is building now too
No idea what was wrong there but it's fixed 😅 thanks!
a
No worries, happy to help 🙂
g
I'm using Neon so I don't have to think about it 😎