IBM Cloud Docs
Troubleshooting for IBM Cloud Shell

Troubleshooting for IBM Cloud Shell

Use these tips to help troubleshoot problems that you might run into when you use IBM® Cloud Shell.

Running into issues that you can't fix? We want to hear about it. Submit feedback about Cloud Shell through our UI. Or come chat with the development team on IBM Cloud Dev Tools Slack. After you request your invitation, sign in and join the #ask-your-question channel.

Why can't my sessions start?

When you try to start Cloud Shell or restart it after you were idle or your connection was lost, the following message is displayed:

Your session couldn't be started. or Session could not be started. Please wait for a few minutes, then restart the cloud shell and try again.

Refresh your Cloud Shell browser tab or window. If Cloud Shell still can't start, try the following possible solutions:

  • Restart from the Cloud Shell menu.
  • Check whether the IP address restriction is defined for the account or the user. If the IP address restriction is defined, add the Cloud Shell ingress IP ranges to log in from the Cloud Shell service. If the IP address restriction is not defined and you continue to see this issue, create a support case.
  • Log out of IBM Cloud®. Clear your browser cache and cookies to remove your preferences and then log in again and open Cloud Shell.
  • Check whether Concurrent sessions are set. If so, ensure that the number of logged in sessions for the account does not exceed the Limit sessions value.

Why can't I work with my Kubernetes clusters from my session?

You want to work with your IBM Cloud® Kubernetes Service clusters, but when you run a command such as kubectl get pods, the following error is displayed:

$ kubectl get pods
The connection to the server localhost:8080 was refused - did you specify the correct host or port?

The cluster isn't currently set as the context. As with your local development environment, the cluster context must be set for each individual session.

Set the cluster as the context in your session as described in Installing the CLI.

What do I do if I changed my .bashrc file and my sessions don't work?

You customized your Cloud Shell sessions by editing the .bashrc file, and now your sessions don't open. As a result, you can't work in Cloud Shell.

Some code in your .bashrc file isn't working correctly, and it's interfering with your sessions' ability to initialize.

If you're able to run commands from an existing open session, download any files that you want to keep. Then, restart Cloud Shell by going to the Cloud Shell menu and clicking Restart.

Why do I keep losing my connection to Cloud Shell?

You're working in Cloud Shell when your session closes with the following message:

The connection to your session was lost.

You might see this error for a few reasons:

  • Your internet connection was unstable.
  • You reached the maximum capacity for your Cloud Shell temporary storage.
  • Rarely, the Cloud Shell region you were working in is unavailable.

If your connection was lost because of a temporary hiccup in your internet connection, refresh the browser window to reconnect. If you continue to be disconnected, restart Cloud Shell. Restarting IBM Cloud Shell removes all files in your workspace, so be sure to download any files that you want to keep.

If a region is unavailable, restarting Cloud Shell automatically loads it in an available region if you didn't change the Cloud Shell location from the default. If you did manually change to a different location, clear your browser cache and cookies to remove your preferences, and then open Cloud Shell.

Why does Cloud Shell hang, close, or restart?

You're working in Cloud Shell when your session hangs or closes with no message.

Cloud Shell might hang, experience slow performance, or close with intensive resource usage. If too many resources are used, the Cloud Shell environment might restart. When Cloud Shell closes, any data in your workspace is deleted.