Search code examples
google-speech-apigoogle-cloud-speech

Error: 14 UNAVAILABLE: Connect Failed with Google Speech API


We have a NodeJS based Google Cloud Speech API component, which works fine in many environments, but in a particular environment, we are getting below error.

Error: 14 UNAVAILABLE: Connect Failed

Any pointers where the issue is. We have a doubt this is related to connectivity, but how to confirm this?


Solution

  • I think the tests you did about enabling *.googleapis.com, speech.googleapis.com, oauth2.googleapis.com confirm that traffic is blocked in your end. Such google endpoints should remain accessible to request the Speech service.

    I hope that the following recommendations help you:

    1. Traffic blocked by Proxy. The link you referenced should work, just check the section NodeJS google-cloud-node. If you are using a programming language will need to set them up properly, this is a Java example.

    2. Traffic blocked by Firewall. It is a bit more challenging due to involve Google Cloud IPs and they usually change. In such case you can find out those IPs with the command dig _netblocks.google.com txt and configure them in your firewall to allow the traffic.

    This question is also related to yours: What is the Endpoint/Port used for Google Cloud Speech API.