Nicolás Mema
10/03/2023, 7:50 PMresource "airbyte_connection" "pokeapi_bigquery_connection" {
name = "Poke API Connection"
source_id = airbyte_source_pokeapi.my_source_pokeapi.source_id
destination_id = airbyte_destination_bigquery.my_destination_bigquery.destination_id
configurations = {
streams = [
{
name = "pokemon"
sync_mode = "full_refresh_overwrite"
}
]
}
schedule = {
schedule_type = "manual"
}
namespace_definition = "custom_format"
status = "inactive"
}
response:
│ Error: failure to invoke API
│
│ with airbyte_connection.pokeapi_bigquery_connection,
│ on <http://main.tf|main.tf> line 50, in resource "airbyte_connection" "pokeapi_bigquery_connection":
│ 50: resource "airbyte_connection" "pokeapi_bigquery_connection" {
│
│ error sending request: Post "http://<server_url>:8006/v1/connections": context deadline
│ exceeded (Client.Timeout exceeded while awaiting headers)
2. POST Request API
code:
import requests
from requests.auth import HTTPBasicAuth
url = "http://<server_url>:8006/v1/connections/create"
payload = {
"name": "PokeAPI-to-Bigquery",
"sourceId": "<source_id>",
"destinationId": "<destination_id>",
"workspaceId": "<workspace_id>",
"status": "active",
"schedule": { "scheduleType": "manual" },
"configurations": {
'streams': [
{
'name': 'pokemon',
'syncMode': 'full_refresh_overwrite'
}
],
},
"dataResidency": "auto",
"namespaceDefinition": "destination",
"namespaceFormat": None,
"nonBreakingSchemaUpdatesBehavior": "ignore",
}
headers = {
"accept": "application/json",
"content-type": "application/json"
}
response = <http://requests.post|requests.post>(
url,
json=payload,
headers=headers,
auth=HTTPBasicAuth('<username>', '<password>')
)
response:
{
"type": "about:blank",
"status": 405
}
3. airbyte-api-python-sdk
code:
import airbyte
from airbyte.models import shared
s = airbyte.Airbyte(
server_url='http://<server_url>:8006/v1/connections',
security=shared.Security(
basic_auth=shared.SchemeBasicAuth(
password="<password>",
username="<username>",
),
),
)
req = shared.ConnectionCreateRequest(
configurations=shared.StreamConfigurations(
streams=[
shared.StreamConfiguration(
name='pokemon',
sync_mode=shared.ConnectionSyncModeEnum.FULL_REFRESH_OVERWRITE,
),
],
),
data_residency=shared.GeographyEnum.AUTO,
destination_id='<destination_id>',
name='PokeApi-to-BigQuery',
namespace_definition=shared.NamespaceDefinitionEnum.SOURCE,
namespace_format='destination',
non_breaking_schema_updates_behavior=shared.NonBreakingSchemaUpdatesBehaviorEnum.PROPAGATE_FULLY,
# prefix='ipsam',
schedule=shared.ConnectionSchedule(
cron_expression='0 0/30 * * * ?',
schedule_type=shared.ScheduleTypeEnum.CRON,
),
source_id='<source_id>',
status=shared.ConnectionStatusEnum.ACTIVE,
)
res = s.connections.create_connection(req)
response:
SDKError: API error occurred: Status 405
{"type":"about:blank","status":405}
Could someone help to see what I've been missing?
Thanks,
NicoJon Tan (Airbyte)
10/03/2023, 11:14 PMLouis Auneau
10/04/2023, 10:05 AM2023-10-03T14:40:02.2628737Z Error: failure to invoke API
2023-10-03T14:40:02.2628840Z
2023-10-03T14:40:02.2629016Z with module.***.module.airbyte.airbyte_connection.zendesk_support_to_bigquery_connection,
2023-10-03T14:40:02.2629262Z on ***/airbyte/connections.tf line 1, in resource "airbyte_connection" "zendesk_support_to_bigquery_connection":
2023-10-03T14:40:02.2629505Z 1: resource "airbyte_connection" "zendesk_support_to_bigquery_connection" {
2023-10-03T14:40:02.2629581Z
2023-10-03T14:40:02.2629712Z error sending request: Get
2023-10-03T14:40:02.2630014Z "<http://airbyte-airbyte-api-server-svc.dataeng.svc.cluster.local/v1/connections/c28ddf55-ae2a-4dd7-b8f2-69442b3e9bd6>":
2023-10-03T14:40:02.2630463Z context deadline exceeded (Client.Timeout exceeded while awaiting headers)
When looking at the API, some requests go through, but at somepoint the server get stuck, /health
call also get stuck. And after a couple of second, the following error appears in the logs:
2023-10-03 14:41:32 [1;31mERROR[m i.m.r.i.RecoveryInterceptor(resolveFallback):244 - Type [io.airbyte.api.server.forwardingClient.ConfigApiClient$Intercepted] executed with error: Read Timeout
io.micronaut.http.client.exceptions.ReadTimeoutException: Read Timeout
at io.micronaut.http.client.exceptions.ReadTimeoutException.<clinit>(ReadTimeoutException.java:26) ~[micronaut-http-client-core-3.10.1.jar:3.10.1]
at io.micronaut.http.client.netty.DefaultHttpClient.lambda$exchangeImpl$33(DefaultHttpClient.java:1097) ~[micronaut-http-client-3.10.1.jar:3.10.1]
at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:94) ~[reactor-core-3.5.5.jar:3.5.5]
at io.micronaut.reactive.reactor.instrument.ReactorSubscriber.onError(ReactorSubscriber.java:64) ~[micronaut-runtime-3.10.1.jar:3.10.1]
at reactor.core.publisher.SerializedSubscriber.onError(SerializedSubscriber.java:124) ~[reactor-core-3.5.5.jar:3.5.5]
at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.handleTimeout(FluxTimeout.java:295) ~[reactor-core-3.5.5.jar:3.5.5]
at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.doTimeout(FluxTimeout.java:280) ~[reactor-core-3.5.5.jar:3.5.5]
at reactor.core.publisher.FluxTimeout$TimeoutTimeoutSubscriber.onNext(FluxTimeout.java:419) ~[reactor-core-3.5.5.jar:3.5.5]
at io.micronaut.reactive.reactor.instrument.ReactorSubscriber.onNext(ReactorSubscriber.java:57) ~[micronaut-runtime-3.10.1.jar:3.10.1]
at reactor.core.publisher.FluxOnErrorReturn$ReturnSubscriber.onNext(FluxOnErrorReturn.java:162) ~[reactor-core-3.5.5.jar:3.5.5]
at io.micronaut.reactive.reactor.instrument.ReactorSubscriber.onNext(ReactorSubscriber.java:57) ~[micronaut-runtime-3.10.1.jar:3.10.1]
at reactor.core.publisher.MonoDelay$MonoDelayRunnable.propagateDelay(MonoDelay.java:271) ~[reactor-core-3.5.5.jar:3.5.5]
at reactor.core.publisher.MonoDelay$MonoDelayRunnable.run(MonoDelay.java:286) ~[reactor-core-3.5.5.jar:3.5.5]
at io.micronaut.reactive.reactor.instrument.ReactorInstrumentation.lambda$init$0(ReactorInstrumentation.java:62) ~[micronaut-runtime-3.10.1.jar:3.10.1]
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) ~[reactor-core-3.5.5.jar:3.5.5]
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) ~[reactor-core-3.5.5.jar:3.5.5]
at java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.lang.Thread.run(Thread.java:1589) ~[?:?]
2023-10-03 14:41:32 [32mINFO[m i.a.a.LoggingTrackingClient(track):55 - track. version: null, userId: null, action: Airbyte_API_Call, metadata: {user_id=00000000-0000-0000-0000-000000000000, endpoint=/v1/connections, operation=GET, status_code=500}
2023-10-03 14:41:32 [1;31mERROR[m i.m.h.s.RouteExecutor(logException):444 - Unexpected error occurred: Read Timeout
io.micronaut.http.client.exceptions.ReadTimeoutException: Read Timeout
at io.micronaut.http.client.exceptions.ReadTimeoutException.<clinit>(ReadTimeoutException.java:26) ~[micronaut-http-client-core-3.10.1.jar:3.10.1]
at io.micronaut.http.client.netty.DefaultHttpClient.lambda$exchangeImpl$33(DefaultHttpClient.java:1097) ~[micronaut-http-client-3.10.1.jar:3.10.1]
at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:94) ~[reactor-core-3.5.5.jar:3.5.5]
at io.micronaut.reactive.reactor.instrument.ReactorSubscriber.onError(ReactorSubscriber.java:64) ~[micronaut-runtime-3.10.1.jar:3.10.1]
at reactor.core.publisher.SerializedSubscriber.onError(SerializedSubscriber.java:124) ~[reactor-core-3.5.5.jar:3.5.5]
at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.handleTimeout(FluxTimeout.java:295) ~[reactor-core-3.5.5.jar:3.5.5]
at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.doTimeout(FluxTimeout.java:280) ~[reactor-core-3.5.5.jar:3.5.5]
at reactor.core.publisher.FluxTimeout$TimeoutTimeoutSubscriber.onNext(FluxTimeout.java:419) ~[reactor-core-3.5.5.jar:3.5.5]
at io.micronaut.reactive.reactor.instrument.ReactorSubscriber.onNext(ReactorSubscriber.java:57) ~[micronaut-runtime-3.10.1.jar:3.10.1]
at reactor.core.publisher.FluxOnErrorReturn$ReturnSubscriber.onNext(FluxOnErrorReturn.java:162) ~[reactor-core-3.5.5.jar:3.5.5]
at io.micronaut.reactive.reactor.instrument.ReactorSubscriber.onNext(ReactorSubscriber.java:57) ~[micronaut-runtime-3.10.1.jar:3.10.1]
at reactor.core.publisher.MonoDelay$MonoDelayRunnable.propagateDelay(MonoDelay.java:271) ~[reactor-core-3.5.5.jar:3.5.5]
at reactor.core.publisher.MonoDelay$MonoDelayRunnable.run(MonoDelay.java:286) ~[reactor-core-3.5.5.jar:3.5.5]
at io.micronaut.reactive.reactor.instrument.ReactorInstrumentation.lambda$init$0(ReactorInstrumentation.java:62) ~[micronaut-runtime-3.10.1.jar:3.10.1]
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) ~[reactor-core-3.5.5.jar:3.5.5]
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) ~[reactor-core-3.5.5.jar:3.5.5]
at java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.lang.Thread.run(Thread.java:1589) ~[?:?]
We are running Airbyte chart 0.49.4
with image versions 0.50.30
and terraform provider 0.3.4
. Which all seems to be latest at this time.
This prevent us from using the terraform provider for now. Would you have any idea of this issue’s cause ?Nicolás Mema
10/04/2023, 1:26 PMrun-ab-platform.sh
script and then use docker compose
I'm exposing the 8006 port for the airbyte-api-server
(or maybe the airbyte-proxy
🤔)
airbyte-api-server:
image: airbyte/airbyte-api-server:${VERSION}
logging: *default-logging
container_name: airbyte-api-server
restart: unless-stopped
ports:
- "8006"
environment:
- AIRBYTE_VERSION=${VERSION}
- DEPLOYMENT_MODE=${DEPLOYMENT_MODE}
- INTERNAL_API_HOST=${INTERNAL_API_HOST}
- AIRBYTE_API_HOST=${AIRBYTE_API_HOST}
networks:
- airbyte_internal
depends_on:
bootloader:
condition: service_completed_successfully
As I mention before, I'm able to create resources and destionations via terraform, what I can not do is to create the connections.
With the other two options I can interact with the API: list sources, create a destination, etc. But when it comes to create the connections, nothingArye Halioua
10/06/2023, 9:12 AMairbyte/proxy
with airbyte OSS.
I missed this message and opened an new thread right after... Sorry about the duplicate.Alexander Gregory
10/06/2023, 3:25 PM/v1/connections
endpoint and it seems to sporadically return 500
. We are using docker compose and the compose file is pretty much identical to that found here.
The logs for the airbyte-api-server
service show the error:
airbyte-api-server | 2023-10-06 14:51:58 INFO i.a.a.LoggingTrackingClient(track):55 - track. version: null, userId: null, action: Airbyte_API_Call, metadata: {user_id=00000000-0000-0000-0000-000000000000, endpoint=/v1/connections, operation=GET, status_code=500}
airbyte-api-server | 2023-10-06 14:51:58 ERROR i.m.h.s.RouteExecutor(logException):444 - Unexpected error occurred: Read Timeout
Luis Vicente
10/10/2023, 3:56 PMJon Tan (Airbyte)
10/10/2023, 4:34 PMdiscoverSchema
job when creating a connection.
Our current suggestion for a workaround is to increase the read timeout in micronaut way up for your instance. I believe the default is 10 seconds, but you should try to increase that possibly to a few minutes via micronaut.http.client.read-timeout
In the long term, we have a ticket on our roadmap for investigating both speeding up those slower synchronous tasks as well as making some of them async with notifications (possibly webhooks) on failure.
The longer term stuff would not happen until next year at the earliest.
If the increased timeout doesn’t improve things, please let us know.Luis Vicente
10/10/2023, 4:35 PMAlexander Gregory
10/10/2023, 4:35 PMLuis Vicente
10/10/2023, 4:44 PMJon Tan (Airbyte)
10/10/2023, 4:47 PMREAD_TIMEOUT
which should increase the read timeout for the Airbyte API’s micronaut client.Luis Vicente
10/10/2023, 4:48 PMLuis Vicente
10/11/2023, 8:23 AMLouis Auneau
10/12/2023, 2:34 PMJon Tan (Airbyte)
10/12/2023, 2:51 PMLuis Vicente
10/12/2023, 3:35 PMJon Tan (Airbyte)
10/12/2023, 8:35 PM