Why NestJS microservice runs on TCP, meanwhile API gateway runs on TCP6

84 Views Asked by At

I'm trying to connect my Nestjs microservice to the API gateway but from what I see with command: netstat -tunlp The API gateway runs on: tcp6 0 0 :::3000 :::* LISTEN 55235/node

Meanwhile the microservice: tcp 0 0 0.0.0.0:3100 0.0.0.0:* LISTEN 55225/node

When I try to log the client on the API gateway I get this:

1|api  | ClientTCP {
1|api  |   routingMap: Map(0) {},
1|api  |   logger: Logger { context: 'ClientTCP', options: {} },
1|api  |   isConnected: false,
1|api  |   port: 3100,
1|api  |   host: 'localhost',
1|api  |   socketClass: [class JsonSocket extends TcpSocket],
1|api  |   serializer: IdentitySerializer {},
1|api  |   deserializer: IncomingResponseDeserializer {},
1|api  |   onApplicationShutdown: [Function: close]
1|api  | }

Could the TCP/TCP6 be the issue? If yes, how could I bypass this?

I was hoping for it to connect to the microservice, but nothing happens.

0

There are 0 best solutions below