Updating replication external ports at the Db2 data source
When re-deploying or restoring Q Replication on your Db2 instance or Db2 cluster (for IBM Software Hub Versions prior to 5.2.0), the disabling and
re-enabling of the service changes the port numbers used by the Q Replication service. This causes
synchronization issues between the Kubernetes services and the services inside the
qrep container. You must resynchronize your services by updating the external port
numbers in the replication metadata.
About this task
This procedure uses a script to update the port numbers for the external REST server, the IBM® MQ
for the capture process, and the IBM® MQ for the apply process. In the following code examples,
1414 is the internal port number for capture and 1415 is the
internal port number for apply. The example port number for the REST API server is
9444.
haproxy configuration, you do not need to run the
qrep-expose-nodeports.sh script that is described in Step 3 of this procedure.
However, you will need to manage your own Db2® and Q
Replication
services.Procedure
Examples
The following example shows the command syntax and output for retrieving the common prefix for the clusterwhmpp1. See step 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
The following example shows the command syntax and output for collecting the external
port numbers for services on the cluster, whmpp1. See step 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
The following example shows the command syntax for retrieving the port number for the
Db2 SSL service on the cluster
whmpp1: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
The following example shows the command syntax for retrieving the port numbers for the Q
Replication REST API server, capture MQ service and apply MQ service on the Db2 on cluster,
whmpp1. 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