KNOWLEDGE BASE

Unable To Connect To Amazon Athena By Generic JDBC Connection From Tableau Server When The Proxy Environment Is Different From Tableau Desktop


Published: 19 Nov 2020
Last Modified Date: 19 Nov 2020

Issue

When there are different proxy servers used/configured for Tableau Server and Tableau Desktop environment, the connection defined by a generic JDBC may fail.

Note:
In environment where multiple workgroups/db are used, using JDBC connection with the steps described below is the only option since you can only define single workgroup via athena.properties.

Environment

  • Tableau Server 
  • Tableau Desktop
  • Amazon Athena

Resolution

Option 1: Please use Amazon Athena connection instead of JDBC connection.       ​​​​​​
As several keys related to proxy settings are provided to define in athena.properties, please define these keys in athena.properties and located the file in the following directories.

   ProxyHost=<proxy hostname or IP address>
   ProxyPort=<the port proxy server uses>
   NonProxyHosts=<when connecting this hostname, DO NOT go through the proxy>

 For Tableau Desktop:  ...\My Tableau Repository\Datasources.
 For Tableau Server: ...\Tableau Server Data Directory\tabsvc\vizqlserver\Datasources.

Option 2
: When you have to use JDBC connection, please try the following steps.

Step 1. Define the system proxy when connecting from Tableau Desktop. There are several ways to define the system proxy, and please choose any one of these ways.

   1-1: Define the system proxy in the Internet Option. Please follow the steps below.
   Tableau Fails To Connect to Amazon Athena through Proxy With Error Code 37CE01A3

   1-2: Define the system proxy information by adding java options to the Tableau Desktop application. 
 
    --java-options=-DproxySet=true;-DproxyHost=<Proxy Hostname>;-DproxyPort=<Proxy Port>  

   Similar steps are described below.
   Tableau Prep Cannot Connect to Tableau Online When Proxy is Configured

   1-3: Define the system proxy information in the environment variable.
   
  Variable Name: JAVA_TOOL_OPTIONS
  Variable Value: -Dhttp.useProxy=true -Dhttps.proxyHost=<Proxy Hostname> -Dhttp.proxyPort=<Proxy Port>

Step 2. Open Tableau Desktop and define the connection from Other Database (JDBC). Remember to upload a Properties File which included the proxy settings on Tableau Server side if another proxy server is being used. This properties file could be omitted if no proxy server is used on Tableau Server side.

   ProxyHost=<proxy hostname used on Tableau Server side>
   ProxyPort=<proxy port used on Tableau Server side>

Step 3. Connect to tables and publish the data source to Tableau Server.

  

Cause

  • athena.properties is not valid for a connection defined by generic JDBC. It is only valid for a connection defined by Amazon Athena.
  • The proxy used on Tableau Server or Tableau Desktop side, should all be clarified via the above methods.

Additional Information

In some environment where multiple workgroups are used, JDBC connections cannot be replaced by Amazon Athena connection since you can only define one primary workgroup in athena.properties file by using "Workgroup" key.
Using JDBC connection, however, you can define each workgroup in each JDBC connection and the workgroup name can be defined as part of URL to achieve connecting to multiple workgroups/db.
 
Did this article resolve the issue?