https://linen.dev logo
Some logs not being displayed
# help
o
Hey, I just noticed that some log messages (tracing) is not being displayed when running
cargo shuttle logs
. While I was debugging something earlier I had no clue why something was failing, and I didn't see any error logs in
cargo shuttle logs
. When running my app locally and reproducing the bug, I could see error logs and it was very obvious how to fix it. Since I can see
INFO
level logs from my deployment, I would expect to also see
ERROR
level logs, but I am not for some reason. I fixed my bug now but it's quite annoying that the log messages from shuttle are seemingly unreliable; if I get another bug that's harder to reproduce I might not be able to trace back what happened 🫤
My deployment has also been stuck for literally half an hour now
Copy code
2023-04-15T04:59:08.637076156Z  INFO shuttle_deployer::deployment::run: loading project from: /opt/shuttle/shuttle-executables
/dfb7514f-2a5a-49ba-865b-63aab0319859
Copy code
TwitchBot.git/master ❯ cargo shuttle deploy                                                                   master 05:30:51
Error: 503 Service Unavailable
message: project not ready
e
yeah I've had that happen a few times. Not sure what causes it. You can get things running again with
cargo shuttle project restart
. There will sometimes be a still-running (but stuck, seemingly) deployment shown after that point, so do
cargo shuttle stop
and then
cargo shuttle deploy
to get things running. In theory the
stop
shouldn't be needed, but I had a few times like this where not manually stopping it first caused me to get right back into the stuck state with the project saying it's not ready.
o
I've tried restarting the project multiple times and it still doesn't work
stopping also does not work unfortunately
Copy code
TwitchBot.git/master ❯ cargo shuttle stop
Error: 503 Service Unavailable
message: project not ready

https://cdn.discordapp.com/attachments/1096629925659811891/1096655512810037319/image.png

seems like servers are down or something
e
you need to do them in that specific order: restart project, stop deployment, then you can start another one. If it still doesn't work after that specific sequence, then yeah I guess it must be something else.
o
If I do that it gives me a 404 when running
cargo shuttle stop

https://cdn.discordapp.com/attachments/1096629925659811891/1096656595640918066/image.png

I'm trying it again, but I think it's gonna get stuck again it's stuck again
e
yeah that's weird, I haven't gotten it stuck quite that bad yet myself, I think
if you restart the project once more and do
cargo shuttle deployment list
, what does it show?
o
1 running service and a bunch of stopped ones
is it supposed to show deployments for this project only or all my projects?
e
afaik just the current project
but I haven't played with a bunch so maybe more?
o
because I do have a different project that is running, so I don't know if the 1 running deployment shown in the list is that or not
e
you could check the deployment list from that project folder and compare the GUIDs?
o
yeah, it seems like it's per project
so there is a running deployment apparently
🤔
if I check its status it says last updated about 2 hours ago
I'm not sure if that's the newest version of my code
e
I'd guess that running deployment is for whatever reason not responding and causing shuttle to get stuck when trying to tell it to gtfo so it can bring up a new deployment. But the 404 when you try to
stop
it is a new one for me, not sure what to do about that.
o
it's not
alright, stop now suddenly worked
e
👀 oh heck yeah
🤞🏼 a new deployment just works then
o
it's building, let's see if it gets stuck or not
alright, it's running again
this might still be happening though, can't tell because it's not consistent
e
nice! Just as I seem to hit that one again myself x.x. Time to do the dance.
yeah, the logs... are odd. Sometimes stuff is missing, sometimes it's there
o
and since I can't modify the tracing setup without expanding any macros, I can't even put them anywhere else
k
We had a report of missing debug logs last week as well: (which should also be viewable), so there seems to be a bug here. We'll try to take a look at this next week.