2 years ago
Every time I upload the application the container closes
----
[Nest] 15 - 11/07/2024, 4:04:15 AM LOG [NestFactory] Starting Nest application...
--
[Nest] 15 - 11/07/2024, 4:04:15 AM LOG [InstanceLoader] ConfigHostModule dependencies initialized +13ms
--
[Nest] 15 - 11/07/2024, 4:04:15 AM LOG [InstanceLoader] ConfigModule dependencies initialized +0ms
--
[Nest] 15 - 11/07/2024, 4:04:15 AM LOG [InstanceLoader] AppModule dependencies initialized +0ms
--
[Nest] 15 - 11/07/2024, 4:04:15 AM LOG [NestApplication] Nest application successfully started +11ms
--
[Nest] 15 - 11/07/2024, 4:04:15 AM LOG [TcpService] Servidor TCP escutando em :::5432
--
container event container died
--
npm ERR! path /app
--
npm ERR! command failed
--
npm ERR! signal SIGTERM
--
npm ERR! command sh -c node dist/main
--
--
npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-11-07T04_02_30_420Z-debug-0.log
12 Replies
2 years ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open brody • over 1 year ago
2 years ago
That would be the previous container exiting so that the new one can come online.
While that error message does not harm functionality, to avoid it you can update your start command to use node directly, e.g., node dist/index.js
Additionally, you have a TCP Proxy on the service pointed to the port commonly used for Postgres, instead of a domain, may I ask why?
2 years ago
it's just a random port, i even changed it to 5027 but still i can't make calls to the server
2 years ago
the idea is to have a simple api that receives tcp connections
2 years ago
Please remove the TCP Proxy and add a domain to the service that points to the correct port, not a random port.
https://docs.railway.app/guides/public-networking#target-ports
2 years ago
but why remove the tcp proxy?
I will send a request via tcp, my equipment must connect via this address and port that I defined
2 years ago
yes I'm sure!
2 years ago
I did this, but I still can't connect. Can you see what's happening? What's the error? Because I only get a bad request, as if it didn't accept a TCP connection?
2 years ago
How do you know you've pointed it to the correct port?
Are you listening on 0.0.0.0 ?
2 years ago
Yes, I am listening on 0.0.0.0, and I set the port to 5027, then I went to the Railway panel and set the TCP proxy, and it generated this for me:
junction.proxy.rlwy.net:57845 -> :5027
In the client that should connect, I set the IP junction.proxy.rlwy.net and port: 57845,
But when I try to connect, I can't.
2 years ago
Sorry, I don't really know what to tell you, you have something miss configured somewhere.