docker: Error thrown at pelias elastic create: EHOSTUNREACH

I’m getting the following output when running the pelias elastic create command. I can reach that internal URL just fine in the browser as well as curl.

$ pelias elastic create
Creating central-ohio_schema_run ... done

--------------
 create index 
--------------

Elasticsearch ERROR: 2020-10-07T20:36:28Z
  Error: Request error, retrying
  GET http://elasticsearch:9200/ => connect EHOSTUNREACH 192.168.160.2:9200
      at Log.error (/code/pelias/schema/node_modules/elasticsearch/src/lib/log.js:239:56)
      at checkRespForFailure (/code/pelias/schema/node_modules/elasticsearch/src/lib/transport.js:298:18)
      at HttpConnector.<anonymous> (/code/pelias/schema/node_modules/elasticsearch/src/lib/connectors/http.js:171:7)
      at ClientRequest.wrapper (/code/pelias/schema/node_modules/lodash/lodash.js:4949:19)
      at ClientRequest.emit (events.js:223:5)
      at Socket.socketErrorListener (_http_client.js:415:9)
      at Socket.emit (events.js:223:5)
      at emitErrorNT (internal/streams/destroy.js:92:8)
      at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
      at processTicksAndRejections (internal/process/task_queues.js:81:21)

Elasticsearch WARNING: 2020-10-07T20:36:29Z
  Unable to revive connection: http://elasticsearch:9200/

Elasticsearch WARNING: 2020-10-07T20:36:29Z
  No living connections

NoConnections [Error]: No Living connections
    at sendReqWithConnection (/code/pelias/schema/node_modules/elasticsearch/src/lib/transport.js:266:15)
    at next (/code/pelias/schema/node_modules/elasticsearch/src/lib/connection_pool.js:243:7)
    at processTicksAndRejections (internal/process/task_queues.js:76:11) {
  message: 'No Living connections'
}
unsupported elasticsearch version. try: >=7.4.2

pelias-docker: current version docker-ce 3:19.03.13-3.el8
container-selinux noarch 2:2.135.0-1.module+el8.2.1+6849+893e4f4a containerd.io 1.3.7-3.1.el8
docker-ce-cli 1:19.03.13-3.el8
libcgroup 0.41-19.el8

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 25 (14 by maintainers)

Most upvoted comments

agh ok, then I think you (@Asherslab) have a different issue as @darmentrout said he has elasticsearch running.

We’re aware of the permission issue, it’s being tracked in https://github.com/pelias/docker/pull/74, its common when users use a root account (or sudo) to create the data dir. We are one of the few projects ‘doing it properly’ by running the docker containers as non-root users, so the docker user doesn’t have permission to access directories created by root.

Regarding this issue, here is the script I used to test the bug report with the output from my machine:

#!/bin/bash

TMPDIR='/tmp/bugreport'
rm -rf "${TMPDIR}"
mkdir -p "${TMPDIR}"

cd "${TMPDIR}"
git clone git@github.com:pelias/docker.git && cd docker/projects/portland-metro

# configure data dir
mkdir ./data
if [[ "$OSTYPE" == "darwin"* ]]; then
  gsed -i '/DATA_DIR/d' .env
else
  sed -i '/DATA_DIR/d' .env
fi
echo 'DATA_DIR=./data' >> .env

# ensure everything is down
pelias compose down

# create index
pelias compose pull
pelias elastic start
pelias elastic wait
pelias elastic create
➜  /tmp ./bug.sh
Cloning into 'docker'...
remote: Enumerating objects: 17, done.
remote: Counting objects: 100% (17/17), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 1639 (delta 5), reused 11 (delta 4), pack-reused 1622
Receiving objects: 100% (1639/1639), 446.72 KiB | 1.36 MiB/s, done.
Resolving deltas: 100% (1045/1045), done.
Stopping pelias_elasticsearch ... done
Removing pelias_elasticsearch ... done
Removing network pelias_default
Pulling libpostal     ... done
Pulling schema        ... done
Pulling api           ... done
Pulling placeholder   ... done
Pulling whosonfirst   ... done
Pulling openstreetmap ... done
Pulling openaddresses ... done
Pulling transit       ... done
Pulling csv-importer  ... done
Pulling polylines     ... done
Pulling interpolation ... done
Pulling pip           ... done
Pulling elasticsearch ... done
Pulling fuzzy-tester  ... done
Creating network "pelias_default" with driver "bridge"
Creating pelias_elasticsearch ... done
waiting for elasticsearch service to come up
.........Elasticsearch up!
Creating pelias_schema_run ... done

--------------
 create index
--------------

[put mapping] 	 pelias { acknowledged: true, shards_acknowledged: true, index: 'pelias' }