a year ago
Hi,I am trying to use gRPC on a project using NestJS.
Currently I have two groups, the two groups have the same structure. One service for API Gateway and another that is the microservice.
And both have the same problem. No connection.
ERROR [ExceptionsHandler] 14 UNAVAILABLE: No connection established
The group named ket I set a proxy from a template to try to make the connection and not work.
And the group named austin is only to test a direct connection from api gateway to microservice.
3 Replies
a year 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.
a year ago
This is an application level issue so I've flagged it for the community. You'll probably have to Google stuff about Nest or gRPC as this isn't a Railway specific issue
Status changed to Solved railway[bot] • about 1 year ago
a year ago
I've already search a lot of information on internet but I don't find any solution and that's why I am reaching you directly.
Currently I am trying to communicate with gRPC between a gateway and a microservice that are progremmed on NestJS, but I have an error of connection because both services are separated and I want to know how can I make the connection.Can you help me with the configurations please?
I don't know exactly how to do it. This is my code:
On API Gateway I have the configuration like this:
ClientsModule.register([
{
name: AUTH_SERVICE,
transport: Transport.GRPC,
options: {
url: `${process.env.PROXY}`,
package: AUTH_PACKAGE_NAME,
protoPath: join(__dirname, '../auth.proto'),
},
},
]),
My microservice is in this way:
const app = await NestFactory.createMicroservice<MicroserviceOptions>(
AuthModule,
{
transport: Transport.GRPC,
options: {
url: `${process.env.PROXY}`,
protoPath: join(__dirname, '../auth.proto'),
package: AUTH_PACKAGE_NAME,
},
},
);
And in my process.env.PROXY I have the value of a proxy that I installed from a template. Which is attached on the message.I am getting the error of connection what should I do then?
Attachments