Looker Community

Connecting Looker to BigQuery through a web proxy

Some on-prem customers running secure networks will require all outbound web requests go through a proxy.

Because the Looker database requests to BigQuery are made through REST calls to https://www.googleapis.com/ additional proxy settings needs to be configured.

In the looker start up script, add these two lines at the top of the 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=|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.

If you receive a generic connection error like

Cannot connect: Exception 'Connection refused (Connection refused)' connecting to Bigquery. Please check your oauth user credentials.

Please, verify that your web proxy is allowing all the required connections (e.g. accounts.google.com).

If you’re using a forward proxy in front of Looker, the following outbound connections should be allowed at a minimum:

accounts.google.com:443 www.googleapis.com:443 ping.looker.com:443 license.looker.com:443