pelias / placeholder

stand-alone coarse geocoder
https://placeholder.demo.geocode.earth
MIT License
314 stars 35 forks source link

ECONNREFUSED using placeholder #149

Open kylebarron opened 5 years ago

kylebarron commented 5 years ago

I get an ECONNREFUSED error when trying to connect to the placeholder server from the pelias API. But I'm able to go to localhost:6100 and see the HTML demo.

> npm start

> pelias-api@0.0.0-development start /disk/homedirs/barronk-dua51929/local/pelias/api
> ./bin/start

2018-11-21T16:20:12.346Z - warn: [pip] pip service disabled
2018-11-21T16:20:12.356Z - info: [placeholder] using placeholder service at http://localhost:6100/
2018-11-21T16:20:12.356Z - info: [language] using language service at http://localhost:6100/
2018-11-21T16:20:12.357Z - warn: [interpolation] interpolation service disabled
2018-11-21T16:20:12.357Z - info: [libpostal] using libpostal service at http://localhost:6101/
2018-11-21T16:20:12.357Z - info: [libpostal] using libpostal service at http://localhost:6101/
pelias is now running on 10.200.0.55:3100
2018-11-21T16:31:34.346Z - debug: [api] [lang] 'en' via 'header'
2018-11-21T16:31:34.348Z - debug: [libpostal] libpostal: http://localhost:6101/
2018-11-21T16:31:34.386Z - debug: [placeholder] placeholder: http://localhost:6100/
2018-11-21T16:31:34.404Z - error: [placeholder] http://localhost:6100/ [do_not_track]: {"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":6100,"retries":0}
2018-11-21T16:31:34.416Z - warn: [api] unknown geocoding error string: connect ECONNREFUSED 127.0.0.1:6100
2018-11-21T16:31:34.675Z - info: [api] [IP removed] - - [21/Nov/2018:16:31:34 +0000] "GET /v1/search?text=%5Bremoved%5D HTTP/1.1" 400 604
2018-11-21T16:31:58.244Z - info: [api] [IP removed] - - [21/Nov/2018:16:31:58 +0000] "GET / HTTP/1.1" 301 62
2018-11-21T16:31:58.249Z - info: [api] [IP removed] - - [21/Nov/2018:16:31:58 +0000] "GET /v1 HTTP/1.1" 200 235
2018-11-21T16:31:59.394Z - info: [api] [IP removed] - - [21/Nov/2018:16:31:59 +0000] "GET /favicon.ico HTTP/1.1" 404 35

Starting placeholder, I see:

> PORT=6100 npm start
> pelias-placeholder@0.0.0-development start /disk/homedirs/barronk-dua51929/local/pelias/placeholder
> ./cmd/server.sh

loading data
[master] using 8 cpus
[master] worker forked 8203
[master] worker forked 8204
[master] worker forked 8210
[master] worker forked 8220
[master] worker forked 8221
[master] worker forked 8227
[master] worker forked 8233
[master] worker forked 8238
loading data
loading data
loading data
loading data
[worker 8221] listening on age5:6100
[worker 8203] listening on age5:6100
loading data
[worker 8204] listening on age5:6100
[worker 8220] listening on age5:6100
[worker 8233] listening on age5:6100
loading data
loading data
loading data
[worker 8210] listening on age5:6100
[worker 8238] listening on age5:6100
[worker 8227] listening on age5:6100
missinglink commented 5 years ago

That's very odd, I suspect it's something to do with how your network is configured.

It's possible that your host machine can access the port while another container cannot.

Couple things worth checking:

Let me know how you get on