hive.Metadata.HiveException: MetaException

김진규·2022년 8월 21일
0
post-thumbnail

상황

프로세스는 전체 기동중이지만
1. impala-shell 접속 x,
2. beeline 접속 x
3. Dbeaver를 통한 impala 접속 x

Unable to connect to hostname:26000

카탈로그 데몬과도 통신을 못하는 상황.

정리

  1. TTransportException: Could not connect any of (ip, 21050)

    impala daemon과 hiveserver 연결 안되는 상태.

  1. TTransportException: Could not connect any of (ip, 21000)

    impala shell 접속 불가

  1. Unable to connect to ip:26000

    impala catalog daemon 통신 불가.

  1. beeline 접속 불가.

    hiveserver2.log 확인

hive.Metadata.HiveException: MetaException(message:Got exception: org.apache.hadoop.hive.metastore.api.MetaException HikariPool - Connection is not available, request timed out after 3

조치

hive 재시작 후 impala 재시작하여 일단 해결

원인 파악

hive metadb max connection 확인

cat /var/lib/data/postgresql.conf | grep max_connection – max_connection

값 1000 적용 확인.

ps -ef | grep postgres | grep idle | wc –l 

56개 세션 확인.

superuser_reserved_connections 값 확인

max_connections minus superuser_reserved_connections is the maximum for the sum of all non-superuser connections to all databases in the cluster.

해당 설정은 PostgreSQL 수퍼유저의 연결용으로 예약된 연결 "슬롯" 수를 결정한다
활성화된 동시 연결 수가 max_connections에서 superuser_reserved_connections를 뺀 값 이상이면 수퍼유저만 새롭게 연결되고 복제 연결은 되지 않는다.

조치 - postgresql hive user -> superuser로 변경하여 DB 커넥션에 우선순위 부여.

alter user hive with superuser;

커넥션이 몰려서 그런것 같은데, 솔직히 다른 이유가 있을 듯 하다.
뭐지..

profile
천천히

0개의 댓글