问题描述
尝试在VM实例中安装Visual Code IDE.运行代码服务器后,在浏览器上检查视图时,出现错误.错误:无法在端口8080上连接到Cloud Shell.确保您的服务器正在侦听端口8080,然后重试.
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.
参考链接以在GCC中安装VS Code: https://medium.com/google-cloud/how-to-run-visual-studio-code-in-google-cloud-shell-354d125d5748
reference link to install VS Code in GCC:https://medium.com/google-cloud/how-to-run-visual-studio-code-in-google-cloud-shell-354d125d5748
推荐答案
尝试在浏览器中打开: http://[您的外部-ip]:8080/
Try openning on your browser:http://[your-external-ip]:8080/
将默认的"https"更改为"http"很重要.
Its important to change the default "https" to "http".
我还在gcp的防火墙权限上添加了8080端口.
I also added the port 8080 on my firewall permisions on gcp.
这篇关于错误>无法在端口8080>上连接到Cloud Shell.使用代码服务器连接可视代码时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!