meilisearch: Heed error: Function not implemented (os error 38)
Describe the bug Running the container fails due to ‘heed error’. Changing version doesn’t seem to make a difference. Perhaps related to underlying Rust function?
To Reproduce Steps to reproduce the behaviour:
- docker-compose.yml contains…
search:
image: getmeili/meilisearch:v0.18.1
restart: always
volumes:
- ./data.ms:/data.ms
ports:
- 7700:7700
- docker-compose up
In container log you will see…
Error: heed error; Function not implemented (os error 38)
Have tested with image 0.13.0, 0.16.0, 0.17.0, and 0.18.1. Using version 0.12.0 you will see a different error.
Expected behavior A clear and concise description of what you expected to happen.
Desktop (please complete the following information): Docker Desktop, also reproducible on Google Cloud, Cloud Compute, VM Instance.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 5
- Comments: 29 (13 by maintainers)
As Marin pointed out, the macos-amd64 binary works on M1, thanks to Rosetta. But to make it work on a docker image, you have to use the linux-armv8 binary. This is my Dockerfile for Meilisearch with arm64v8 for Apple M1 using ubuntu.
docker build -t meilisearch_m1 .
docker run -it --rm -p 7700:7700 meilisearch_m1
There is another solution here, it’s for RapsberryPi, but It should work on M1 too.
@robjtede sorry wrong rob 😅
Brand new M1 Max user here. 😅
Just chiming in that I also ran into issues with this as well. I assume as more of these new Macbook Pros ship, the more we will start to see this.
What I attempted
MySQL has an issue that is similar to this. I just had to define the
platform
to my docker-compose.yml file:I attempted this, but it did not work:
I believe it is failing because the image is not “multi-arch”? See this for more detail: https://docs.docker.com/desktop/mac/apple-silicon/
Workaround (until official support comes out)
I used the community member contributed image (pointed out in https://github.com/meilisearch/MeiliSearch/issues/1347#issuecomment-913358145 )
Why this workaround will NOT work longterm
docker-compose.yml
files with a team (some with Intel and some with M1),Proposed solution
platform: linux/x86_64
https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/
@MarinPostma would be nice to release on docker hub a build for m1 arm64.
@robsontenorio I agree, we first need to find a reliable way to build the artifacts on the CI for the M1, which I am not exactly sure how to do. We don’t have much time to focus on that, so some guidance on how to do will definitely help us do that faster.
My main question is if it is possible to cross-compile meilisearch from the M1 from a x86 mac, it this is possible, we may be able tot do it directly from GHA.
I have investigated a bit, and it seems that docker uses qemu to emulate x86 architecture on the m1. This may be the cause of the issue, and there isn’t much we can do to directly address this issue.
Here are 3 workarounds:
No problem! Feel free to ask your questions here or in our Slack if you don’t know where you can ask 😄
@curquiza nevermind, I got confused with the rust sdk version and the meilisearch version. Looks like I was trying to use meili v0.20.0 instead of the v0.29.0. Sorry, my bad.