Showing results for 
Search instead for 
Did you mean: 

Databricks-connect configured with service principal token but unable to retrieve information to local machine

Not applicable

installed databricks-connect and configured with service principal token, able to start cluster when I use command spark=SparkSession\.builder\.getOrCreate() But when trying to retrieve s3 bucket data to local machine or even i run test command example print(spark.range(100).count())

receiving error message as "invalid token"

py4j.protocol.Py4JJavaError: An error occurred while calling o22.range.

: com.databricks.service.SparkServiceConnectionException: Invalid token

Databricks-connect version is 10.4.18

python -3.8.10

java - openjdk version "1.8.0_352"

it was working fine weeks ago but now it's not working. Double checked token is correct and not expired. Anyone, Please guide me with this?


Community Manager
Community Manager

Hi @divya08(Customer), ensure you have a stable network connection and that no firewalls or proxy settings could block the connection.

If you still encounter issues after following these steps, you might want to consult Databricks support team for further assistance.

Not applicable

Hi @divya08

Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help. 

We'd love to hear from you.


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.