Error > Could not connect to Cloud Shell on port 8080 > While connecting the Visual Code using code-server

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-28 04:52:13

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!