openeventdata/mordecai

Status 404 Gazetteer not running in Elasticsearch

drtfraser opened this issue · 1 comments

I cannot get mordecai working on my Windows 10 machine. I have followed the instructions on the Github page but I seem to have a problem with step 3.

I can get a docker container running using:
docker run -d -p 127.0.0.1:9200:9200 -v //c/Users/my_path/geonames_index/:/usr/share/elasticsearch/data elasticsearch:5.5.2

I verify that it is running using:
docker container ls

However, in Python (3.5.0) when I then try:
from mordecai import Geoparser
geo = Geoparser()
geo.geoparse("I traveled from Oxford to Ottawa.")

I get this response:
GET http://localhost:9200/geonames/_count [status:404 request:0.159s]
...
ConnectionError: [WinError for instructions on setting up Geonames/Elasticsearch] Mordecai needs access to the Geonames/Elasticsearch gazetteer to function.: 'See https://github.com/openeventdata/mordecai#installation-and-requirements'

I have taken a look at some of the other issues you have answered and see that my issue is similar to this one. I have tried creating a elasticsearch.yaml file, and running the docker command:
docker run -d -p 127.0.0.1:9200:9200 -e ES_JAVA_OPTS="-Xms8g -Xmx8g" -e "bootstrap.memory_lock=true" -v //c/Users/my_path/geonames_index:/usr/share/elasticsearch/data -v //c/Users/my_path/elasticsearch.yaml:/usr/share/elasticsearch/config/elasticsearch.yml elasticsearch:5.5.2
as is suggested in that thread. But when I do so, docker container ls indicates that no container is running.

Update: The problem was my docker permissions. By Opening Docker Desktop, navigating to the Shared Drives tab, and checking the drives I wanted to share, applying changes, restarting my machine, and then re-checking drives to share, and applying changes the issue was resolved and I was able to use original docker command docker run -d -p 127.0.0.1:9200:9200 -v //c/Users/my_path/geonames_index/:/usr/share/elasticsearch/data elasticsearch:5.5.2 to use the package. Feel free to close this issue.

Thanks for the detailed issue and the workaround!