Code-server: Code-server is starting but cannot be opened in browser (endless loading)

Created on 19 Mar 2019  路  8Comments  路  Source: cdr/code-server

  • code-server version: 1.32.0-282-linuxx64
  • OS Version: Manjaro-VM installed in Windows 10 VMware 14 Host

Description

After starting the code-server it's not reachable via browser (endless loading). Last output from code-server: INFO Starting shared process [1/5]...

Steps to Reproduce

  1. extract code-server-1.32.0-282-linux-x64.tar.gz
  2. cd into folder
  3. Run ./codes-server
  4. Open browser: https://localhost:8443
bug

Most helpful comment

For me, it turns out the Linux firewall was enabled and blocking the port. Nothing to do with IPv4 vs IPv6!

sudo ufw status will show whether Linux firewall is enabled or not.

I think the firewall was installed for me because I chose the Ubuntu + Docker base image for the droplet instead of the default Ubuntu image. Docker handles the firewall automatically.

All 8 comments

Might be something strange occurring because of the VM. Do you have the netstat command available?

I have similar situation. Ubuntu linux, the latest code-server-1.32.0-310-linux-x64.tar.gz
Starting looks correct
INFO code-server v1.32.0-310 INFO Additional documentation: http://github.com/codercom/code-server INFO Initializing {"data-dir":"/root/.local/share/code-server","working-dir":"/root/Projects/test","log-dir":"/root/.cache/code-server/logs/20190319200527399"} INFO Starting shared process [1/5]... INFO Starting webserver... {"host":"0.0.0.0","port":8443} WARN No certificate specified. This could be insecure. WARN Documentation on securing your setup: https://coder.com/docs INFO INFO Password: c3f830fe4349151b2b4ac984 INFO INFO Started (click the link below to open): INFO http://localhost:8443/ INFO
From lsof command i see that port is used
code-serv 2736 root 12u IPv4 21487 0t0 TCP *:8443 (LISTEN)

But request of / have no response

To add another data point, I run into this issue on WSL with ubuntu 16.04. The netstat version output is listed below in case the version is an issue? From #11 it looks like working on WSL is possible and from discussion in #153 (and @kylecarbs comment above), an appropriate net-tools (specifically netstat?) seemed to fix it but I would like to narrow down what versions work if that is the problem.

$ netstat --version
net-tools 2.10-alpha
Fred Baumgarten, Alan Cox, Bernd Eckenfels, Phil Blundell, Tuan Hoang, Brian Micek and others
+NEW_ADDRT +RTF_IRTT +RTF_REJECT +FW_MASQUERADE +I18N +SELINUX
AF: (inet) +UNIX +INET +INET6 +IPX +AX25 +NETROM +X25 +ATALK +ECONET +ROSE -BLUETOOTH
HW:  +ETHER +ARC +SLIP +PPP +TUNNEL -TR +AX25 +NETROM +X25 +FR +ROSE +ASH +SIT +FDDI +HIPPI +HDLC/LAPB +EUI64

@SpencerPark it depends on what the node-netstat dependency relies at.

Same thing happening to me on Manjaro. (No VM)

I get the same problem when running the binary on a Digital Ocean droplet following the Deploy on DigitalOcean docs. Running the dockerized version, however, on the same droplet works OK though.

Inspecting the lsof output from both gives...

dockerized version (can connect):

docker-pr 11706            root    4u  IPv6 211024      0t0  TCP *:8443 (LISTEN)

binary version (can't connect):

code-serv 12073            root   22u  IPv4 214297      0t0  TCP *:8443 (LISTEN)

It seems IPv6 works but IPv4 doesn't.

This is strange though because IPv6 is actually disabled on the droplet (default setting). Out of curiosity, I tried enabling IPv6 but it made no difference. There's no firewall setup on the server that I can see either.

For me, it turns out the Linux firewall was enabled and blocking the port. Nothing to do with IPv4 vs IPv6!

sudo ufw status will show whether Linux firewall is enabled or not.

I think the firewall was installed for me because I chose the Ubuntu + Docker base image for the droplet instead of the default Ubuntu image. Docker handles the firewall automatically.

Gonna close this since v2's web server has been completely rewritten, netstat is no longer a dependency, and the shared process no longer exists.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

balazssoltesz picture balazssoltesz  路  3Comments

avelino picture avelino  路  3Comments

rcarmo picture rcarmo  路  3Comments

infogulch picture infogulch  路  3Comments

pchecinski picture pchecinski  路  3Comments