Skip to content
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

erlang_ls starts a server on 0.0.0.0 even with stdio #1416

Open
masad-frost opened this issue Jan 20, 2023 · 1 comment
Open

erlang_ls starts a server on 0.0.0.0 even with stdio #1416

masad-frost opened this issue Jan 20, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@masad-frost
Copy link

Describe the bug
Erlang ls in stdio mode still starts a server on 0.0.0.0 with a random port.

The context here is that I'm trying to add erlang_ls to replit.com but Replit exposes things on 0.0.0.0 to the world, and we don't want to do that in this case.

To Reproduce

  1. erlang_ls --transport stdio
  2. server starts at random port on 0.0.0.0 host

Expected behavior
Either no server is started, but if that's necessary for running the language server i expect it to start on 127.0.0.1 (localhost) instead.

Actual behavior
Explained before

Context

  • erlang_ls version (tag/sha): any version
  • Editor used: any
  • LSP client used: any
@masad-frost masad-frost added the bug Something isn't working label Jan 20, 2023
@robertoaloi
Copy link
Member

Hi @masad-frost , Erlang LS uses Erlang distribution to have the Language Server talking to the "project node" (e.g. for reloading code on save). This will result in a daemon (EPMD, Erlang Port Mapper Daemon) starting at a random port. I guess that's what you are referring to. You should be able to configure this behaviour using Environment Variables. See, for example, https://www.erlang.org/doc/man/epmd.html.

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

2 participants