0x00 問(wèn)題場(chǎng)景:
windows系統(tǒng)使用vscode遠(yuǎn)程調(diào)試插件ssh連接linux服務(wù)器時(shí)提示報(bào)錯(cuò)
could not establish connection to 8.8.8.8 xhr failed
0x01 原因分析:
網(wǎng)絡(luò)不通或者其他原因?qū)е?code>~/.vscode-server/bin/${commit_id}目錄下的文件vscode-server-linux-x64.tar.gz
不完整,或者文件為0.
其中commit_id可以在vscode的ssh連接日志中找到,點(diǎn)擊途中箭頭的位置可以看到ssh連接日志。
0x02 解決方案:
1. 清理vscode server鎖,切記,這個(gè)鎖文件一定要?jiǎng)h除,不然還是連不上。
cd ~/.vscode-server/bin/b45a160d630530476218b85db95b0fd2a8cd1230
rm vscode-remote-lock.counsellor.b45a160d630530476218b85db95b0fd2a8cd1230
2. 手動(dòng)下載vscode server:
https://update.code.visualstudio.com/commit:${commit_id}/server-linux-x64/stable
3. 上傳 vscode-server-linux-x64.tar.gz 到遠(yuǎn)程服務(wù)器的vscode配置目錄.vscode-server/bin/${commit_id}
4. 解壓文件
cd ~/.vscode-server/bin/b45a160d630530476218b85db95b0fd2a8cd1230
tar -xvxf vscode-server-linux-x64.tar.gz --strip 1
5. 重新連接
文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-597860.html
0x03 參考文獻(xiàn)
https://blog.csdn.net/weixin_39631094/article/details/111448904文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-597860.html
到了這里,關(guān)于vscode遠(yuǎn)程調(diào)試報(bào)錯(cuò)could not establish connection to xhr failed解決方案的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!