klokantech / osmnames-sphinxsearch

Geocoder search engine for OSMNames.org data powered by sphinx search
https://osmnames.org/
MIT License
77 stars 24 forks source link

indexer (exit status 1; not expected) #57

Closed michaelkrog closed 6 years ago

michaelkrog commented 6 years ago

Hi.

I tried following the docs in order to set up my own instance. As I only wanted the data for Sweden I downloaded the latest planet from https://github.com/OSMNames/OSMNames/releases/download/v2.0.4/planet-latest_geonames.tsv.gz and did this (on my Mac, hence the difference in regards to zcat):

zcat < ./planet-latest_geonames.tsv.gz | awk -F '\t' -v OFS='\t' 'NR == 1 || $16 == "se"' > sweden.tsv

I then started up the docker container:

docker run -d -v /tmp/sweden.tsv:/data/input/ -p 80:80 klokantech/osmnames-sphinxsearch

I tried to access the REST api, but it failed:

$ curl http://localhost/q/test.js
{"count": 20, "startIndex": 0, "message": "(2003, \"Can't connect to MySQL server on '127.0.0.1' (111)\")", "totalResults": 0, "results": []}

I checked out the log:

2018-02-02 14:42:54,633 CRIT Supervisor running as root (no user in config file)
2018-02-02 14:42:54,633 INFO Included extra file "/etc/supervisor/conf.d/nginx.conf" during parsing
2018-02-02 14:42:54,633 INFO Included extra file "/etc/supervisor/conf.d/sphinx.conf" during parsing
2018-02-02 14:42:54,633 INFO Included extra file "/etc/supervisor/conf.d/web.conf" during parsing
2018-02-02 14:42:54,643 INFO RPC interface 'supervisor' initialized
2018-02-02 14:42:54,643 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2018-02-02 14:42:54,643 INFO supervisord started with pid 1
2018-02-02 14:42:55,649 INFO spawned: 'indexer' with pid 7
2018-02-02 14:42:55,651 INFO spawned: 'nginx' with pid 8
2018-02-02 14:42:55,653 INFO spawned: 'websearch' with pid 9
2018-02-02 14:42:55,666 INFO exited: indexer (exit status 1; not expected)
2018-02-02 14:42:55,668 INFO reaped unknown pid 10
2018-02-02 14:42:56,803 INFO spawned: 'indexer' with pid 27
2018-02-02 14:42:56,804 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-02-02 14:42:56,804 INFO success: websearch entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-02-02 14:42:56,812 INFO exited: indexer (exit status 1; not expected)
2018-02-02 14:42:56,813 INFO reaped unknown pid 28
2018-02-02 14:42:58,821 INFO spawned: 'indexer' with pid 32
2018-02-02 14:42:58,828 INFO exited: indexer (exit status 1; not expected)
2018-02-02 14:42:58,829 INFO reaped unknown pid 33
2018-02-02 14:43:01,837 INFO spawned: 'indexer' with pid 37
2018-02-02 14:43:01,848 INFO exited: indexer (exit status 1; not expected)
2018-02-02 14:43:01,848 INFO gave up: indexer entered FATAL state, too many start retries too quickly
2018-02-02 14:43:01,849 INFO reaped unknown pid 38

Did I do something wrong?

MartinMikita commented 6 years ago

Thanks for your note.

There is a typo mistake in this specific simple command.

The right command should be:

docker run -d \
    -v /tmp/sweden.tsv:/data/input/data.tsv \
    -p 80:80 \
    klokantech/osmnames-sphinxsearch

or better:

docker run -d \
    -v /tmp/:/data/input/ \
    -p 80:80 \
    klokantech/osmnames-sphinxsearch

Can you confirm, that these two commands are working as expected for you?