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

[Question] App crashes, where can I find the nginx log files for that specific app ? #754

Closed
Ratatinator97 opened this issue Jul 8, 2020 · 1 comment
Labels

Comments

@Ratatinator97
Copy link

Ratatinator97 commented Jul 8, 2020

Hello all !
I have a running NestJS (Nodejs + Typescript) API. It works well but one specific endpoint (/auth/signup).
Here is the App logs Caprover gives me :

2020-07-08T14:51:43.404696925Z [Nest] 17   - 07/08/2020, 2:51:43 PM   [NestApplication] Nest application successfully started +6ms
2020-07-08T14:51:43.407224160Z [Nest] 17   - 07/08/2020, 2:51:43 PM   [bootstrap] Application listening on port 3000
2020-07-08T14:51:58.557548594Z
2020-07-08T14:51:58.557624917Z > pictalk@0.0.1 start:prod /app
2020-07-08T14:51:58.557632355Z > NODE_ENV=production node dist/main
2020-07-08T14:51:58.557636438Z 
2020-07-08T14:51:59.929212347Z [Nest] 17   - 07/08/2020, 2:51:59 PM   [NestFactory] Starting Nest application...
2020-07-08T14:52:00.099298593Z [Nest] 17   - 07/08/2020, 2:52:00 PM   [InstanceLoader] TypeOrmModule dependencies initialized +171ms
2020-07-08T14:52:00.225406944Z Node environment is : production
2020-07-08T14:52:00.228636914Z [Nest] 17   - 07/08/2020, 2:52:00 PM   [RoutesResolver] AuthController {/auth}: +8ms
2020-07-08T14:52:00.232889166Z [Nest] 17   - 07/08/2020, 2:52:00 PM   [RouterExplorer] Mapped {/auth/signup, POST} route +4ms
2020-07-08T14:52:00.248153725Z [Nest] 17   - 07/08/2020, 2:52:00 PM   [NestApplication] Nest application successfully started +4ms
2020-07-08T14:52:00.250093472Z [Nest] 17   - 07/08/2020, 2:52:00 PM   [bootstrap] Application listening on port 3000

We can see that the app restarts automatically and silently. I don't know what is the problem.. I tried to debug with my localhost setup and all works just fine, I think it's maybe because of NGINX.
Where can I find the NGINX detailed logs ???

Thx a lot :)

@githubsaturn
Copy link
Collaborator

githubsaturn commented Jul 8, 2020

You can get nginx logs via

docker service logs captain-nginx --since 10m

and you can get your own apps logs from

docker service logs srv-captain--yourappname --since 10m

The commands above only return the last 10 minutes. Feel free to change the time span.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants