Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECONNREFUSED using placeholder #149

Open
kylebarron opened this issue Nov 21, 2018 · 1 comment
Open

ECONNREFUSED using placeholder #149

kylebarron opened this issue Nov 21, 2018 · 1 comment

Comments

@kylebarron
Copy link

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

> [email protected] 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
> [email protected] 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
Copy link
Member

missinglink commented Nov 22, 2018

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:

  • In your comment I see that the service is bound to the host/interface age5, normally I'd expect 0.0.0.0 (all interfaces) or 127.0.0.1 (local interface), not sure what age5 is, this is a non-standard configuration which might be causing issues.
  • The docker networking is based on hostnames, I've had issues in the past when adding a new service to docker-compose.yml, services which are already running cannot resolve the new host name, this can usually be resolved by bringing all the containers down and up again

Let me know how you get on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants