If the port is in use, an error is output into the console (see below) BUT it doesn't throw a catchable error in the application. Is this supposed to be like this?
I mean I have a microservice that appears to be working but in fact the port is in use but I can't seem to try / catch or anything to be able to log this ?
or even if the nestjs failed to start would be ok.
[Nest] 56069 - 01/01/2021, 10:26:41 [NestMicroservice] Nest microservice successfully started +104ms
E0101 10:26:41.353448000 4479000064 server_chttp2.cc:40] {"created":"@1609493201.353423000","description":"No address added out of total 1 resolved","file":"../deps/grpc/src/core/ext/transport/chttp2/server/chttp2_server.cc","file_line":394,"referenced_errors":[{"created":"@1609493201.353422000","description":"Failed to add port to server","file":"../deps/grpc/src/core/lib/iomgr/tcp_server_custom.cc","file_line":404,"referenced_errors":[{"created":"@1609493201.353414000","description":"Failed to listen to port","file":"../deps/grpc/src/core/lib/iomgr/tcp_uv.cc","file_line":72,"grpc_status":14,"os_error":"address already in use"}]}]}
[2021-01-01T10:26:41.419] [INFO] Main::Bootstrap - gRPC ready and listening on port 3010
[Nest] 56069 - 01/01/2021, 10:26:41 [RoutesResolver] MainNetController {}: +135ms
[Nest] 56069 - 01/01/2021, 10:26:41 [RoutesResolver] StnController {}: +0ms
I am listening!
[Nest] 56069 - 01/01/2021, 10:26:41 [NestApplication] Nest application successfully started +3ms
In a standard http app (using express) then it throws an errors and fails - which is good as this can be restarted right ?
Or am I missing something ?
Environment
Nest version: 7.4.4.
For Tooling issues:
- Node version: 14
- Platform: Mac big sur
Bug Report
Current behavior
Very simple to reproduce.
Some kind to start listening
If the port is in use, an error is output into the console (see below) BUT it doesn't throw a catchable error in the application. Is this supposed to be like this?
I mean I have a microservice that appears to be working but in fact the port is in use but I can't seem to try / catch or anything to be able to log this ?
or even if the nestjs failed to start would be ok.
In a standard http app (using express) then it throws an errors and fails - which is good as this can be restarted right ?
Or am I missing something ?
Environment