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

Apple M1 - Could not successfully bind to port 2181 #175

Open
julianlecalvez opened this issue May 2, 2021 · 16 comments
Open

Apple M1 - Could not successfully bind to port 2181 #175

julianlecalvez opened this issue May 2, 2021 · 16 comments

Comments

@julianlecalvez
Copy link

julianlecalvez commented May 2, 2021

Hi !
I cope with an issue when I try to run the docker image on my Apple M1 mac (see the command and error below).
At first, I tried to look for the port, which I was using because I have a zookeeper installation with brew, but after shutting it down, and even a restart, I still have this error.
And if I run : lsof -nP -iTCP -sTCP:LISTEN | grep 2181, i get nothing.
Now I'm thinking it's because of the new Apple M1 chips, because of the warning I get, but i'm not sure it's a common issue, and I'm not sure the actual error message can be related with ^^
Is there anything someone can think of that I can try ?

Thanks a lot !

$ docker run --rm --net=host lensesio/fast-data-dev

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc

runtime stack:
runtime.throw(0x512269, 0x9)
	/usr/lib/go/src/runtime/panic.go:566 +0x95
runtime.newosproc(0xc420030000, 0xc42003ffc0)
	/usr/lib/go/src/runtime/os_linux.go:160 +0x194
runtime.newm(0x5203a0, 0x0)
	/usr/lib/go/src/runtime/proc.go:1572 +0x132
runtime.main.func1()
	/usr/lib/go/src/runtime/proc.go:126 +0x36
runtime.systemstack(0x593600)
	/usr/lib/go/src/runtime/asm_amd64.s:298 +0x79
runtime.mstart()
	/usr/lib/go/src/runtime/proc.go:1079

goroutine 1 [running]:
runtime.systemstack_switch()
	/usr/lib/go/src/runtime/asm_amd64.s:252 fp=0xc42002a768 sp=0xc42002a760
runtime.main()
	/usr/lib/go/src/runtime/proc.go:127 +0x6c fp=0xc42002a7c0 sp=0xc42002a768
runtime.goexit()
	/usr/lib/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc42002a7c8 sp=0xc42002a7c0
Could not successfully bind to port 2181. Maybe some other service
in your system is using it? Please free the port and try again.
Exiting.
@blesof
Copy link

blesof commented May 14, 2021

I have the same issue, also with Apple M1 chip. Did you maybe manage to fix it by yourself?

@julianlecalvez
Copy link
Author

I have the same issue, also with Apple M1 chip. Did you maybe manage to fix it by yourself?

No, I didn't fix it. I'm still hoping an solution in this thread :)

@blesof
Copy link

blesof commented May 18, 2021

No, I didn't fix it. I'm still hoping an solution in this thread :)

If you want a quick and dirty fix which works, you can comment this in setup-and-run.sh file (lines 500 to 504):

    elif ! /usr/local/bin/checkport -port "$port"; then
        echo "Could not successfully bind to port $port. Maybe some other service"
        echo "in your system is using it? Please free the port and try again."
        echo "Exiting."
        exit 1

And also remove duphard from Dockerfile. Then you can build this image locally and it works fine.

But still I'm waiting for a fix in this thread :) Issue is caused by checkport app used there.

@ericnograles
Copy link

Looking at the Dockerfile, looks like there's several things that need to be updated/ported to work for the M1's:

  • duphard
  • checkport
  • coyote
  • gotty
  • quickcert
  • caddy
  • normcat

@faberchri
Copy link
Contributor

Created a fork with the required changes to run on arm64 / Apple M1.

Execute the following sequence of commands:

git clone https://github.com/faberchri/fast-data-dev.git
cd fast-data-dev
docker build -t faberchri/fast-data-dev .
docker run --rm -p 3030:3030 faberchri/fast-data-dev

@FilipeNavas
Copy link

FilipeNavas commented Jan 21, 2022

I was able to come up with an alternative, check it out here:

#182 (comment)

@medialwerk
Copy link

Created a fork with the required changes to run on arm64 / Apple M1.

Execute the following sequence of commands:

git clone https://github.com/faberchri/fast-data-dev.git
cd fast-data-dev
docker build -t faberchri/fast-data-dev .
docker run --rm -p 3030:3030 faberchri/fast-data-dev

Thank you very much! - It's working :-). I was thinking if it is possible to make a pull request here?

@aminch18
Copy link

Created a fork with the required changes to run on arm64 / Apple M1.

Execute the following sequence of commands:

git clone https://github.com/faberchri/fast-data-dev.git
cd fast-data-dev
docker build -t faberchri/fast-data-dev .
docker run --rm -p 3030:3030 faberchri/fast-data-dev

I am having the same issue, I've tried to do this and it's not working.

As pictured below, you can see the error.
Any idea?
image

M1 Pro Chip
macOs monterey v.12.3.1
Thanks in advance :)

@chanukyamoorthy
Copy link

Created a fork with the required changes to run on arm64 / Apple M1.

Execute the following sequence of commands:

git clone https://github.com/faberchri/fast-data-dev.git
cd fast-data-dev
docker build -t faberchri/fast-data-dev .
docker run --rm -p 3030:3030 faberchri/fast-data-dev

@faberchri , Thanks a lot the changes made in dockerFile worked

@dougdonohoe
Copy link
Contributor

Created a fork with the required changes to run on arm64 / Apple M1.

Execute the following sequence of commands:

git clone https://github.com/faberchri/fast-data-dev.git
cd fast-data-dev
docker build -t faberchri/fast-data-dev .
docker run --rm -p 3030:3030 faberchri/fast-data-dev

I built on this to create PR 185 which adds support for arm64 and amd64 at same time + along with how to build a multi-arch image using docker buildx.

@egel
Copy link

egel commented Jul 12, 2022

Yes, this PR 185 from dougdonohoe help me a lot and solved the problem of compiling an image for linux/arm64 architecture.

Thank you, kind Sir! 🙌

@henok-tesfa-kr
Copy link

Created a fork with the required changes to run on arm64 / Apple M1.
Execute the following sequence of commands:

git clone https://github.com/faberchri/fast-data-dev.git
cd fast-data-dev
docker build -t faberchri/fast-data-dev .
docker run --rm -p 3030:3030 faberchri/fast-data-dev

I am having the same issue, I've tried to do this and it's not working.

As pictured below, you can see the error. Any idea? image

M1 Pro Chip macOs monterey v.12.3.1 Thanks in advance :)

Hi
I am facing the same issue, have you found a solution for this yet?

@JBERKO9
Copy link

JBERKO9 commented Nov 25, 2022

Created a fork with the required changes to run on arm64 / Apple M1.
Execute the following sequence of commands:

git clone https://github.com/faberchri/fast-data-dev.git
cd fast-data-dev
docker build -t faberchri/fast-data-dev .
docker run --rm -p 3030:3030 faberchri/fast-data-dev

I am having the same issue, I've tried to do this and it's not working.
As pictured below, you can see the error. Any idea? image
M1 Pro Chip macOs monterey v.12.3.1 Thanks in advance :)

Hi I am facing the same issue, have you found a solution for this yet?

same here

@dougdonohoe
Copy link
Contributor

I think this is because archive.lenses.io is down. It seems it has happened before, per this issue: #186

@dougdonohoe
Copy link
Contributor

You can also just docker pull dougdonohoe/fast-data-dev and get the image I built prior to the issues with archive.lenses.io

@dougdonohoe
Copy link
Contributor

I filed a ticket with lenses.io over the weekend and they seem to have restored archive.lenses.io. It's working for me now.

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