cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
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 ACCEPTED SOLUTION

Accepted Solutions

nkls
New Contributor III

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!

View solution in original post

1 REPLY 1

nkls
New Contributor III

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!

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group