You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As #737 states, code-server is giving a connection refused error when listening on ports 80 or 443. All other ports work as expected. This is due to the fact that the server does not bind itself to the ports 80 or 443, so the provider has no available listener to answer the socket.
Steps to Reproduce
Run code-server as of ./code-server -p 80 -H &
Run sudo netstat -tnlp and see there's no code-server process running
Do the same thing for port 443
Try with a different port passing -p 2345
Run sudo netstat -tnlp again
Code-server appears as a listener
The text was updated successfully, but these errors were encountered:
If you're using any ports less than 1024 you'll need to run as root or with sudo. Leaving this open as code-server should be erroring out when it can't listen on the specified port.
deansheather
changed the title
Code server does not listen on ports 80 or 443
code-server should print error when it can't listen on ports < 1024
Jul 22, 2019
It is possible for code-server or other user services to bind to ports lower than 1024, but only if you tell the kernel to ignore that 'root-only' restriction. Something about using setcap CAP_NET_BIND_SERVICE to give permission.
I would however... NEVER however run code-server as root. Unless that server was specifically designed to do so, like apache, that creates non-root worker processes, it is simply not a good idea.
User access to root even in a docker container is really a BAD IDEA! And code server can provide not only file access, but terminal access! As such Sudo is a not a good solution.
code-server
version: 1.1156-vsc1.33.1Description
As #737 states, code-server is giving a connection refused error when listening on ports 80 or 443. All other ports work as expected. This is due to the fact that the server does not bind itself to the ports 80 or 443, so the provider has no available listener to answer the socket.
Steps to Reproduce
./code-server -p 80 -H &
sudo netstat -tnlp
and see there's no code-server process running-p 2345
sudo netstat -tnlp
againThe text was updated successfully, but these errors were encountered: