Solved: Error creating GRPC channel: Unable to establish connection to server

Description

i am unable to run a sample ASR script:

# riva_asr_client --audio_file=/opt/riva/wav/en-US_sample.wav

I0816 19:24:04.333242 9 riva_asr_client.cc:434] Using Insecure Server Credentials

Error creating GRPC channel: Unable to establish connection to server. Current state: 3

Exiting.

Environment

TensorRT Version:
GPU Type: A100
Nvidia Driver Version: 510.73.08
CUDA Version: 11.6
CUDNN Version:
Operating System + Version: Ubuntu 22.04.1 LTS
Python Version: Python (if applicable): 3.10.4
TensorFlow Version (if applicable):
PyTorch Version (if applicable):
Baremetal or Container (if container which image + tag):

...more details...

Relevant Files

Steps To Reproduce

I simply followed the quickstart for local deployment:

…/deeplearning/riva/user-guide/docs/quick-start-guide.html

…when i get to the “sample asr” script, I see there is a security / SSL issue.

i assume I need to generate some kind of ssl.crt, but unsure of the process.

Please advise.

Thank you kindly,

Shea

PS/EDIT:

I see this:

Usage: riva_asr_client
–audio_file=
–automatic_punctuation=<true|false>
–max_alternatives=
–word_time_offsets=<true|false>
–riva_uri=<server_name:port>
–num_iterations=
–num_parallel_requests=
–print_transcripts=<true|false>
–output_filename=
–output-ctm=<true|false>
–verbatim_transcripts=<true|false>
–language_code=<bcp 47 language code (such as en-US)>
–boosted_words_file=
–boosted_words_score=
–ssl_cert=

OK, so I assume my sample run script should look like this:

riva_asr_client --audio_file=/opt/riva/wav/en-US_sample.wav --ssl_cert=/ssl/server.crt

which is different than noted:

If using SSL/TLS, ensure to include the -- ssl_server_cert /ssl/server.crt option.

In any event, the response was as follows:

/work# riva_asr_client --audio_file=/opt/riva/wav/en-US_sample.wav --ssl_cert=/ssl/server.crt

Error creating GRPC channel: File /ssl/server.crt does not exist

Exiting.

So I generated a self-signed certificate, and referenced this in the config.sh:

# Specify paths to SSL Key and Certificate files to use TLS/SSL Credentials for a secured connection.
# If either are empty, an insecure connection will be used.
# Stored within container at /ssl/servert.crt and /ssl/server.key
# Optional, one can also specify a root certificate, stored within container at /ssl/root_server.crt
ssl_server_cert="/etc/ssl/certs/server.crt"
ssl_server_key="/etc/ssl/private/server.key"
ssl_root_cert=""

…and ran my sample script again - with the new path to my self-signed cert:

riva_asr_client --audio_file=/opt/riva/wav/en-US_sample.wav --ssl_cert=/etc/ssl/certs/server.crt

But I get the same response from the client:

/work# riva_asr_client --audio_file=/opt/riva/wav/en-US_sample.wav --ssl_cert=/etc/ssl/certs/server.crt

Error creating GRPC channel: File /etc/ssl/certs/server.crt does not exist

Exiting.

Hmmm… any thoughts?

Thank you again.


Hi,

This looks more related to RIVA. We are moving this post to the Riva forum to get better help.

Thank you.

1 Like

Hi @NSDB

Thanks for your interest in Riva

The reason for the error is after running
bash riva_start_client.sh
It logs in into the container, so the commands are executed in the container, so the container will not be aware of the local file system
Your SSL certificate will be in the local file system i guess
You can move the ssl certificate to the container using docker cp

Also having an SSL certificate is not mandatory/required, we can run without it,
Please perform the below actions

  1. bash riva_clean.sh
  2. Leave the ssl_server_cert and ssl_server_key as empty string (like below image) in config.sh

and try the installation again (from bash riva_init.sh), and let us know if you were able to proceed without any issues

Thanks