Search code examples
elasticsearchapple-m1

Cannot run old elasticsearch on m1 chip (with rosetta2)


My current project requires me to use elasticsearch:2.4.6-alpine docker image. The container seems running correctly and I am able to go inside the container using CLI. But when curl http://localhost:9200 executed it says:

curl: (52) Empty reply from server

Tried the same curl command from inside the container and it says:

curl: (7) Failed to connect to localhost port 9200: Connection refused

The elasticsearch service seems not exists when I use rc-status list from inside the container. Anyone have any idea?


Solution

  • I found the solution was to rebuild the elastic search image on your M1 Mac. Just search the source code for particular version on GitHub and build the docker image.