Tableau not able to connect to Dremio

I am trying to open .tds from Tableau created from datasets on localhost:9047 and tableau asks for user name and password. I enter it and Tableau executes query for couple of minutes and gives error. I have installed ODBC Driver as instructed on Dremio.com. Only place I can see the Tableau errors is on tableau desktop logs:

{“ts”:“2019-02-17T09:11:12.277”,“pid”:93003,“tid”:“16e19d4”,“sev”:“info”,“req”:“-”,“sess”:“-”,“site”:“-”,“user”:“-”,“k”:“connection-info”,“v”:{“info”:“Connect: ConnectString: PORT=31010;DATABASE=DREMIO;UID=xxxxxx;PWD=********;DRIVER={Dremio Connector};AUTHENTICATIONTYPE=Basic Authentication;CONNECTIONTYPE=Direct;HOST=localhost”},“ctx”:{“client-type”:“desktop”,“procid”:“84382”,“tid”:“23971620”,“version”:“20191.19.0126.2241”}}

{“ts”:“2019-02-17T09:11:09.930”,“pid”:87853,“tid”:“16de614”,“sev”:“warn”,“req”:“-”,“sess”:“-”,“site”:“-”,“user”:“-”,“k”:“msg”,“v”:“ODBCProtocolImpl::Connect: Error: Unable to connect.”,“ctx”:{“client-type”:“desktop”,“procid”:“84382”,“tid”:“23971619”,“version”:“20191.19.0126.2241”}}
{“ts”:“2019-02-17T09:11:09.937”,“pid”:87853,“tid”:“16de614”,“sev”:“warn”,“req”:“-”,“sess”:“-”,“site”:“-”,“user”:“-”,“k”:“database-error”,“v”:{“error-records”:[{“error-desc”:“[Dremio][Connector] (20) Failure occurred while trying to connect to local=localhost:31010. (Details: [30001]Connection failure. Host:localhost port:31010. Error: Operation timed out.)”,“error-record”:1,“native-error”:20,“sql-state”:“08S01”,“sql-state-desc”:“SQLSTATE_COMMUNICATION_LINK_FAILURE”}],“file”:“/Volumes/build/builds/tableau-2019-1/tableau-2019-1.19.0126.2241/modules/connectors/tabmixins/main/db/ODBCProtocolImpl.cpp”,“line”:5157,“protocol”:“7f8d1b832800”,“retcode”:-1,“retcode-desc”:“SQL_ERROR”},“ctx”:{“client-type”:“desktop”,“procid”:“84382”,“tid”:“23971619”,“version”:“20191.19.0126.2241”}}`

I see the ports are open through command line(telnet localhost 31010) and also through the Mac Network Utility port scanner.

There are two locations on Mac for odbc.ini (/Library/Dremio/ODBC/Setup and /Library/ODBC/odbc.ini)

[ODBC Data Sources]
Dremio Connector = Dremio Connector

[Dremio Connector]
Description=Dremio Connector
Driver=/Library/Dremio/ODBC/lib/libdrillodbc_sbu.dylib
ConnectionType=Direct
HOST=localhost
PORT=31010
#ZKQuorum=[Zookeeper Quorum]
#ZKClusterID=[Cluster ID]
AuthenticationType=Plain
UID=xxxxxx
PWD=xxxxxx
DelegationUID=
AdvancedProperties=CastAnyToVarchar=true;HandshakeTimeout=5;QueryTimeout=180;TimestampTZDisplayTimezone=utc;NumberOfPrefetchBuffers=5;
Catalog=DREMIO
Schema=
SSL=0
DisableHostVerification=0
DisableCertificateVerification=0
TrustedCerts=/Library/Dremio/ODBC/lib/cacerts.pem
UseSystemTrustStore=0
UseExactTLSProtocolVersion=0`

Please help.

Thanks.

Well… After many tries, I changed localhost to 127.0.0.1 and now I am able to connect.