报错解决:Downloading VS Code Server failed. Please try again later.

当你的机器无法连接外网导致VS Code Server下载失败时,可以查看下载命令,在有网络的设备上手动下载对应文件,然后安装并替换,从而解决问题。通过设置代理也能方便地直接下载插件。

之前写过教程:
Windows下使用VS Code远程SSH连接Linux服务器进行开发
vscode 使用ssh密钥登录远程Linux – vscode remote linux ssh key


如果你的机器无法连接外网,无法下载vs code服务器端,那么会报错如下:

Running remote connection script
Installing to /home/zhang/.vscode-server/bin/2213894ea0415ee8c85c5eea0d0ff81ecc191529...
Downloading with wget
....
"install" terminal command done
Received install output: b7a67c2b-5d04-47c6-8be8-999adf02ef0c##25##
Server download failed
Downloading VS Code Server failed. Please try again later.
------

解决方法如下:
在下载时查看下载的具体命令:

zhang@ubuntu:~$ ps -aux | grep vscode
zhang      3026  0.0  0.2  47932  6012 ?        S    12:18   0:00 wget -nv -O vscode-server-linux-x64.tar.gz https://update.code.visualstudio.com/commit:2213894ea0415ee8c85c5eea0d0ff81ecc191529/server-linux-x64/stable

然后到有网的机器手动进行下载:

wget vscode-server-linux-x64.tar.gz https://update.code.visualstudio.com/commit:2213894ea0415ee8c85c5eea0d0ff81ecc191529/server-linux-x64/stable

然后进行安装,替换文件为自己下载的文件

cd ~/.vscode-server/bin/*/
tar -zxvf vscode-server-linux-x64.tar.gz -C ./
mv vscode-server-linux-x64/* .
touch 0

现在重新连接就可以连上了。

可以在设置里配置代理,方便直接下载插件。

Can't find or decode reasons Failed to get or decode unavailable reasons networkd_settings_read_from_file Sandbox is preventing this process from reading networkd settings file at "/Library/Preferences/com.apple.networkd.plist", please add an exception. networkd_settings_read_from_file Sandbox is preventing this process from reading networkd settings file at "/Library/Preferences/com.apple.networkd.plist", please add an exception. nw_resolver_can_use_dns_xpc_block_invoke Sandbox does not allow access to com.apple.dnssd.service nw_resolver_create_dns_service_locked [C1.1] DNSServiceCreateDelegateConnection failed: ServiceNotRunning(-65563) Connection 1: received failure notification Connection 1: failed to connect 10:-72000, reason -1 Connection 1: encountered error(10:-72000) Task <D4038B3A-7FDC-4286-8F42-2A4F3FF38864>.<1> HTTP load failed, 0/0 bytes (error code: -1003 [10:-72000]) Task <D4038B3A-7FDC-4286-8F42-2A4F3FF38864>.<1> finished with error [-1003] Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={_kCFStreamErrorCodeKey=-72000, NSUnderlyingError=0x600003987090 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorDomainKey=10, _kCFStreamErrorCodeKey=-72000, _NSURLErrorNWResolutionReportKey=Resolved 0 endpoints in 0ms using unknown from query, _NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: lo0}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDownloadTask <D4038B3A-7FDC-4286-8F42-2A4F3FF38864>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDownloadTask <D4038B3A-7FDC-4286-8F42-2A4F3FF38864>.<1>" ), NSLocalizedDescription=A server with the specified hostname could not be found., NSErrorFailingURLStringKey=http://localhost:8080/appcast.xml, NSErrorFailingURLKey=http://localhost:8080/appcast.xml, _kCFStreamErrorDomainKey=10} Encountered download feed error: Error Domain=SUSparkleErrorDomain Code=2001 "An error occurred while downloading the update. Please try again later." UserInfo={NSErrorFailingURLKey=http://localhost:8080/appcast.xml, NSLocalizedDescription=An error occurred while downloading the update. Please try again later., NSUnderlyingError=0x6000039ae880 {Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={_kCFStreamErrorCodeKey=-72000, NSUnderlyingError=0x600003987090 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorDomainKey=10, _kCFStreamErrorCodeKey=-72000, _NSURLErrorNWResolutionReportKey=Resolved 0 endpoints in 0ms using unknown from query, _NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: lo0}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDownloadTask <D4038B3A-7FDC-4286-8F42-2A4F3FF38864>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDownloadTask <D4038B3A-7FDC-4286-8F42-2A4F3FF38864>.<1>" ), NSLocalizedDescription=A server with the specified hostname could not be found., NSErrorFailingURLStringKey=http://localhost:8080/appcast.xml, NSErrorFailingURLKey=http://localhost:8080/appcast.xml, _kCFStreamErrorDomainKey=10}}}
最新发布
11-27
评论 15
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值