Navigation Menu

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

Docker Tooling unable to connect to backend on Apple Silicon Mac #61

Closed
tcwan opened this issue Jun 15, 2022 · 20 comments
Closed

Docker Tooling unable to connect to backend on Apple Silicon Mac #61

tcwan opened this issue Jun 15, 2022 · 20 comments

Comments

@tcwan
Copy link

tcwan commented Jun 15, 2022

Docker Desktop for macOS 4.6.1, on Monterey 12.3 running on M1 Mac.

Docker Tooling in AArch64 version of Eclipse Embedded for C/C++ is unable to connect to Docker Backend (via Unix socket).

Same setup with x86_64 version of Eclipse Embedded for C/C++ (running via Rosetta) is able to connect and execute build in Docker image.

Tested with 2022-03, and 2021-12. Docker Tooling is not working on AArch64 Eclipse.

@tcwan
Copy link
Author

tcwan commented Jun 15, 2022

This is a re-post of my previous report in Eclipse Marketplace.

@akurtakov
Copy link
Contributor

I am not aware of anyone of the developers having Mac M1 so we will need you to investigate the issue and ideally come with a patch for that.

@tcwan
Copy link
Author

tcwan commented Jun 21, 2022

I am not aware of anyone of the developers having Mac M1 so we will need you to investigate the issue and ideally come with a patch for that.

Hmm. Sorry I don't know Eclipse or Java well enough to troubleshoot. I'm just using it for the IDE. It's rather strange that it only affected AArch64 builds for M1 Macs though. It worked fine on Intel Macs (and also via Rosetta on the M1 Mac but I'm guessing that it adds unnecessary overheads).

@akurtakov
Copy link
Contributor

I think I have an idea why it fails. Docker plugin uses libraries that deal with native code and probably some of them don't support Mac M1, namely these are com.github.jnr.* . jnr/jnr-unixsocket#95 points in that direction.

@akurtakov
Copy link
Contributor

@tony-- Is this smth of interest for you?

@tony--
Copy link
Contributor

tony-- commented Jun 23, 2022

@akurtakov thanks for thinking of me and sharing the opportunity, but I am not interested in Mac silicon support.

@akurtakov
Copy link
Contributor

@cmorty Any chance you could be interested in this Mac issue?

@cmorty
Copy link
Contributor

cmorty commented Jul 18, 2022

@akurtakov : I don't have a Mac and I have my hands full with Docker & CDT - and other projects.
@tcwan : Setting up the Eclipse development environment was unexpectedly easy. I don't know whether there are good instructions for linuxtools, though. Those for CDT were pretty straight forward.

@amanessinger
Copy link

Same problem for me. I've just installed Eclipse JEE via homebrew:

  • Version: 2022-06 (4.24.0)
  • Build id: 20220609-1112

Docker is the latest Docker Desktop 4.11.1 (84025)

I've installed the plugin (5.7.0) and opened Docker Explorer. I've clicked the link "No connection to a Docker daemon is available", check "Use custom connection settings" and edit the Unix socket.

Regardless of what I enter or select (/var/run/docker.sock, /private/run/docker.sock or /Users/andreas/.docker/run/docker.sock, with or without unix:// prefix), when I click "Test Connection", I always get an alert

Ping failed: java.util.concurrent.ExecutionException: javax.ws.rs.ProcessingException: java.lang.IllegalStateException: Connection pool shut down

@LorenzoBettini
Copy link

Same here. I've just installed Docker app on macOS m1. I can't find a way to let Eclipse Docker tooling aware of Docker.

@jjohnstn
Copy link
Contributor

jjohnstn commented Nov 9, 2022

I too do not have a Mac to test, but found the following on stackoverflow.

https://stackoverflow.com/questions/44084846/cannot-connect-to-the-docker-daemon-on-macos

If you scroll past the highest proposed solution (old solution), you will find one discussing Docker
having removed the /var/run/docker.sock. Could you try out the proposed workarounds (one is symlinking
to the new socket location) and report back here? If it works, we should be able to put together something in
Linux Tools.

@jjohnstn
Copy link
Contributor

If anyone with an Mac M1 wants to test out a potential patch...

There is an upgrade of jnr-unixsocket needed to add Mac M1 support. I have built a version of Docker Tooling with an upgraded jnr stack and made a repo available in a download zip. To get the repo, clone the eclipse-linuxtools/linuxtools-website and download the change from:

eclipse-linuxtools/linuxtools-website#3

Unzip the dockertools-mac-experiment.zip file found in the downloads directory to get the repository.

Go to https://download.eclipse.org/eclipse/downloads/ and download the 4.26 RC1 milestone. Start the 4.26 RC1 eclipse and add the local repository where you unzipped the zip file above via: Help -> Install New Software... -> Add... Hit the Local button and add your local repository location. After successfully adding the repo, choose to install Docker Tools and restart.

Try out Docker Tooling and report back here.

@smuret
Copy link

smuret commented Dec 2, 2022

I've installed Eclipse 4.26RC1 and installed the patched tools as stated by @jjohnstn.
On MacBook Pro M1 with Mac OS X Ventura 13.0.1 and Docker desktop 4.15.0 it seems to work fine.
The Docker Explorer automatically connected using the docker.sock, all my containers are shown, all images are listed and was able to start containers.

@LorenzoBettini
Copy link

I also confirm that with the patched tools, it works!
Unfortunately, I seem to understand, it didn't make it to 2022-12, did it?
Even worse, installing Docker Tooling from 2022-12 makes it impossible to install the patch because the patched repository contains a version considered older.

@jjohnstn
Copy link
Contributor

jjohnstn commented Jan 3, 2023

Hi @LorenzoBettini , no, it did not make 2022-12 because it was too late to get into Orbit. It will be part of 2023-03 M1 next week. I will make a change which will be part of our nightly builds (should be available by tomorrow).

@LorenzoBettini
Copy link

Hi @jjohnstn and thanks for the update.
I thought you'd also have a separate update site where you release your own updated releases, independently from simrel.

@jjohnstn
Copy link
Contributor

jjohnstn commented Jan 4, 2023

We have our nightly builds repo when changes are merged which eventually are copied to a milestone repo and used in simrel, plus we also can do our own releases separate of simrel, but we usually only do point releases this way (e.g. 5.9.1, 5.9.2) when there is some major bug in the release. I ran into some test failures yesterday so the change isn't merged yet until I determine if they are just random or caused by the change.

@akurtakov
Copy link
Contributor

Latest build is available at https://download.eclipse.org/linuxtools/updates-docker-nightly/ . Please test and report whether its working for you.

@akurtakov
Copy link
Contributor

No reply usually means things work thus closing. Please reopen with details how/what fails if it still happens for you.

@tcwan
Copy link
Author

tcwan commented Feb 1, 2024

Sonoma 14.3, Eclipse 2024-3, Docker for Mac 4.27, on M2 Mini. All software are Aarch64 native.

Docker tooling was working on previous version of Eclipse (2023-9) for this system. However, after I upgraded Eclipse to the latest version (2024-3 for Aarch64), Docker Explorer fails to connect to the Docker socket with the following error:

An internal error occurred during: "Opening connection 'unix:///var/run/docker.sock'[unix:///var/run/docker.sock]...". Cannot invoke "String.startsWith(String)" because "s" is null

/var/run/docker.sock is linked to the macOS user specific socket. I can check docker images via terminal as usual using 'docker images'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants