question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

--link fails possibly because of the binding address

See original GitHub issue

Hello, I tried to run code-server with the --link option, and it ran without printing any errors into console, pointing me to some https://****.cdr.co/ address. However, opening that address did not work for me, with the error message “cannot connect to instance…” printed on the Browser screen. Still no error in the console.

I guess the failure to connect is because --link uses 127.0.0.1 as the binding address, whereas in the VPS I use, it must be 0.0.0.0, and that’s how I manage to run code-server without --link.

Is there a way to tell --link to use 0.0.0.0 as the binding address and then some random port, instead of 127.0.0.1 and some random port? I have already set bind-addr to 0.0.0.0 in config.toml, but it is apparently ignored by --link.

Many thanks.

OS/Web Information

  • Web Browser: Chrome 92
  • Local OS: ChromeOS
  • Remote OS: Ubuntu 20.04
  • Remote Architecture: AMD Ryzen
  • code-server --version: 3.11.1

Steps to Reproduce

  1. Run code-server with --link on a server that needs the binding address to be 0.0.0.0 to be accessible outside

Expected

Access code-server via cdr.io proxy link

Actual

Code-server is not accessible via proxy link

Update: I looked into the source code and it seems that line 450 of the file cli.ts can do the trick. No?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:22 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
aghasemicommented, Dec 23, 2021

It worked. Amazing. Many thanks.

2reactions
code-ashercommented, Aug 25, 2021

I don’t believe there’s currently a timeline. I will make sure we announce the new version release here and in #2734.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bind failed: Address already in use - Stack Overflow
If it is busy, but with another state, you will still get an address already in use error. It is useful if your...
Read more >
This Could Be Due to the Service Endpoint Binding Not Using ...
Description. An error is received when accessing Workflows link from the option on Script files in Transaction/Query Script library as
Read more >
aws-load-balancer-webhook-service error for non alb Ingresses
We are trying to migrate from ingress-nginx to aws-load-balancer-controller. We are starting by just installing the controller chart.
Read more >
Minecraft Server Error: Failed To Bind To Port - Apex Hosting
FAILED TO BIND PORT! The exception was: java.net.BindException: Address already in use Perhaps a server is already running on that port?
Read more >
Troubleshooting a DHCP server failure - TechTarget
DHCP troubleshooting can be complicated. Use this troubleshooting guide to learn about common DHCP errors and how to fix them.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found