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 M1 Mac #1

Closed
dobegor opened this issue Dec 29, 2021 · 5 comments
Closed

Doesn't work on M1 Mac #1

dobegor opened this issue Dec 29, 2021 · 5 comments

Comments

@dobegor
Copy link
Contributor

dobegor commented Dec 29, 2021

While it does work for me on Intel mac, it does not on M1 one.
Log says that VM setup was done, but peer is not available:

DEBUG: (utun10) 2021/12/29 15:50:21 Setting up Wireguard on Docker Desktop VM
{"status":"Pulling from chipmk/docker-mac-net-connect/setup","id":"latest"}
{"status":"Digest: sha256:8c44fc76845a4ba0eb18de835bec6d3b79089602ec10108e760d9b2a9ec6dfb6"}
{"status":"Status: Image is up to date for ghcr.io/chipmk/docker-mac-net-connect/setup:latest"}
Adding route for 172.17.0.0/16 -> utun10 (bridge)
DEBUG: (utun10) 2021/12/29 15:50:22 Watching Docker events
DEBUG: (utun10) 2021/12/29 15:51:50 peer(SPVw…xxkI) - Sending handshake initiation
ERROR: (utun10) 2021/12/29 15:51:50 peer(SPVw…xxkI) - Failed to send handshake initiation: no known endpoint for peer

On the VM the Wireguard config is empty:

bash-5.0# wg
interface: chip0
bash-5.0# wg showconf chip0
[Interface]

@dobegor
Copy link
Contributor Author

dobegor commented Dec 29, 2021

@gregnr

It seems that error messages are only generated, but they are not logged anywhere (as fmt.Errorf just returns a formatted string): https://github.com/chipmk/docker-mac-net-connect/blob/main/client/main.go#L25

@dobegor
Copy link
Contributor Author

dobegor commented Dec 29, 2021

I've filed a PR to fix error messages: #2.
It seems, though, that just rebuilding the setup Docker image for ARM fixes the problem altogether. Can you please push an updated Docker image with arm arch to your registry @gregnr ?

@gregnr
Copy link
Collaborator

gregnr commented Dec 29, 2021

@dobegor Thanks for reaching out and all the detail. You're right - error logs are handled incorrectly. I'll take a look at your PR.

Thanks for all the debugging and glad you were able to fix it - I will definitely push an ARM variant of the image and send an update when that's done.

@gregnr
Copy link
Collaborator

gregnr commented Dec 29, 2021

@dobegor I've added an ARM64 build manifest to the image - would you mind verifying that this work on the M1?

@dobegor
Copy link
Contributor Author

dobegor commented Dec 29, 2021

@gregnr yes - tried with a clean install and it works now!
Awesome thanks for quick fix!

@dobegor dobegor closed this as completed Dec 30, 2021
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

2 participants