-
Notifications
You must be signed in to change notification settings - Fork 145
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
Bug: 'Unable to connect to terminal' #636
Comments
Are you able to deposit funds and open a channel from alice? Does |
Setting up docker on Linux can be pretty tricky when it comes to permissions. Did you install Docker Desktop for Linux or install using a package? For the packages or scripts, there are sometimes post-install steps that need to be done. Is Docker running as root or a user account? Unfortunately, I dont have a Fedora machine to test or troubleshoot with. |
To test it out, I did the following:
Any advice? Is Polar compatible with Docker Desktop? Here is the output of the terminal command |
UpdateI created a symbolic link using the command
It looks like Polar is calling I tried creating an alias in my alias docker-compose="docker compose" However Polar is still showing the same error. I'm not sure how to make Polar use the alias. |
Thanks a bunch for all of the details and screenshots. I have an Ubuntu VM with Polar working but I haven't installed from scratch in a long while. Unfortunately, Docker Desktop doesn't work inside a VM, so I won't be able to reproduce your exact scenario myself. For the permissions issue, can you share what the current permissions and owner are for the |
Ahh, that is interesting. This isn't behavior I've ever seen before. My hunch is that Docker Desktop is handling the file permissions differently now that it is using a VM internally. Docker Server for Linux doesn't use a VM. Can you try stopping the network, changing the owner/permissions of the volumes dir to your j user, then restart the network? I'm curious to see if Docker will modify the perms again after it boots up. |
I performed the following steps:
sudo chown -R j:j alice
sudo chown -R j:j bob
Result: the network starts, and I can launch the Polar terminal with no permission issues. SummaryThere are three outstanding issues here when using Docker Desktop:
|
Thanks for testing and confirming that behavior. I agree that Polar needs to be updated to resolve those few issues. I will try to get a native Linux machine setup to work on better compatibility with Docker Desktop. I really appreciate the troubleshooting here. |
I'm a TypeScript and React dev, I'd be happy to submit a bug fix if I'm able to figure it out. Could you point me in the right direction with regards to where in the codebase these Docker related issues might be located? |
I appreciate the offer to help. Polar uses the Regarding each issue, here are my thoughts on how I would initially attempt to solve them:
By default,
I haven't found a clear solution to this, but after just a bit of searching I found that the
I haven't spent any time troubleshooting this issue since I don't have a machine running Docker Desktop on Linux. I'd need to learn more about why the volume file permissions aren't being set in the same way as Docker Engine. It could just be setting additional flags in the compose file, I'm not sure. One idea is to have Polar reset the file perms after starting the nodes but this feels a bit hacky. There may be a cleaner solution but would require a better understanding of why Docker behaves differently. |
Thanks for the info. I found something that might shed light on the ownership situation. The Docker Desktop Docs describe this issue but it's not immediately obvious to me what the solution would be. In particular, the last paragraph of the section is relevant:
|
Wow, this got ugly. I assumed Docker Desktop would make things easier, not harder. Especially with a something as common as sharing files with the host. After reading that docs, my initial thought is to first try updating those two files to confirm that does indeed solve the problem. If that works, I'd see if there's a way to detect if the user is running Docker Engine or Docker Desktop. If it's Desktop, I'd see if Polar/Electron could read/write to the Obviously, there are a lot of |
I've got Linux Mint installed and running Docker Desktop on a VirtualBox 6.1 by setting up on Settings -> System -> Processor -> Extended Features -> Enable Nested VT-x/AMD-V. |
I installed docker-composer following the instructions in https://docs.docker.com/compose/install/other/ to have Polar find it. |
I did a work arround to this issue by giving all permissions to everybody: But now I'm getting the error "Failed do fetch the bitcoin block height connect;ECONNREFUSED 127.0.0.1:18443' even tough polar-n1-backend1 container is up and running and listening to this port. |
Yep, I can confirm there are some issues with running this under Ubuntu (actually, my distro is Zorin which is based on ubuntu) Tried many many things and I just can't get it to work. The docker process creates the permissions as root under "data" etc.. The only way I could get it to work is to start the network, and it would fail on LND for example. Stop the network.. do a CHOWN on all files below .polar and now it works. |
Oh, damn :-( So that does work, but once you exit Polar and come back in, permissions are lost on all network files again user and group seems to be set back to 100999 |
Ok, sorry for the noise, last update :-) Confirmed. I am able to do a CHMOD to 777 for everything under network and this seems to be maintained after restarting of polar and stopping and starting the network.
|
Appreciate the additional details. It's very helpful. I hope to be able to spend some time on these Linux issues week. @bxplorer What host OS are you using which supports you running Docker Desktop inside of a VM? I'll try to use VirtualBox myself instead of VMWare Fusion. @iangregsondev Are you using Zorin + Docker Desktop on bare hardware or inside of a VM? If inside a VM, what host OS are you using as well? |
hi @jamaljsr , Yes, are bare hardware. No VM. Its basically Zorin as Desktop, with Docker Desktop (for linux) installed. |
A couple of things to look at that may work.
Cheers. |
Ok - a quick update, I have fixed the issues on my side. I will try and explain the reason behind it.
There is more info here https://docs.docker.com/desktop/faqs/linuxfaqs/#what-is-the-difference-between-docker-desktop-for-linux-and-docker-engine and specifically, it states the following which is 100% to do with our issue. I didn't follow these instructions for creating a GID - I just went with docker engine.
So I removed Docker Desktop completely, and I am using Docker engine. Everything works great. No messing with chown or chmod. |
@jamaljsr - Although everything is working now with regards to permissions etc etc.. I can confirm that the issue with the viewing of the "Logs" (I created another github issue for this) - is still here. The above fix does NOT fix that. Best regards Ian |
How did you get Polar to use Docker engined vs Docker desktop after removing docker desktop? Here is the answer: The issue is that during the installation a wrong entry in ~/.docker/config.json was created. Namely credsStore instead of credStore. Just change the entry in ~/.docker/config.json like this, and you’re good to go: { |
Sorry for taking so long to answer. I'm using VirtualBox 6.1 on a Windows 10 Pro as a host OS, and Linux Mint 20.3 as guest OS. I had 2 issues on doing that: Anyway I got Polar running by uninstalling everything, and reinstalling all over again replacing docker-desktop for docker-ce. |
Appreciate the follow-up. That is good information. I ended up getting an Ubuntu machine setup running on native hardware in order to test Docker Desktop. The new file sharing mechanism is pretty complex and I haven't gotten Polar working with it just yet. So for the time being, Docker Desktop isn't supported. I will continue trying to find a solution. |
Describe the bug
When attempting to launch the built-in Lightning node terminal within Polar, an error message is displayed:
To Reproduce
Steps to reproduce the behavior:
Actions
Terminal
, clickLaunch
.Expected behavior
The Polar Terminal should launch and provide the ability to run commands on the node.
Actual behavior
The Polar Terminal launches and shows the error listed above.
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: