Airbyte ErrorCase

문주은·2025년 3월 11일

Error name : The connection to the server was refused.

1) Detail

$ kubectl get pods -A
The connection to the server 127.0.0.1:port was refused - did you specify the right host or port?

but when I run below command, it works and all of pods status is Running.

$ kubectl --kubeconfig ~/.airbyte/abctl/abctl.kubeconfig get pods -n airbyte-abctl

2) Causes

$ kubectl get pods -A

  • 이 명령어를 실행할 때는 --kubeconfig 플래그를 사용하지 않았기 때문에, kubectl은 기본적으로 설정된 kubeconfig 파일을 사용하려고 합니다. 그런데 기본 kubeconfig 파일이 Airbyte 클러스터를 가리키지 않고, 다른 Kubernetes API 서버(예: 127.0.0.1:34975)로 연결하려고 해서 연결이 거부된 것입니다.

  • 기본적으로 연결되는 Kubernetes 클러스터가 Airbyte 클러스터가 아님: kubectl get pods -A 명령어에서 "connection refused" 에러가 발생하는 이유는 기본 kubeconfig 파일이 Airbyte 클러스터를 가리키지 않기 때문입니다.

즉, kubeconfig 파일이 Airbyte 클러스터와 연결되지 않고, 다른 잘못된 API 서버를 참조하고 있기 때문

3) Solution

Solution 1) KUBECONFIG 환경 변수로 kubeconfig 파일 설정

$ export KUBECONFIG=~/.airbyte/abctl/abctl.kubeconfig
  • KUBECONFIG 환경 변수를 설정하여 현재 셸 세션에서 기본 kubeconfig 파일로 설정
# Save it permanently
$ echo 'export KUBECONFIG=~/.airbyte/abctl/abctl.kubeconfig' >> ~/.bashrc
$ source ~/.bashrc
  • 영구적으로 적용

Solution 2) kubectl이 기본적으로 Airbyte 클러스터를 사용하도록 kubeconfig 파일을 설정

$ kubectl --kubeconfig ~/.airbyte/abctl/abctl.kubeconfig config view --raw > ~/.kube/config


Error name : Airbyte could not start the sync process or track the progress of the sync

1) Detail

2025-03-23 07:00:13 error Pipeline Exception: 
io.airbyte.workload.launcher.pipeline.stages.model.StageError: 
io.airbyte.workers.exception.ResourceConstraintException: 
Unable to start the REPLICATION pod. 
This may be due to insufficient system resources. 
Please check available resources and try again.
stackTrace: [Ljava.lang.StackTraceElement;@30a770af

2) Causes

Airbyte에서 replication pod(복제 작업을 수행하는 Pod)을 실행하려고 하지만 리소스 부족으로 인해 Pod가 생성되지 않는 문제입니다.
이 문제는 Kubernetes에서 흔히 발생하며, 아래와 같은 원인이 있을 수 있습니다.

  • CPU 및 메모리 부족: 동기화 작업을 실행할 충분한 리소스가 할당되지 않았거나, 현재 클러스터 내에서 사용 가능한 리소스가 부족함.
  • Kubernetes 클러스터의 리소스 부족: 클러스터 자체에 가용한 리소스가 부족하여 새로운 Pod를 실행할 수 없음.
  • 잘못된 Pod 설정: Airbyte의 서비스 계정(Service Account) 또는 Pod 관련 설정 문제로 인해 Pod가 정상적으로 생성되지 않음.
  • Pod 생성 시간 초과: Kubernetes에서 Pod를 생성하는 데 시간이 너무 오래 걸려 실패함.

3) Solution

Solution 1) cluster resource 확인

  • node status='Ready' 상태 확인
$ kubectl get nodes
NAME                          STATUS   ROLES          AGE   VERSION
airbyte-abctl-control-plane   Ready    control-plane  12d   v1.29.10
  • node별 리소스 사용량 확인
$ kubectl top nodes
NAME                          CPU(cores)   CPU%   MEMORY(bytes)   MEMORY%
airbyte-abctl-control-plane   390m         4%    17501Mi             55%
  • pod별 리소스 사용량 확인
$ kubctl top pods -all-namespaces

Solution 2) resource 할당 증가



Error name : server shut down issue

1) Detail

AWS EC2에 올라간 서버가 자꾸 shut down 되는 이슈 발생.
shut down 되었다가 rerun 될때, kube-proxy pod 에서 아래 issue 발생
kube-proxy command failed too many open files

2) Causes

open file limits

$ ulimit -n
1024
$ open files 		(-n) 1024
  • 현재 노드의 한계 확인하면 1024로 너무 낮은 값
  • ulimit 값이 너무 낮아서 kube-proxy가 열 수 있는 파일 수 제한에 걸림

3) Solution

Solution 1) 열 수 있는 파일 수 늘리기

  • 영구 반영하는 방법
  • 모든 유저에 대해 open files의 hard/soft limit 값을 65535개로 설정
$ sudo vi /etc/security/limits.conf
#<domain>          <type>               <item>             <value>
#  유저명        soft 또는 hard limit    설정할 항목       설정 값
    *                     hard                         nofile              65535
    *                     soft                          nofile              65535

Template

Error name :

1) Detail

2) Causes

3) Solution

Solution 1) AAA
Solution 2) BBB

profile
Data Engineer

0개의 댓글