Db2 Warehouse 데이터 원본에서 복제 외부 포트 업데이트하기
Db2 인스턴스 또는 Db2 클러스터 ( IBM Software Hub 5.2.0 이전 버전의 경우) 에서 Q Replication을 다시 배포하거나 복원할 때, 서비스를 비활성화했다가 다시 활성화하면 Q Replication 서비스에서 사용하는 포트 번호가 변경됩니다. 이로 인해 Kubernetes 서비스와 qrep 컨테이너 내부의 서비스 간에 동기화 문제가 발생합니다. 복제 메타데이터에서 외부 포트 번호를 업데이트하여 서비스를 재동기화해야 합니다.
이 태스크에 대한 정보
이 프로시저는 스크립트를 사용하여 외부 REST 서버의 포트 번호, 캡처 프로세스의 IBM® MQ 및 적용 프로세스의 IBM® MQ 를 업데이트합니다. 다음 코드 예제에서 1414 는 캡처를 위한 내부 포트 번호이고 1415 는 적용을 위한 내부 포트 번호입니다. REST API 서버의 예제 포트 번호는 9444입니다.
참고:
haproxy 구성을 사용하지 않는 경우 이 프로시저의 3단계에서설명한 qrep-expose-nodeports.sh 스크립트를 실행할 필요가 없습니다. 그러나 사용자 자신의 Db2® 및 Q Replication 서비스를 관리해야 합니다.프로시저
예
다음 예제는 클러스터whmpp1의 공통 접두부를 검색하기 위한 명령 구문 및 출력을 표시합니다. 2단계를 참조하십시오.oc get po | grep whmpp1
c-whmpp1-db2u-0 1/1 Running 0 43d
c-whmpp1-db2u-1 1/1 Running 0 42d
c-whmpp1-etcd-0 1/1 Running 0 43d
c-whmpp1-instdb-tc7dd 0/1 Completed 0 43d
c-whmpp1-ldap-5799978b-wwkpf 1/1 Running 0 43d
c-whmpp1-qrep-67944f5899-hn5q2 1/1 Running 0 43d
c-whmpp1-restore-morph-jdd4g 0/1 Completed 0 43d
다음 예제는 클러스터 whmpp1의 서비스에 대한 외부 포트 번호를 수집하기 위한 명령 구문 및 출력을 표시합니다. 4단계를 참조하십시오.oc get svc | grep whmpp1
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
c-whmpp1-db2u ClusterIP 172.30.194.248 <none> 50000/TCP,50001/TCP,25000/TCP,25001/TCP,25002/
TCP,25003/TCP,25004/TCP,25005/TCP 44d
c-whmpp1-db2u-engn-svc NodePort 172.30.152.30 <none> 50001:31576/TCP,50000:31397/TCP 44d
c-whmpp1-db2u-head-engn-svc NodePort 172.30.46.162 <none> 50001:30678/TCP,50000:32065/TCP 44d
c-whmpp1-db2u-internal ClusterIP None <none> 50000/TCP,9443/TCP,50052/TCP 44d
c-whmpp1-etcd ClusterIP None <none> 2379/TCP,2380/TCP 44d
c-whmpp1-ldap ClusterIP 172.30.89.227 <none> 50389/TCP 44d
c-whmpp1-qrep-mq-svc NodePort 172.30.200.249 <none> 1414:30827/TCP,1415:32409/TCP 44d
c-whmpp1-qrep-rest-svc NodePort 172.30.192.96 <none> 9444:31023/TCP 44d
c-whmpp1-tools ClusterIP 172.30.70.78 <none> 53/TCP,53/UDP 44d
c-whmpp2-db2u ClusterIP 172.30.38.90 <none> 50000/TCP,50001/TCP,25000/TCP,25001/TCP,25002/
TCP,25003/TCP,25004/TCP,25005/TCP 43d
c-whmpp2-db2u-engn-svc NodePort 172.30.181.123 <none> 50001:30138/TCP,50000:30526/TCP 43d
c-whmpp2-db2u-head-engn-svc NodePort 172.30.203.11 <none> 50001:30831/TCP,50000:31430/TCP 43d
c-whmpp2-db2u-internal ClusterIP None <none> 50000/TCP,9443/TCP,50052/TCP 43d
c-whmpp2-etcd ClusterIP None <none> 2379/TCP,2380/TCP 43d
c-whmpp2-ldap ClusterIP 172.30.185.158 <none> 50389/TCP 43d
c-whmpp2-qrep-mq-svc NodePort 172.30.147.231 <none> 1414:31496/TCP,1415:31139/TCP 43d
c-whmpp2-qrep-rest-svc NodePort 172.30.247.204 <none> 9444:32483/TCP 43d
c-whmpp2-tools ClusterIP 172.30.168.83 <none> 53/TCP,53/UDP 43d
db2u-day2-ops-controller-
manager-metrics-service ClusterIP 172.30.106.68 <none> 8443/TCP 44d
다음 예제는 클러스터 whmpp1에서 Db2 SSL 서비스의 포트 번호를 검색하기 위한 명령 구문을 표시합니다.oc get svc | grep "whmpp1" | grep "db2u-eng-svc"
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
c-whmpp1-db2u-engn-svc NodePort 172.30.152.30 <none> 50001:31576/TCP,50000:31397/TCP 44d
다음 예는 Q Replication REST API 서버의 포트 번호를 검색하고 MQ 서비스를 캡처하며 클러스터 whmpp1의 Db2 에서 MQ 서비스를 적용하기 위한 명령 구문을 표시합니다.oc get svc | grep "whmpp1" | grep "qrep"
c-whmpp1-qrep-mq-svc NodePort 172.30.200.249 <none> 1414:30827/TCP,1415:32409/TCP q 44d
c-whmpp1-qrep-rest-svc NodePort 172.30.192.96 <none> 9444:31023/TCP 44d