Knowledge Drop

BIGQUERY (Error): Cannot Connect (Connection Refused) on BigQuery


Userlevel 3

Last tested: Dec 21, 2020
 

Note: This card only applies to BQ connections going through a proxy. For connection refused in all other scenarios, see this post

This article explains that this error can be caused by a proxy. If you host your own instance, then we'll want to make sure that Looker is allowed to talk to BigQuery.

First, make sure that these outbound connections are allowed:

accounts.google.com:443

www.googleapis.com:443

ping.looker.com:443

license.looker.com:443

 

Next, let's make sure that Looker's REST calls to BigQuery are going through the proxy. You can ensure this by adding the following two lines to the very top of your startup script:

unset http_proxy unset https_proxy

 

Then, modify the JAVAARGS variable to include these 5 arguments.

JAVAARGS="-Dhttp.proxyHost=myproxy.example.com -Dhttp.proxyPort=8080 -Dhttp.nonProxyHosts=127.0.0.1|localhost -Dhttps.proxyHost=myproxy.example.com -Dhttps.proxyPort=8080"

 

The first two variables make sure that JRuby calls (both for http and https) go through the proxy.
The third variable make sure that Looker's API calls to itself don't go through the proxy.
The last two variables make sure that REST calls to Google BigQuery go through the proxy.

 

This content is subject to limited support.                

 

 


0 replies

Be the first to reply!

Reply