Debugging my installation of Elasticsearch

Lisa Sy (she/her) - Apr 23 '20 - - Dev Community

Frustration

Yesterday, I was running into much frustration installing Elasticsearch on my Mac machine. After a lot of Googling, I patchworked a solution that worked for and want to share it with you.

After installing Elasticsearch with Homebrew and running elasticsearch, I ran into this issue:

org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: Unable to access 'path.data' (/usr/local/var/lib/elasticsearch)
Enter fullscreen mode Exit fullscreen mode

Hmm. I googled this line and found that others encountered a similar issue. When I attempted to locate this folder, it did not exist, so I learned that I needed to 1) create it and 2) give myself permission to write into it. I did this by running these two commands:

sudo mkdir /usr/local/var/lib/elasticsearch/
chmod -R $USER /usr/local/var/lib/elasticsearch
Enter fullscreen mode Exit fullscreen mode

After attempting to run elastic search this next time, it worked!

elasticsearch
Enter fullscreen mode Exit fullscreen mode

Phew, that worked! I was happy to resume the work I'd been doing. I hope this is helpful to anyone who is experiencing the same issue I had.

Happy

Other links I tried

. . . . . . . .
Terabox Video Player