cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Warehousing & Analytics
Engage in discussions on data warehousing, analytics, and BI solutions within the Databricks Community. Share insights, tips, and best practices for leveraging data for informed decision-making.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Vizro Dashboarding in Databricks

jacobzeb
New Contributor II

I am attempting to create a Vizro dashboard in a databricks notebook. I have validated that the code to generate dashboard works is accessible when running the notebook on my local machine. However, when attempting to compile the dashboard on a databricks notebook, I am met with the following message: "This site can't be reached". Has anyone else experienced this, and can help solve this problem?

2 REPLIES 2

jacobzeb
New Contributor II
 

mark_ott
Databricks Employee
Databricks Employee

This issue is common when attempting to run interactive dashboards (such as Vizro or Plotly Dash) within Databricks notebooks; many users face the "This site can't be reached" message because the dashboard tries to launch a local web server on an address like http://127.0.0.1:8050/โ€”which works on a local machine but is not accessible from a Databricks cloud notebook environment.โ€‹

Why This Happens

  • Cloud-managed notebook environments (Databricks, Azure Databricks, AWS SageMaker, etc.) run code on remote servers and do not expose localhost (127.0.0.1) web servers to your browser. When a dashboard is launched, its web server starts inside the cluster or notebook container, but connections to localhost only work if both server and browser are on the same machineโ€”which is not the case with Databricks.โ€‹

  • Even for frameworks designed with remote-first architectures (e.g., Dash), special configuration or enterprise solutions are required to expose the dashboard port via a secure proxy.โ€‹

Workarounds and Solutions

  • Direct Databricks Visualization: Use Databricks' built-in visualization features (display(pandas_dataframe)) and design dashboards within Databricks itself instead of custom Python dashboards, if possible.โ€‹

  • Proxying Solutions: In some enterprise setups, Dashboards can be exposed using Databricks' driver-port proxy URL formats, such as /l/driver-proxy/o/0/cluster-id/port. However, changes in Databricks environment/API can break these proxy routes, so you may need to consult your platform administrator or documentation for up-to-date methods.โ€‹

  • Deploy Externally: Consider deploying the Vizro dashboard to an external service such as Hugging Face, Ploomber Cloud, Dash Enterprise, or on your own VM/server, and then access it via a public URL. This is the best way to ensure robust dashboard delivery in production settings.โ€‹

  • Check Networking & DNS: Ensure your cluster's DNS settings and internal network allow dashboard traffic, though in most managed environments, exposing arbitrary dashboard ports is restricted by design for security.โ€‹

Recommendations

  • For reliable, shareable dashboards, deploy Vizro or Dash apps to an external hosting provider rather than inside Databricks.โ€‹

  • Consult Databricks and Vizro documentation for official guidance and supported deployment patternsโ€”Databricks visualizations are designed to work "natively" within its environment, while custom Python web servers are not directly or easily exposed to browser users.

  • If you still need a workaround and have an enterprise setup, request your IT/platform admin about proxying options or enabling driver proxy URLs for dashboard access.โ€‹

This is a known limitation of cloud notebook environments; in summary, deploying Vizro dashboards in Databricks notebooks is not natively supported for interactive web dashboards, and you need to use alternative methods for public dashboard sharing or use Databricks's built-in visualization capabilities.โ€‹

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now