1

I am trying to follow tutorial of Kubernetes but I am kinda lost on first steps when trying to use Katacoda... When I just try to open minikube dashboard I encounter error:

failed to open browser: exec: "xdg-open": executable file not found in $PATH

and dashboard itself remains unavailable when I try to open it through host 1.

Later steps like running hello-world work fine and I am able to run it locally using my own minikube instance but I am a bit confused with this issue. Can I debug it somehow to access dashboard during course? This is particularly confusing because I am a bit afraid that I might encounter same or similar issue during potential exam that also runs online...

Katacoda issue

kenorb
  • 155,785
  • 88
  • 678
  • 743
Tomasz Kapłoński
  • 1,320
  • 4
  • 24
  • 49
  • Which course did you try? Is it still occurring? – Crou Mar 04 '19 at 12:05
  • Yes, it's still happening but I created an issue in related github project (https://github.com/kubernetes/website/issues/12942) – Tomasz Kapłoński Mar 08 '19 at 13:02
  • 1
    Apparently, katacoda environment doesn't have default browser to follow a dashboard link. To fix it: 1. Install xdg utils `apt install xdg-utils` 2. Install any cli browser, i.e. links2 `apt install link2` – A_Suh Mar 11 '19 at 10:19

3 Answers3

3

Founder of Katacoda here. When running locally, then xdg provides the wrapper for opening processes on your local machine and installing the package would resolve the issue. As Katacoda runs everything within a sandbox, we cannot launch processes directly on your machine.

We have added an override for xdg-open that displays a friendly error message to users. They'll now be prompted to use the Preview Port link provided. The output is now:

$ minikube dashboard
* Verifying dashboard health ...
* Launching proxy ...
* Verifying proxy health ...
* Opening %s in your default browser...
Minikube Dashboard is not supported via the interactive terminal experience.

Please click the 'Preview Port 30000' link above to access the dashboard.
This will now exit. Please continue with the rest of the tutorial.
X failed to open browser: exit status 1
Ben Hall
  • 1,927
  • 5
  • 25
  • 39
0

Looks like this command works:

apt install xdg-utils
Varun Chandak
  • 943
  • 1
  • 8
  • 25
0

I have been following the same tutorial in Katacoda and had the same issue.In my case, using these commands helpt me to solve the problem :

apt-get update

apt install xdg-utils

Adnelk
  • 1
  • 1