问题
Trying to install Visual Code IDE in VM Instance. After running the code-server, while checking view on browser, it is giving an error. Error: Could not connect to Cloud Shell on port 8080. Ensure your server is listening on port 8080 and try again.
enter image description here
reference link to install VS Code in GCC: https://medium.com/google-cloud/how-to-run-visual-studio-code-in-google-cloud-shell-354d125d5748
回答1:
Try openning on your browser: http://[your-external-ip]:8080/
Its important to change the default "https" to "http".
I also added the port 8080 on my firewall permisions on gcp.
回答2:
You should set your host to 0.0.0.0
. When you start the server, your command could be like this:
./code-server --no-auth --port 8080 --host 0.0.0.0
And everything should work fine. Try it :D
来源:https://stackoverflow.com/questions/59093373/error-could-not-connect-to-cloud-shell-on-port-8080-while-connecting-the-vis