Airbyte API 404 response when called from Airflow in Docker containers

Summary

Airbyte API in Docker containers gives 404 response when called from Airflow. Issue with localhost vs 127.0.0.1. Question about Airbyte binding to specific interface/address for connections.


Question

Hey all, building a demo right now with Airbyte and Airflow and having a strange issue. Both Airbyte and Airflow are running in docker containers locally (the airbyte container is from the run-ab-platform.sh script unmodified), and Airbyte keeps giving a 404 response when Airflow is calling it. I did some testing with curl on my host machine and it seems that if I curl the Airbyte API like <http://localhost:8000/api/v1/connections/sync> with the connection ID and password, it triggers the sync fine for my connection. However if I run the same exact command using 127.0.0.1 instead of localhost, it throws a 404. My /etc/hosts is so dead simple it’s just the default config on my Macbook. I’m using host.docker.internal as the hostname in my airflow job as the means to communicate and it’s obviously reaching Airbyte, just getting a 404. I know this isn’t completely specific to an Airbyte issue but I assume others must have run into this before. It seems very odd that localhost and 127.0.0.1 are behaving differently but I’m wondering if maybe Airbyte has some sort of setting to what interface/address it will bind to to accept connections? I’m not super good with networking and a bit stumped



This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. Click here if you want
to access the original thread.

Join the conversation on Slack

["airbyte-api", "docker-containers", "airflow", "localhost", "127.0.0.1", "networking"]