Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mfmayer opened this issue Mar 19, 2019 · 8 comments
Closed
Labels
bug Something isn't working

Comments

@mfmayer
Copy link

mfmayer commented Mar 19, 2019

  • 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
@mfmayer mfmayer added the bug Something isn't working label Mar 19, 2019
@kylecarbs
Copy link
Member

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

@EvgeniyMakhmudov
Copy link

I have similar situation. Ubuntu linux, the latest code-server-1.32.0-310-linux-x64.tar.gz
Starting looks correct

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

@SpencerPark
Copy link

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

@sr229
Copy link
Contributor

sr229 commented Mar 22, 2019

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

@jmccl
Copy link

jmccl commented Mar 22, 2019

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

@dcrouch79
Copy link

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.

@dcrouch79
Copy link

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.

@code-asher
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants