cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

"Can't login to databricks socket is closed" when using vsCode Extension

PaulStuart
New Contributor

hello there.  I am experiencing a problem using the Databricks Extension with Visual Studio Code, and I wonder if anyone else has experienced this.

First, I have installed the databricks cli, and configured some profiles using tokens.  Those profiles and tokens are stored in the .databrickscfg file.  I can connect successfully to a databricks workspace, like this :

databricks fs ls dbfs:/ --profile DEV
FileStore
databricks-datasets
databricks-results
mnt
tmp
user

However, when I run vsCode from the same directory and activate the same python environment, and then connect to the very same databricks profile, using the Databricks Extension, I get this error :

"Can't login to databricks socket is closed"

I can connect with databricks, as described, so this can't be any kind of physical access issue. It' seems particular to the Databricks Extension itself.  I'm using the 1.0.0 Databricks extension and vsCode 1.79.  The problem is reproducible by other people in my organisation, so I don't think it's peculiar to my windows config either.

Does anyone have any ideas?

 

 

1 REPLY 1

nkls
New Contributor II

I finally solved it!
I had the same error code as you.
Running Databricks Extension v1.1.1, vscode 1.79 on Windows 10.

I'm behind a company proxy and the main issue was that vscode didn't have proxy support enabled as default.
Adding this to my settings.json file in vscode:

"http.proxySupport":"on",
"http.proxy": "http://<company-webproxy>:<port>",

I got inspired from here:
https://gist.github.com/PSJoshi/0831f635f9f5a7b9c602b80fbbf3125a#setting-up-proxy-support

I hope this helps!

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.