Two grpc servers in same RAY

Hi all!

I’m trying to deploy two grpc applications in ray. The deploy is made separately and each one has its own deploy code. In both of them I’m starting serve using this function:

    serve.start(
        address=0.0.0.0,
        grpc_options=gRPCOptions(
            port=9000,
            grpc_servicer_functions=grpc_servicer_functions,
        ),
    )

but with different port (9000 and 9001) for each deploy. Both services were deployed in ray, I see them in the dashboard with healthy status, however, when I tried to do some requests I’ve only got correct answer for the first deployed application (no matter which is it, I’ve tried with both), in the other I’ve got this:

    raise _InactiveRpcError(state)  # pytype: disable=not-instantiable
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
        status = StatusCode.UNAVAILABLE
        details = "failed to connect to all addresses; last error: UNKNOWN: ipv4:0.0.0.0:9001: Failed to connect to remote host: Connection refused"
        debug_error_string = "UNKNOWN:failed to connect to all addresses; last error: UNKNOWN: ipv4:0.0.0.0:9001: Failed to connect to remote host: Connection refused {grpc_status:14, 
created_time:"2023-12-17T10:22:54.529417093+01:00"}"

After some research I’ve found out that there exists only one grpc service up (I’ve seen that in the dashboard, in the ProxyActor logs) so, I’m thinking that, doing the things in the way that I’ve done I’ll only have one grpc server, which is the server associated to the first application I’ve deployed, this is why the first deployed app worked correctly and the second one fails.

What is my error? what is the correct way to deploy two different grpc servers in the same ray?

Thank you in advance!!