-
-
Notifications
You must be signed in to change notification settings - Fork 122
Server installation fails inside Docker container with mounted volume #412
Comments
Hello! Huh that seems really odd. Which system are you able to repro this on? It seems like What does the following produce:
|
Also, are you able to reproduce while running branch |
Using that branch seems to fix it. Any idea on where it is on the roadmap? But in case it's helpful, here's the feedback you asked for:
|
Where what is on which roadmap :D? The thing is that what I've removed in I simply can't reproduce this on any system, for example, I'm running the following docker container:
Would you happen to have a public docker image that I could reproduce this in? |
What filesystems are you running on the host machines? Also what does the following give?
|
I faced this problem on Ubuntu 20.04 // WSL2 (not using docker). A few failures popped up in the install logs when I tried to add new language servers:
The problem seems to be what you mentioned here @jsatt. Switching to the Output from the debug commands you mentioned above:
|
@oneroyalace Thanks for reporting. I'm not surprised to hear you're on WSL, it has a tendency to be a bit... odd 🙈. Could you provide what the following gives you:
|
I don't have docker installed. Running everything directly in WSL |
Ah. What does |
I also get this error on OSX 11.6.2 (Big Sur). The exact error pops up in vim when I run a file that has an LSP installed for it, like a lua file, which is Running the commands you were asking the others to run, except
Switching to |
Ah I guess BSD df behaves differently. With GNU df it gives you the filesystem type (like, ext4).
Hm did you recently upgrade plugin versions? Also has it been a while since you last installed sumneko_lua? |
Yes and yes. I upgraded today after about a month? And the installation definitely was a while ago! |
Here's my filesystem info:
I installed LSPs for the first time when I saw the error. |
I can confirm that this is an issue since 095ab4e it works for some LSP (like lua) but for others (like haskell) I do get the "The language server is either not installed, missing from PATH, or not executable". Simply reverting to the commit before the one mentioned make the error go away. |
@AnonymusRaccoon Hm which servers stops working with that commit? It's not supposed to really have changed anything. There's also a suite of tests for all servers that are passing just fine (on Mac). Have you peeked into the installation directory to see whether it's due to the same issue as the OP is reporting? edit: Oh also, from the sound of it, you will most likely be able to fix the issue by just reinstalling the problematic servers. There have been some cases where there's been some breaking changes to a server that is not compatible with older versions (#340 aims to mitigate this) |
I don't really know why, but now using the latest version I can't reproduce the bug. It was my first time setting up neovim, so I may have done something wrong the first time. Sorry for the noise. |
OK, I've finally had some time to research the issue as I'm experiencing it. When I initially reported the issue I was still in the middle of migrating from a Vim/Nvim compatible config to a standalone Neovim w/ Lua config with all the new hotness. As I have completed this migration, my bare-metal Linux install does now work exactly as expected with the latest version of the plugin. However, my day-to-day environment (read: work) is an Ubuntu container running on Docker for Mac, and I am still experiencing the problem there. I've narrowed down the issue to only happening when the directory that the lsp servers get installed to ( I realize at this point that this is likely an extreme edge case that's a problem with Docker, so I'd be fine if you want to call this out of scope and I'll just deal with it on my own. But if you think this is related to the other folks issues above I'm happy to help. I've created a (fairly) minimal Dockerfile which is capable of reproducing the issue which is linked below along with the other details requested above. Dockerfile: https://github.com/jsatt/nvim-lspinstaller-test # run from container
$ uname -a
Linux a9c2b332b2e4 5.10.76-linuxkit #1 SMP Mon Nov 8 10:21:19 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
$ nvim --headless -c "lua print(vim.loop.version_string())" -c q
1.42.0
$ df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
overlay overlay 61255492 11218724 46895444 20% /
tmpfs tmpfs 65536 0 65536 0% /dev
shm tmpfs 65536 0 65536 0% /dev/shm
tmpfs tmpfs 203300 536 202764 1% /run/docker.sock
grpcfuse fuse.grpcfuse 488245288 87429836 400815452 18% /Users/jeremy.satterfield
/dev/vda1 ext4 61255492 11218724 46895444 20% /etc/hosts
# run on host
$ docker info | grep -i -e 'backing filesystem' -e 'storage driver'
Storage Driver: overlay2
Backing Filesystem: extfs
$ df -t
Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk1s5s1 976490576 30764128 801630104 4% 577263 4008150520 0% /
devfs 387 387 0 100% 670 0 100% /dev
/dev/disk1s4 976490576 4194344 801630104 1% 2 4008150520 0% /System/Volumes/VM
/dev/disk1s2 976490576 585832 801630104 1% 1218 4008150520 0% /System/Volumes/Preboot
/dev/disk1s6 976490576 944 801630104 1% 18 4008150520 0% /System/Volumes/Update
/dev/disk1s1 976490576 136858184 801630104 15% 1088257 4008150520 0% /System/Volumes/Data
map auto_home 0 0 0 100% 0 0 100% /System/Volumes/Data/home |
Ahh thanks for the thorough investigation @jsatt! I figured it was probably something going on with the fs. Do I understand you correctly that you have a volume mounted at the container path This honestly sounds like a potential bug somewhere outside of this plugin. I guess what you could do, should you want to keep that volume mount, is to change the installation directory to somewhere else |
In my real environment I actually have my entire $HOME mounted into the volume from the host, but in my testing and for clarity sake in the Dockerfile it was just easier to mount the .local and it has the same issue in both cases. I actually really like the idea of changing the install_root_dir. And I also just thought about possibly having a regular Docker volume for just the .local or lsp_servers directories and letting the rest of $HOME continue to be a mount. I think at least one of those two will work for me enough. As I said, I'm happy to call this my issue for now. Close if you'd like or ping me if you'd like more feedback/testing if it can help the other folks in the thread. |
Let's keep it open for discoverability 👍 |
|
This comment was marked as resolved.
This comment was marked as resolved.
I'm still getting this issue. Should note that I'm using rootless Docker. |
For several days I've been trying to configure my LSP servers using this plugin, but have consistently been getting errors like
Spawning language server with cmd:
lua-language-serverfailed. The language server is either not installed, missing from PATH, or not executable.
I've read up on issues like #305 and discussion #392 and see that the plugin should be loading the proper PATH to execute each server in it's appropriate environment, but still no luck.Finally I have rolled my config back to the absolute minimum to, then deleted my entire
~/.local/share/nvim
directory and reinstalled all packages and lsps from scratch with the latest version to isolate the issue:Just now, I checked the path on disk where the server was being installed and found the executable was located at
~/.local/share/nvim/lsp_servers/sumneko_lua/sumneko_lua.tmp/extension/server/bin/lua-language-server
. Further, I usedprint(nvim.inspect(server))
in theon_server_ready
above to look into how the server is being configured on start up and see that the PATH for the cmd_env is being set to<my home>/.local/share/nvim/lsp_servers/sumneko_lua/extension/server/bin:...
, the key difference being.../lsp_servers/sumneko_lua/...
and.../lsp_servers/sumneko_lua/sumneko_lua.tmp/...
. This difference is consistent with ALL the LSP servers I have installed.OS: Ubuntu 20.04
Neovim: 0.6.1
lsp-installer.log: (note: in spite of the home directory of "/Users/..." this is a an Ubuntu machine configured differently because of how it's running in Docker, but I'm seeing identical behavior on other bare-metal machines which are not configured this way, this just happened to be the log file I had access to at the moment.)
nvim-lsp-installer-receipt.json for sumneko_lua
The text was updated successfully, but these errors were encountered: