James Rosenthal
02/08/2023, 11:28 PMairbyte_instance = airbyte_resource.configured(
{
"host": os.getenv("AIRBYTE_HOST"),
"port": os.getenv("AIRBYTE_PORT"),
"username": os.getenv("AIRBYTE_USERNAME"),
"password": os.getenv("AIRBYTE_PASSWORD"),
}
)
With host as "localhost"
, port as "8000"
, username as "airbyte"
, and password as "password"
. From the Airbyte docker, I can see "POST /api/v1/workspaces/list HTTP/1.1" 401 701 "-" "python-requests/2.28.2"
I keep getting the error: Request to Airbyte API failed: 401 Client Error: Unauthorized for url: <http://localhost:8000/api/v1/workspaces/list>
Am I getting any of the credentials wrong or are there any settings I need to change in the Dagster UI? Let me know if anyone know of a fix. Thanks!airbyte_instance = airbyte_resource.configured(
{
"host": "localhost",
"port": "8000",
"request_additional_params": {"auth": ("airbyte", "password")},
},
)
and I got the same errorDusty Shapiro
02/09/2023, 1:01 AM5432
?James Rosenthal
02/09/2023, 1:08 AM5432
is the port I have for Postgres... shouldn't the Airbyte connection use 8000
?
I tried using host.docker.internal
earlier and it did not work either. Let me double check thatDusty Shapiro
02/09/2023, 1:10 AMJames Rosenthal
02/09/2023, 1:11 AMWalid El Bouchikhi
02/09/2023, 8:21 AMJames Rosenthal
02/09/2023, 2:14 PMWalid El Bouchikhi
02/09/2023, 2:28 PMairbyte/password
?
Make sure these environment variables are set in your airbyte container
BASIC_AUTH_USERNAME=airbyte
BASIC_AUTH_PASSWORD=password
If you are using docker-compose (with the airbyte repo checked), check the .env
file.
Also, to use an environment variable using dagster for your airbyte instance, try this
{
"host": {"env": "AIRBYTE_HOST"},
"port": { "env": "AIRBYTE_PORT"},
"username": { "env": "AIRBYTE_USER"},
"password" : { "env" : "AIRBYTE_PASSWORD"},
}
Make sure these environment variables are defined in the dagster container (in the .env
file if you are running dagster locally).
I would recommend hard-coding these credentials at first, then retrieving them via the environment variables if that works.James Rosenthal
02/09/2023, 4:41 PM{"env": "CREDENTIAL"}
formatWalid El Bouchikhi
02/09/2023, 4:43 PMJames Rosenthal
02/09/2023, 4:48 PMairbyte
and password
workedWalid El Bouchikhi
02/09/2023, 4:49 PM{
"host": "localhost",
"port": "8000,
"username": "airbyte",
"password" : "password"
}
James Rosenthal
02/09/2023, 5:03 PM{
"host": "localhost",
"port": "8000",
"username": "airbyte",
"password": "password"
}
and also setting environment variables with:
{
"host": {"env": "AIRBYTE_HOST"},
"port": {"env": "AIRBYTE_PORT"},
"username": {"env": "AIRBYTE_USERNAME"},
"password" : {"env" : "AIRBYTE_PASSWORD"},
}
and both times I get the same error: Request to Airbyte API failed: 401 Client Error: Unauthorized for url: <http://localhost:8000/api/v1/workspaces/list>
Walid El Bouchikhi
02/09/2023, 5:04 PMlocalhost
You'll need to deploy it on the cloudJames Rosenthal
02/09/2023, 5:05 PMWalid El Bouchikhi
02/09/2023, 5:09 PMngrok http 8000
, it will output an url and a port that you will have to set for your airbyte instance configJames Rosenthal
02/09/2023, 5:10 PMForwarding https://{####}.<http://ngrok.io|ngrok.io> -> <http://localhost:8000>
Walid El Bouchikhi
02/09/2023, 5:32 PMJames Rosenthal
02/09/2023, 5:33 PM