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

Doesn't work on M2 Mac #19

Closed
danieljausovec opened this issue Oct 23, 2022 · 13 comments
Closed

Doesn't work on M2 Mac #19

danieljausovec opened this issue Oct 23, 2022 · 13 comments

Comments

@danieljausovec
Copy link

danieljausovec commented Oct 23, 2022

While it does work for me on M1, it does not on M2 one.

I reinstalled package and restart service

sudo brew services restart chipmk/tap/docker-mac-net-connect

Warning: Taking root:admin ownership of some docker-mac-net-connect paths:
  /opt/homebrew/Cellar/docker-mac-net-connect/v0.1.2/bin
  /opt/homebrew/Cellar/docker-mac-net-connect/v0.1.2/bin/docker-mac-net-connect
  /opt/homebrew/opt/docker-mac-net-connect
  /opt/homebrew/opt/docker-mac-net-connect/bin
  /opt/homebrew/var/homebrew/linked/docker-mac-net-connect
This will require manual removal of these paths using `sudo rm` on
brew upgrade/reinstall/uninstall.
Warning: docker-mac-net-connect must be run as non-root to start at user login!
==> Successfully started `docker-mac-net-connect` (label: homebrew.mxcl.docker-mac-net-connect)

Services list

brew services

Name                   Status User File
docker-mac-net-connect none   root

After that I followed first example with nginx

curl -I 172.17.0.2

curl: (28) Failed to connect to 172.17.0.2 port 80 after 75012 ms: Operation timed out

Am I doing something wrong?

@danieljausovec danieljausovec changed the title Mac M2 issue Doesn't work on M2 Mac Oct 23, 2022
@danieljausovec
Copy link
Author

@dobegor Do you have come across a possible similar case? (I saw that you had a problem with M1)

@peterpacket
Copy link

peterpacket commented Oct 24, 2022

I have com across a similar case (but with a redis container). Downgrading docker for Mac to 4.12 fixed the issue for me (I was on version 4.13).

@dobegor
Copy link
Contributor

dobegor commented Oct 24, 2022

@danieljausovec I don't have an M2 and the problem on M1 was different.

I did try it on M1 and it doesn't work:

$ brew services list
Name                   Status     User    File
docker-mac-net-connect error  256 georgiy ~/Library/LaunchAgents/homebrew.mxcl.docker-mac-net-connect.plist
postgresql@14          none
vault                  none

I also tried to launch the service manually:

/opt/homebrew/opt/docker-mac-net-connect/bin/docker-mac-net-connect
docker-mac-net-connect version 'v0.1.2'

Downgrading docker for Mac to 4.12

I'm actually running DfM 4.12.0.
cc @gregnr

@danieljausovec
Copy link
Author

@peterpacket @dobegor I tried with Docker version 4.13 on M1 and it doesn't work. After downgrading to 4.12 has started working again, but I still have problems with M2 with both Docker versions.

Apparently, Apple has changed something. Maybe @gregnr can help?

@xinbe
Copy link

xinbe commented Nov 3, 2022

I have the same problem with docker for desktop 4.13 on M1.
I tried tail -f /opt/homebrew/var/log/docker-mac-net-connect/std_* and found some possible issues.

https://docs.docker.com/desktop/release-notes/#docker-desktop-4130

For Mac
Added Hide, Hide others, Show all menu items for Docker Desktop. See docker/for-mac#6446.
Fixed a bug which caused the application to be deleted when running the install utility from the installed application. Fixes docker/for-mac#6442.
By default Docker will not create the /var/run/docker.sock symlink on the host and use the docker-desktop CLI context instead.

It seems that 4.13 adjusted the path generated by the unix socket.

sudo ln -s "$HOME/.docker/run/docker.sock" /var/run/docker.sock

I'm currently manually creating the symbol link and it's working for me.

@danieljausovec
Copy link
Author

Guys, It started working. What I did...?
I downgraded the docker version to 4.12 and after that, I upgraded it back to 4.13, and now works as expected.

@dobegor
Copy link
Contributor

dobegor commented Nov 3, 2022

This happens for me on Docker 4.12 without any upgrade to 4.13. And also this is still an issue even if it worked on 4.12. @danieljausovec could you please reopen the issue?

@danieljausovec danieljausovec reopened this Nov 3, 2022
@mhumeSF
Copy link

mhumeSF commented Nov 10, 2022

This too has stopped working for me recently on my macbook air m1 with the following versions of docker-desktop 4.12, 4.13.1, 4.14. Not finding any error in the logs. The only message that gets printed is docker-mac-net-connect version 'v0.1.2'.

Update: I reran using sudo and the interface and routes were created and working as expected. I still get errors returning from the brew service... but the connection is working.

➜ brew services start chipmk/tap/docker-mac-net-connect
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/mhumesf/Library/LaunchAgents/homebrew.mxcl.docker-mac-net-connect.plist` exited with 5.

@konnta0
Copy link

konnta0 commented Apr 5, 2023

It seems to be related to the following issue
#19

Also, as noted in the comments below, uninstalling and then reinstalling Docker Desktop For Mac: 4.17.0 may resolve the issue.
In no small part, it eliminated the problem on my Apple M2 Pro!!!
#21 (comment)

@gregnr
Copy link
Member

gregnr commented Apr 14, 2023

Hey, jumping in here to help resolve these. A couple notes:

@danieljausovec thanks for opening this issue. Looks like this is resolved for you, but let me know if you're getting any more errors.

@dobegor can you confirm whether or not you've got this working? Can you try on the latest 4.17.0?

@mhumeSF it sounds like this was resolved for you by using sudo. I'm not sure what is causing that additional error, but feel free to open a new issue if that persists.

@danieljausovec
Copy link
Author

Hey, jumping in here to help resolve these. A couple notes:

@danieljausovec thanks for opening this issue. Looks like this is resolved for you, but let me know if you're getting any more errors.

@dobegor can you confirm whether or not you've got this working? Can you try on the latest 4.17.0?

@mhumeSF it sounds like this was resolved for you by using sudo. I'm not sure what is causing that additional error, but feel free to open a new issue if that persists.

Yes, I can confirm that it works with docker 4.17.0 (on an M1 and M2 chip) after reinstalling the service.

@dobegor
Copy link
Contributor

dobegor commented Apr 17, 2023

Hey, jumping in here to help resolve these. A couple notes:

@danieljausovec thanks for opening this issue. Looks like this is resolved for you, but let me know if you're getting any more errors.

@dobegor can you confirm whether or not you've got this working? Can you try on the latest 4.17.0?

@mhumeSF it sounds like this was resolved for you by using sudo. I'm not sure what is causing that additional error, but feel free to open a new issue if that persists.

I can confirm that the tool works for me with DfM 4.17.0 on M1 Pro. Thanks a lot for pointing that out!

@gregnr
Copy link
Member

gregnr commented Apr 17, 2023

@danieljausovec @dobegor great! Closing this now, but if anyone is experiencing issues with 4.17.0, let me know and we can re-open. Otherwise feel free to create a new issue!

@gregnr gregnr closed this as completed Apr 17, 2023
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

7 participants