D
Dokploy•6mo ago
Sang Dang

Logs show nothing

I tried to redeploy, restarted. Still the same. It is the NestJS server and it works well before. Still don't know what cause it.
No description
29 Replies
Siumauricio
Siumauricio•6mo ago
what browser are you using?
Sang Dang
Sang DangOP•6mo ago
Firefox
Sang Dang
Sang DangOP•6mo ago
Dokploy: Version: v0.12.0
No description
Sang Dang
Sang DangOP•6mo ago
OK I see the logs now. But I do nothing. I guess it has some huge delay?
Aron
Aron•6mo ago
If you open the logs page and open the browser developer tools. Go to "Network". You should have websocket connections. Do they show, do you see failed websocket connections or anything of that kind?
No description
Sang Dang
Sang DangOP•6mo ago
I see only http, no ws
Uncaught (in promise) IntegrationError: Missing value for Stripe(): apiKey should be a string.
Uncaught (in promise) IntegrationError: Missing value for Stripe(): apiKey should be a string.
and this error
Piyush Dixit
Piyush Dixit•6mo ago
Why can't I see more than 1000 log lines?
Aron
Aron•6mo ago
This error can be ignored. There should be websocket connections because that's how the logs get communicated. Dokploy spawns a shell, executes the terminal command docker container logs --tail ${tail} --follow ${containerId} and relays the output over the websocket. So if you have no websocket connections at all in the network tab you won't see any logs. If you do see logs on your screen, there has to be a websocket connection. I thought it was because of performance reasons but i'm seeing that the logs get rendered on the fly while scrolling. It seems like a bug. Maybe the xterm package is the limiting factor here, i'm not sure. It seems like the scrollback buffer can be set for xterm. Which is unset in Dokploy defaulting it to 1000
Piyush Dixit
Piyush Dixit•6mo ago
I have found one more issue, If i deploy any app using docker compose, And run it till 2000+ log lines (as per my app code), then stop the container, and redeploy again after changing some codo line, I can still see old logs,but if you are using any other builder like Heroku, nixpack etc and do as i said above, No old log will be available because after stopping the container, Dokploy deletes the container, so we can see old logs.
Aron
Aron•6mo ago
You want to retain the old logs, you mean?
Piyush Dixit
Piyush Dixit•6mo ago
Yes
Sang Dang
Sang DangOP•6mo ago
then please create a new thread, this is about the connection
Aron
Aron•6mo ago
This is a feature request. Would require changing the way logs work.
Sang Dang
Sang DangOP•6mo ago
it is still not related to my issue (bug), that the connection to show logs is not established
Aron
Aron•6mo ago
But you said you are getting logs eventually right?
Piyush Dixit
Piyush Dixit•6mo ago
My app has been running for 15+ days, I want logs from the beginning. Currently I'm using SFTP to get log files.
Aron
Aron•6mo ago
Create a new thread and @ me
Sang Dang
Sang DangOP•6mo ago
it just show once on one service (frontend) and never shows on backend Nestjs
Piyush Dixit
Piyush Dixit•6mo ago
Only the latest 1000 log lines. After redeployment, old logs are deleted. Ok
Aron
Aron•6mo ago
I was replying to Sang Dang. Please make a new thread 😉 So the application is running properly. But your logs are not loading? Or is there more going on that is incorrect. I run my Nestjs applications on Dokploy too.
Sang Dang
Sang DangOP•6mo ago
yes the app run ok, only log is empty, I tried to turn off every extension but look like it has no effect
Aron
Aron•6mo ago
Okay, one moment.
Aron
Aron•6mo ago
If you check like I check here. You can not find a websocket connection?
Aron
Aron•6mo ago
(ignore that it's Nextjs. it's my frontend for my Nestjs app)
Sang Dang
Sang DangOP•6mo ago
thank you, let me check that way ok I can see it now I still not sure which cause it. Thanks for the helps anyway.
Aron
Aron•6mo ago
It gets pretty complicated pretty quickly (sadly). If you see a websocket connection and it connects, but you see no output. Something is acting weird. There can be a myriad of reasons for stuff not showing correctly.
Sang Dang
Sang DangOP•6mo ago
I agree. Logs are hard. Providing tool for general and each service/app has different taste of how to work with logs make it harder. 🫂
Sang Dang
Sang DangOP•6mo ago
I can see my log pop up, still don't know why all the debug messages are not shown, but at least sth was up
No description
Sang Dang
Sang DangOP•6mo ago
I will keep an eye on this issue and let you know if I found out anything

Did you find this page helpful?