# Riva Virtual Assisstant launch error

**URL:** <https://forums.developer.nvidia.com/t/riva-virtual-assisstant-launch-error/200164>\
**Category:** Nemotron Speech + Riva\
**Created:** [January 11, 2022, 8:37am UTC](https://forums.developer.nvidia.com/t/riva-virtual-assisstant-launch-error/200164 "2022-01-11T08:37:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryan\_lin](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ryan\_lin](https://forums.developer.nvidia.com/u/ryan_lin)\
**Post date:** [January 11, 2022, 8:37am UTC](https://forums.developer.nvidia.com/t/riva-virtual-assisstant-launch-error/200164/1 "2022-01-11T08:37:07Z")

</div>

Hardware - GPU: DGX A100 Workstation  
Hardware - CPU:  
Operating System: Ubuntu 20.04  
Riva Version: 1.8.0-beta

Hi. I’m trying to follow the instructions on the [doc](https://docs.nvidia.com/deeplearning/riva/user-guide/docs/samples/weather.html) to run the sample application of virtual assistant.

I ran both `riva_init.sh` and r`iva_start.sh` well and made the following containers up-running:

> riva-speech:1.8.0-beta-server

and

> riva-speech-client:1.8.0-beta-samples

Afterwards, I changed `config.py` in the container and browsed `https://127.0.0.1:8009/rivaWeather/` on Firefox (version 91.0, 64 bit) as the doc instructions said, however, after submitting the first sentence on the UI, I got an error saying that there is an error during a service call.

Is there anyone who knows how to address this issue? I have no clues on what’s going wrong over here.  
Here is the error I got:

> root@93c0b2a882cb:/workspace/samples/virtual-assistant# python3 main.py  
> Server starting at : [https://0.0.0.0:8009/rivaWeather](https://0.0.0.0:8009/rivaWeather)  
> _ **Note: Currently the streaming is working with Chrome and FireFox, Safari does not support navigator.mediaDevices.getUserMedia** _  
> [Riva Chatbot] Client connected  
> [stateDM] Initializing the state machine for uid: 1  
> [1] Starting chatbot ASR task  
> [1] ASR background task started  
> [Riva Chatbot] Chatbot created with user conversation index:[1]  
> [stateDM] Executing state: initialState  
> [Riva ASR] Creating Stream ASR channel: 172.0.0.1:50051  
> [1] Response from RivaDM: {‘context’: {}, ‘text’: ‘’, ‘uid’: 1, ‘payload’: {}, ‘response’: [{‘type’: ‘text’, ‘payload’: {‘text’: ‘Hi, welcome to Riva weather service. How may I help you?’}, ‘delay’: 0}]}  
> [Riva ASR] Starting Background ASR process  
> [Riva ASR] StreamingRecognize Start  
> [1] TTS Disabled  
> [1] audio speak: 1641896536160  
> [1] Pausing ASR requests.  
> [1] Attempt at Unpausing ASR requests on REQUEST\_COMPLETE.  
> [1] ASR successfully unpaused for Request Complete  
> [stateDM] Executing state: userInput  
> [1] Pausing ASR requests.
> 
> [Riva NLU] Error during NLU request  
> [stateDM] No next state, waiting for user input  
> [1] Response from RivaDM: {‘context’: {}, ‘text’: ‘What is the weather today?’, ‘uid’: 1, ‘payload’: {}}  
> ‘response’  
> Exception in thread Thread-6:  
> Traceback (most recent call last):  
> File “/usr/lib/python3.8/threading.py”, line 932, in \_bootstrap\_inner  
> self.run()  
> File “/usr/lib/python3.8/threading.py”, line 870, in run  
> self.\_target(\*self.\_args, \*\*self.\_kwargs)  
> File “/workspace/samples/virtual-assistant/riva/chatbot/chatbot.py”, line 33, in server\_asr  
> self.asr.main\_asr()  
> File “/workspace/samples/virtual-assistant/riva/asr/asr.py”, line 180, in main\_asr  
> self.listen\_print\_loop(responses)  
> File “/workspace/samples/virtual-assistant/riva/asr/asr.py”, line 109, in listen\_print\_loop  
> for response in responses:  
> File “/usr/local/lib/python3.8/dist-packages/grpc/\_channel.py”, line 392, in **next**  
> return self.\_next()  
> File “/usr/local/lib/python3.8/dist-packages/grpc/\_channel.py”, line 561, in \_next  
> raise self  
> grpc.\_channel.\_Rendezvous: \<\_Rendezvous of RPC that terminated with:  
> status = StatusCode.UNAVAILABLE  
> details = “failed to connect to all addresses”  
> debug\_error\_string = “{“created”:”@1641896556.152911446",“description”:“Failed to pick subchannel”,“file”:“src/core/ext/filters/client\_channel/client\_channel.cc”,“file\_line”:3934,“referenced\_errors”:[{“created”:“@1641896556.152908601”,“description”:“failed to connect to all addresses”,“file”:“src/core/ext/filters/client\_channel/lb\_policy/pick\_first/pick\_first.cc”,“file\_line”:393,“grpc\_status”:14}]}"

and here is the screenshot of the application UI

 ![Riva virtual assistant error](https://global.discourse-cdn.com/nvidia/original/3X/6/3/6388282065aafca349ebc848eeb007e4096e2afe.png)

here is the screenshot of the config.py that I modified

 ![Riva virtual assistant config](https://global.discourse-cdn.com/nvidia/original/3X/7/e/7e95d97153553355c98619a92f3fe023e6b86652.png)

---

<div class="post-metadata">

**Author:** ![ryan\_lin](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ryan\_lin](https://forums.developer.nvidia.com/u/ryan_lin)\
**Post date:** [January 16, 2022, 3:45am UTC](https://forums.developer.nvidia.com/t/riva-virtual-assisstant-launch-error/200164/2 "2022-01-16T03:45:57Z")

</div>

I have also tried to use Jupiter Notebook to verify the Riva Service URL, but I still cannot figure out why the gRPC connection status\_code is still UNAVAILABLE as the following log

> Exception in thread Thread-42:  
> Traceback (most recent call last):  
> File “/usr/lib/python3.8/threading.py”, line 932, in \_bootstrap\_inner  
> self.run()  
> File “/usr/lib/python3.8/threading.py”, line 870, in run  
> self.\_target(\*self.\_args, \*\*self.\_kwargs)  
> File “/workspace/samples/virtual-assistant/riva/chatbot/chatbot.py”, line 33, in server\_asr  
> self.asr.main\_asr()  
> File “/workspace/samples/virtual-assistant/riva/asr/asr.py”, line 180, in main\_asr  
> self.listen\_print\_loop(responses)  
> File “/workspace/samples/virtual-assistant/riva/asr/asr.py”, line 109, in listen\_print\_loop  
> for response in responses:  
> File “/usr/local/lib/python3.8/dist-packages/grpc/\_channel.py”, line 392, in **next**  
> return self.\_next()  
> File “/usr/local/lib/python3.8/dist-packages/grpc/\_channel.py”, line 561, in \_next  
> raise self  
> grpc.\_channel.\_Rendezvous: \<\_Rendezvous of RPC that terminated with:  
> **status = StatusCode.UNAVAILABLE**  
> details = “failed to connect to all addresses”  
> debug\_error\_string = “{“created”:”@1642304054.650031616",“description”:“Failed to pick subchannel”,“file”:“src/core/ext/filters/client\_channel/client\_channel.cc”,“file\_line”:3934,“referenced\_errors”:[{“created”:“@1642304054.650027228”,“description”:“failed to connect to all addresses”,“file”:“src/core/ext/filters/client\_channel/lb\_policy/pick\_first/pick\_first.cc”,“file\_line”:393,“grpc\_status”:14}]}"
> 
> >

By the following command I can establish the gRPC connection and invoke Riva service successfully in Jupiter Notebook

> channel = grpc.insecure\_channel(‘localhost:50051’)

However, the virtual assistant doesn’t work when using the same URL in the config file

> samples/virtual-assistant/config.py

```auto
client_config = {
    "CLIENT_APPLICATION": "WEBAPPLICATION", # Default and only config value for this version
    "PORT": 8009, # The port your flask app will be hosted at
    "DEBUG": True, # When this flag is set, the UI displays detailed Riva data
    "VERBOSE": True # print logs/details for diagnostics
}

riva_config = {
    #"RIVA_SPEECH_API_URL": "10.110.42.153:50051", # Replace the IP & port with your hosted Riva endpoint
    #"RIVA_SPEECH_API_URL": "172.0.0.1:50051",
    "RIVA_SPEECH_API_URL": "localhost:50051",
    "ENABLE_QA": "QA unavailable in this VA version. Coming soon",
    "WEATHERSTACK_ACCESS_KEY": "xxx", # Get your access key at - https://weatherstack.com/
    "VERBOSE": True # print logs/details for diagnostics
}

asr_config = {
    "VERBOSE": True,
    "SAMPLING_RATE": 16000,
    "LANGUAGE_CODE": "en-US", # a BCP-47 language tag
    "ENABLE_AUTOMATIC_PUNCTUATION": True,
}

nlp_config = {
    "RIVA_MISTY_PROFILE": "http://docs.google.com/document/d/17HJL7vrax6FiF1zW_Vzqk9FTfmATeq5i3UemtagM8RY/export?format=txt", # URL for the Riva meta info file.
    "RIVA_MARK_KB": "http://docs.google.com/document/d/1LeRphIBOo5UyyUcr45ewvg16sCVNqP_H3SdFTB74hck/export?format=txt", # URL for Mark's GPU History doc file.    
    "QA_API_ENDPOINT": "QA unavailable in this VA version. Coming soon", # Replace the IP port with your Question Answering API
}

tts_config = {
    "VERBOSE": False,
    "SAMPLE_RATE": 22050,
    "LANGUAGE_CODE": "en-US", # a BCP-47 language tag
    "VOICE_NAME": "ljspeech",
}

```

Does anyone know what might be the potential root cause?

---

<div class="post-metadata">

**Author:** ![ryan\_lin](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ryan\_lin](https://forums.developer.nvidia.com/u/ryan_lin)\
**Post date:** [January 16, 2022, 6:37am UTC](https://forums.developer.nvidia.com/t/riva-virtual-assisstant-launch-error/200164/3 "2022-01-16T06:37:58Z")

</div>

I figured it out by myself.

When launching container, all the files inside the container will be restore to the initial state.  
It means that I have to update the `config.py` file every time after launching container service, otherwise, the context of `config.py` would restore to “10.110.42.153:50051” instead of “172.0.0.1:50051”, and that gives me a gRPC connection error with status code “Service Unavailable”.

So first, remember to update `config.py` after sample client container is launched.  
second, remember to add -`-net=host` while launching sample client container

---

<div class="post-metadata">

**Author:** ![NVES\_R](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nves_r/32/14043_2.png) [@NVES\_R](https://forums.developer.nvidia.com/u/NVES_R)\
**Post date:** [January 19, 2022, 6:13pm UTC](https://forums.developer.nvidia.com/t/riva-virtual-assisstant-launch-error/200164/4 "2022-01-19T18:13:35Z")

</div>

Hi @ryan_lin , glad you found a solution. You can also look into mounting a local folder into the docker container using the `-v` flag to `docker run` to have your changes persist if you want to avoid editing the file everytime: [Use volumes | Docker Documentation](https://docs.docker.com/storage/volumes/#populate-a-volume-using-a-container) - this is common for generic docker container usage, not specific to RIVA or anything.

---

<div class="post-metadata">

**Author:** ![ryan\_lin](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ryan\_lin](https://forums.developer.nvidia.com/u/ryan_lin)\
**Post date:** [January 20, 2022, 10:10am UTC](https://forums.developer.nvidia.com/t/riva-virtual-assisstant-launch-error/200164/5 "2022-01-20T10:10:24Z")

</div>

Thanks @NVES_R

It makes the process much easier since I have to modify multiple files for the customisation.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [February 3, 2022, 10:10am UTC](https://forums.developer.nvidia.com/t/riva-virtual-assisstant-launch-error/200164/6 "2022-02-03T10:10:43Z")

</div>

Closed on February 3, 2022, 10:10am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
