Connection to a Remote Development Environment Remains in the "Setting up SSH Host xxx: Downloading VS Code Server locally" State for More Than 10 Minutes
Symptom
Possible Causes
The local network is faulty. As a result, it takes a long time to automatically install the VS Code server remotely.
Solution
- Open VS Code, choose Help > About, and record the commit ID.
- Open the terminal on your notebook instance and use uname -m to check the system architecture of the image used.
- Download vscode-server of the required version based on the commit ID and the image architecture of the notebook instance.
If error message "Not Found" is displayed during the download, download another version of VS Code and install it locally. Currently, Vscode-1.86.2 is recommended.
- If the instance architecture is x86_64, visit the following URL (manually change the commit ID and delete the angle brackets), and download the vscode-server-linux-x64.tar.gz file.
https://update.code.visualstudio.com/commit:<Commit ID>/server-linux-x64/stable
- If the instance architecture is AArch, visit the URL below (manually change the commit ID and delete the angle brackets), and download the vscode-server-linux-arm64.tar.gz file. After the file is downloaded, rename it to vscode-server-linux-x64.tar.gz.
https://update.code.visualstudio.com/commit:<Commit ID>/server-linux-arm64/stable
For example, if the commit ID is 863d2581ecda6849923a2118d93a088b0745d9d6 and the OS architecture is x86_64, the URL should be:
https://update.code.visualstudio.com/commit:863d2581ecda6849923a2118d93a088b0745d9d6/server-linux-x64/stable
- If the instance architecture is x86_64, visit the following URL (manually change the commit ID and delete the angle brackets), and download the vscode-server-linux-x64.tar.gz file.
- Upload vscode-server-linux-x64.tar.gz to the /home/ma-user/work directory of the ModelArts instance.
Run the following commands on the notebook terminal and specify the commit ID. (Delete the angle brackets.)
commitId=<Commit ID> mkdir -p /home/ma-user/.vscode-server/bin/$commitId tar -zxvf vscode-server-linux-x64.tar.gz -C /home/ma-user/.vscode-server/bin/$commitId --strip=1 chmod 750 -R /home/ma-user/.vscode-server/bin/$commitId
- Close VS Code and open it again on the notebook instance list page. (You need to close the local VS Code. An error may be reported if multiple processes are running.)
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot