What Do I Do If the Connection to a Remote Development Environment Remains in "Setting up SSH Host xxx: Downloading VS Code Server locally" State for More Than 10 Minutes?
Symptom
Possible Cause
The local network is faulty. As a result, it takes a long time to automatically install the VS Code server remotely.
Solution
Manually install the VS Code server.
- Obtain the VS Code commit ID.
- Download the VS Code server package of the required version. Select Arm or x86 based on the CPU architecture of the development environment.
Replace ${commitID} in the following link with the commit ID obtained in 1.
- For Arm, download vscode-server-linux-arm64.tar.gz.
https://update.code.visualstudio.com/commit:${commitID}/server-linux-arm64/stable
- For x86, download vscode-server-linux-x64.tar.gz.
https://update.code.visualstudio.com/commit:${commitID}/server-linux-x64/stable
- For Arm, download vscode-server-linux-arm64.tar.gz.
- Access the remote environment.
Switch to Terminal in VS Code.
Run the following command in VS Code Terminal to access the remote development environment:
ssh -tt -o StrictHostKeyChecking=no -i ${IdentityFile} ${User}@${HostName} -p ${Port}
Parameters:
- IdentityFile: Path to the local key
- User: Username, for example, ma-user
- HostName: IP address
- Port: Port number
- Manually install the VS Code server.
Run the following commands on the VS Code terminal to clear the residual data (replace ${commitID} in the commands with the commit ID obtained in 1):
rm -rf /home/ma-user/.vscode-server/bin/${commitID}/* mkdir -p /home/ma-user/.vscode-server/bin/${commitID}
Upload the VS Code server package to the development environment.
exit scp -i xxx.pem -P 31205 Local path to the VS Code server package ma-user@xxx:/home/ma-user/.vscode-server/bin
ssh -tt -o StrictHostKeyChecking=no -i ${IdentityFile} ${User}@${HostName} -p ${Port}
Parameters:
- IdentityFile: Path to the local key
- User: Username, for example, ma-user
- HostName: IP address
- Port: Port number
Take Arm as an example. Decompress the VS Code server package to $HOME/.vscode-server/bin. Replace ${commitID} in the command with the commit ID obtained in 1.
cd /home/ma-user/.vscode-server/bin tar -zxf vscode-server-linux-arm64.tar.gz mv vscode-server-linux-arm64/* ${commitID}
- Establish the remote connection again.
Failures to Access the Development Environment Through VS Code FAQs
- What Do I Do If the VS Code Window Is Not Displayed?
- What Do I Do If a Remote Connection Failed After VS Code Is Opened?
- Basic Problems Causing the Failures to Access the Development Environment Through VS Code
- What Do I Do If Error Message "Could not establish connection to xxx" Is Displayed During a Remote Connection?
- What Do I Do If the Connection to a Remote Development Environment Remains in "Setting up SSH Host xxx: Downloading VS Code Server locally" State for More Than 10 Minutes?
- What Do I Do If the Connection to a Remote Development Environment Remains in the State of "Setting up SSH Host xxx: Downloading VS Code Server locally" for More Than 10 Minutes?
- What Do I Do If the Connection to a Remote Development Environment Remains in the State of "ModelArts Remote Connect: Connecting to instance xxx..." for More Than 10 Minutes?
- What Do I Do If a Remote Connection Is in the Retry State?
- What Do I Do If Error Message "The VS Code Server failed to start" Is Displayed?
- What Do I Do If Error Message "Permissions for 'x:/xxx.pem' are too open" Is Displayed?
- What Do I Do If Error Message "Bad owner or permissions on C:\Users\Administrator/.ssh/config" or "Connection permission denied (publickey)" Is Displayed?
- What Do I Do If Error Message "ssh: connect to host xxx.pem port xxxxx: Connection refused" Is Displayed?
- What Do I Do If Error Message "ssh: connect to host ModelArts-xxx port xxx: Connection timed out" Is Displayed?
- What Do I Do If Error Message "Load key "C:/Users/xx/test1/xxx.pem": invalid format" Is Displayed?
- What Do I Do If Error Message "An SSH installation couldn't be found" or "Could not establish connection to instance xxx: 'ssh' ..." Is Displayed?
- What Do I Do If Error Message "no such identity: C:/Users/xx /test.pem: No such file or directory" Is Displayed?
- What Do I Do If Error Message "Host key verification failed" or "Port forwarding is disabled" Is Displayed?
- What Do I Do If Error Message "Failed to install the VS Code Server" or "tar: Error is not recoverable: exiting now" Is Displayed?
- What Do I Do If Error Message "XHR failed" Is Displayed When a Remote Notebook Instance Is Accessed Through VS Code?
- What Do I Do for an Automatically Disconnected VS Code Connection If No Operation Is Performed for a Long Time?
- What Do I Do If It Takes a Long Time to Set Up a Remote Connection After VS Code Is Automatically Upgraded?
- What Do I Do If Error Message "Connection reset" Is Displayed During an SSH Connection?
- What Can I Do If a Notebook Instance Is Frequently Disconnected or Stuck After I Use MobaXterm to Connect to the Notebook Instance in SSH Mode?
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.
Chatbotmore