akvo / akvo-lumen

Make sense of your data

Home Page:https://akvo.org/akvo-lumen

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lumen-client nginx cannot contact lumen-backend using "localhost"

MichaelAkvo opened this issue · comments

Context

When trying to import data from akvo-flow, the job-execution status is just clj-http: status 500 in the library.

Problem or idea

When the lumen-client container tries to call the lumen-backend container e.g http://localhost/api/job_executions/dataset/ , it just fails because it tries to use the IPv6 localhost addess.

2022/07/21 13:07:48 [crit] 6#6: *8947235 connect() to [::1]:3000 failed (99: Address not available) while connecting to upstream, client: 10.4.0.5, server: _, request: "POST /api/datasets HTTP/1.0", upstream: "http://[::1]:3000/api/datasets", host: "ecosia.akvolumen.org", referrer: "https://ecosia.akvolumen.org/library"

Solution or next step

For now, the simplest thing would be to replace all instances of localhost in https://github.com/akvo/akvo-lumen/blob/64e22a1486bff20d6130c29ff87a2dc9ec0b3377/client/default.conf with 127.0.0.1.

Otherwise, I don't know how to force the container (runs alpine) nor nginx to use IPv4.

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.