akvo / akvo-lumen

Make sense of your data
https://akvo.org/akvo-lumen
GNU Affero General Public License v3.0
63 stars 18 forks source link

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

Closed MichaelAkvo closed 11 months ago

MichaelAkvo commented 2 years ago

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.

stale[bot] commented 1 year ago

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.