coder / sshcode

Run VS Code on any server over SSH.
MIT License
5.74k stars 216 forks source link

error: code-server didn't start in time: context deadline exceeded #99

Open magick93 opened 5 years ago

magick93 commented 5 years ago

Hello

When I try to run sshcode I get the below error.

I'm running this command on Ubuntu 19.04, and am connecting to Centos 7.

m$ sshcode deploy@myremoteserver.name
2019-05-08 13:37:56 INFO    ensuring code-server is updated...
+ mkdir -p /home/deploy/.local/share/code-server /home/deploy/.cache/sshcode
+ cd /home/deploy/.cache/sshcode
+ wget -N https://codesrv-ci.cdr.sh/latest-linux
--2019-05-08 13:37:58--  https://codesrv-ci.cdr.sh/latest-linux
Resolving codesrv-ci.cdr.sh (codesrv-ci.cdr.sh)... 104.27.132.26, 104.27.133.26, 2606:4700:30::681b:841a, ...
Connecting to codesrv-ci.cdr.sh (codesrv-ci.cdr.sh)|104.27.132.26|:443... connected.
HTTP request sent, awaiting response... 200 OK
Cookie coming from codesrv-ci.cdr.sh attempted to set domain to codesrv-ci.cdr.sh
Length: 94698820 (90M) [application/octet-stream]
Server file no newer than local file ‘latest-linux’ -- not retrieving.

+ '[' -f /home/deploy/.cache/sshcode/sshcode-server ']'
+ rm /home/deploy/.cache/sshcode/sshcode-server
+ ln latest-linux /home/deploy/.cache/sshcode/sshcode-server
+ chmod +x /home/deploy/.cache/sshcode/sshcode-server
2019-05-08 13:37:59 INFO    syncing settings
sending incremental file list

sent 256 bytes  received 14 bytes  108.00 bytes/sec
total size is 204,866  speedup is 758.76
2019-05-08 13:38:02 INFO    synced settings in 2.967673819s
2019-05-08 13:38:02 INFO    syncing extensions
sending incremental file list

sent 628,665 bytes  received 3,080 bytes  84,232.67 bytes/sec
total size is 348,827,104  speedup is 552.16
2019-05-08 13:38:09 INFO    synced extensions in 10.451022026s
2019-05-08 13:38:09 INFO    starting code-server...
2019-05-08 13:38:09 INFO    Tunneling local port 51443 to remote port 5652
/home/deploy/.cache/sshcode/sshcode-server: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/deploy/.cache/sshcode/sshcode-server)
/home/deploy/.cache/sshcode/sshcode-server: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/deploy/.cache/sshcode/sshcode-server)
/home/deploy/.cache/sshcode/sshcode-server: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /home/deploy/.cache/sshcode/sshcode-server)
2019-05-08 13:38:24 FATAL   error: code-server didn't start in time: context deadline exceeded
teddy-codes commented 5 years ago

This is a known issue. See #97. I would recommend, if possible, to change your remote instance to Ubuntu 19.04.

Magistern commented 5 years ago

Ok, now I'm going to harass you in this repo as well 😊 I also get the error (on OSX) After 73 000 lines of code and files listed! (are those downloaded somewhere?) I get this:

sent 38700768 bytes  received 378954 bytes  1042125.92 bytes/sec
total size is 98376971  speedup is 2.52
2019-05-23 23:28:09 INFO    synced extensions in 54.06223304s
2019-05-23 23:28:09 INFO    starting code-server...
2019-05-23 23:28:09 INFO    Tunneling remote port 42566 to 127.0.0.1:14366
pi@fullpageos's password: 2019-05-23 23:28:25 FATAL error: code-server didn't start in time: context deadline exceeded

which kind of feels like the error I got from sail as well.

teddy-codes commented 5 years ago

It looks like you are trying to connect to a pi. This is a known issue with sshcode. You should try to have the remote instance be ubuntu 18.10 or 19.04.

Also, as a note: those are all of your vsc extensions that were downloaded.

Edit: spelling

Magistern commented 5 years ago

version v0.8.0 How do I set the remote instance be ubuntu 18.10 or 19.04? (I don't even know what that means)

regarding downloading: Oh I see,Code server is downloaded on the remote machine?

teddy-codes commented 5 years ago

That is correct. With Sail, code-server is running within the docker container.

Can you run lsb_release -a on the remote instance and provide the output here?

Magistern commented 5 years ago
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 9.4 (stretch)
Release:    9.4
Codename:   stretch
teddy-codes commented 5 years ago

Yea, the OS is Raspbian which I don't think is officially supported by code-server.

Also, as a note: code-server requires about 1gb of ram for startup and initialization (so a pi would not go very far).

If you are just using a pi to offload the backend work, then I would recommend just rending a $10 lightsail instance of similar from other providers.

Magistern commented 5 years ago

okidokeli. I see. Thanks

deansheather commented 5 years ago

We're working on reducing the RAM usage of code-server and adding ARM builds so you can run it on a Raspberry Pi. Once we've added these builds we'll make sure sshcode downloads the matching build to the remote host.

ChristopherDosin commented 5 years ago

I am getting the same issue on a centOS ( cPanel ) server and can't connect with sshcode :(

cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
coadler commented 5 years ago

CentOS has an old version of glibc which causes problems with code-server. See https://github.com/cdr/code-server/issues/239