Installing Registration Processor (version 3 branch 1.2.0.1)

Hi! I encountered issues in installing Registration Processor
While following the instruction :
cd topic
./create_topics.sh
there were dependency issues:

rke@mosipv3-vm2:~/mosip-infra/deployment/v3/mosip/regproc/topic$ ./create_topics.sh
Enter IAM username: admin
Creating topics
Traceback (most recent call last):
File “create_topics.py”, line 7, in
import pandas as pd
ModuleNotFoundError: No module named ‘pandas’

i installed pandas sudo apt install python3-pandas then tried again
another dependency issue
ModuleNotFoundError: No module named ‘sqlalchemy’

i installed pyhton 3 sqlalchemy since pandas is using python 3
sudo apt install python3-pip
pip3 install SQLAlchemy

too many errors so I installed python2 version of sqlalchemy and removed python3 version
sudo apt-get install sqlalchemy

another dependency error among others again
ModuleNotFoundError: No module named ‘psycopg2’

I installed pip install psycopg2-binary

still too may errors:
The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “create_topics.py”, line 36, in
main()
File “create_topics.py”, line 33, in main
upload_xlsx(args.xls, args.user, args.db_user, args.db_pwd, args.db_host, args.db_port)
File “create_topics.py”, line 17, in upload_xlsx
df.to_sql(‘topic’, engine, index=False, if_exists=‘append’)
File “/usr/lib/python3/dist-packages/pandas/core/generic.py”, line 2702, in to_sql
sql.to_sql(
File “/usr/lib/python3/dist-packages/pandas/io/sql.py”, line 509, in to_sql
pandas_sql.to_sql(
File “/usr/lib/python3/dist-packages/pandas/io/sql.py”, line 1319, in to_sql
table.create()
File “/usr/lib/python3/dist-packages/pandas/io/sql.py”, line 641, in create
if self.exists():
File “/usr/lib/python3/dist-packages/pandas/io/sql.py”, line 628, in exists
return self.pd_sql.has_table(self.name, self.schema)
File “/usr/lib/python3/dist-packages/pandas/io/sql.py”, line 1343, in has_table
return self.connectable.run_callable(
File “”, line 2, in run_callable
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/util/deprecations.py”, line 402, in warned
return fn(*args, **kwargs)
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py”, line 3223, in run_callable
with self.connect() as conn:
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py”, line 3315, in connect
return self._connection_cls(self, close_with_result=close_with_result)
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py”, line 96, in init
else engine.raw_connection()
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py”, line 3394, in raw_connection
return self._wrap_pool_connect(self.pool.connect, _connection)
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py”, line 3364, in _wrap_pool_connect
Connection.handle_dbapi_exception_noconnection(
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py”, line 2198, in handle_dbapi_exception_noconnection
util.raise
(
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/util/compat.py”, line 208, in raise

raise exception
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py”, line 3361, in _wrap_pool_connect
return fn()
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/pool/base.py”, line 320, in connect
return _ConnectionFairy._checkout(self)
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/pool/base.py”, line 884, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/pool/base.py”, line 486, in checkout
rec = pool._do_get()
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/pool/impl.py”, line 146, in do_get
self.dec_overflow()
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py”, line 70, in exit
compat.raise
(
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/util/compat.py”, line 208, in raise

raise exception
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/pool/impl.py”, line 143, in _do_get
return self._create_connection()
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/pool/base.py”, line 266, in _create_connection
return _ConnectionRecord(self)
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/pool/base.py”, line 381, in init
self.__connect()
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/pool/base.py”, line 678, in connect
pool.logger.debug(“Error on connect(): %s”, e)
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py”, line 70, in exit
compat.raise
(
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/util/compat.py”, line 208, in raise

raise exception
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/pool/base.py”, line 673, in __connect
self.dbapi_connection = connection = pool._invoke_creator(self)
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/engine/create.py”, line 578, in connect
return dialect.connect(*cargs, **cparams)
File “/home/rke/.local/lib/python3.8/site-packages/sqlalchemy/engine/default.py”, line 598, in connect
return self.dbapi.connect(*cargs, **cparams)
File “/home/rke/.local/lib/python3.8/site-packages/psycopg2/init.py”, line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name “api-internal.x.x.x” to address: System error

In short to avoid these errors, how do I install the dependencies for the create_topic.sh ?

In addition here are the describe and logs for the regproc pods with errors:

rke@mosipv3-vm2:~/mosip-infra/deployment/v3/mosip/regproc$ kubectl get pods -A | grep regproc
regproc regproc-camel-758c6f5b9b-t2rk4 2/2 Running 0 21m
regproc regproc-group1-7bdb465d7c-2xxmm 1/2 Running 3 (4m43s ago) 21m
regproc regproc-group2-67b9478c9-bkvmc 2/2 Running 2 (10m ago) 21m
regproc regproc-group3-76b47cbc86-dhvcz 2/2 Running 1 (15m ago) 21m
regproc regproc-group4-647bbf7d45-jtfz6 2/2 Running 1 (15m ago) 21m
regproc regproc-group5-5fbbbf54cf-55k54 2/2 Running 0 21m
regproc regproc-group6-5ddd9f8445-lvzzz 1/2 Running 3 (4m49s ago) 21m
regproc regproc-group7-74f4986f59-wcd5w 2/2 Running 1 (15m ago) 21m
regproc regproc-notifier-864d555549-8ndk5 2/2 Running 4 (16m ago) 21m
regproc regproc-pktserver-66f865986-gblkh 2/2 Running 0 21m
regproc regproc-reprocess-7ccf7cc6c9-vf9sp 2/2 Running 1 (15m ago) 21m
regproc regproc-salt-955jc 0/1 Completed 0 21m
regproc regproc-status-57f5479d68-dcvph 2/2 Running 0 21m
regproc regproc-trans-85dfd7c779-h2vz4 2/2 Running 0 21m
regproc regproc-workflow-6d9d964b4b-5b5cr 2/2 Running 1 (16m ago) 21m

kubectl describe pod regproc-group1-7bdb465d7c-2xxmm -n regproc

Events

Normal Created 18m kubelet Created container regproc-group1
Normal Started 18m kubelet Started container regproc-group1
Warning Unhealthy 8m47s (x56 over 18m) kubelet Startup probe failed: HTTP probe failed with statuscode: 500
Warning Unhealthy 3m52s kubelet Startup probe failed: Get “http://10.42.2.205:15020/app-health/regproc-group1/startupz”: context deadline exceeded (Client.Timeout exceeded while awaiting headers)

kubectl logs regproc-group1-7bdb465d7c-2xxmm -n regproc

Sep 23, 2022 5:20:18 AM brave.Tracing$LoggingReporter report
INFO: {“traceId”:“16e0cbb207c63e40”,“id”:“16e0cbb207c63e40”,“kind”:“SERVER”,“name”:“get /registrationprocessor/v1/packetreceiver/actuator/health”,“timestamp”:1663910418038039,“duration”:28882,“localEndpoint”:{“serviceName”:“unknown”,“ipv4”:“10.42.2.205”},“remoteEndpoint”:{“ipv4”:“127.0.0.6”,“port”:60173},“tags”:{“error”:“500”,“http.method”:“GET”,“http.path”:“/registrationprocessor/v1/packetreceiver/actuator/health”,“http.status_code”:“500”}}

kubectl describe pod regproc-group6-5ddd9f8445-lvzzz -n regproc
Events:

Warning Unhealthy 17m (x29 over 22m) kubelet Startup probe failed: http://localhost:8087/registrationprocessor/v1/uploader/actuator/health failed with status code 000
Warning Unhealthy 7m40s kubelet Startup probe failed: command “/bin/bash -c MY_PROBE_CHECK_PATHS="http://localhost:8087/registrationprocessor/v1/uploader/actuator/health,http://localhost:8092/registrationprocessor/v1/packetclassifier/actuator/health\”; i=1; for str in $(echo $MY_PROBE_CHECK_PATHS | sed "s/,/\n/g"); do curl_output="$(curl -w %{http_code} -o /dev/null -s $str)"; if ! [ "$curl_output" = "200" ]; then echo "$str failed with status code $curl_output" >> /dev/stderr && exit $i; fi; ((i++)); done" timed out
Warning Unhealthy 2m35s (x55 over 15m) kubelet Startup probe failed: http://localhost:8087/registrationprocessor/v1/uploader/actuator/health failed with status code 500

kubectl logs regproc-group6-5ddd9f8445-lvzzz -n regproc

Sep 23, 2022 5:24:33 AM brave.Tracing$LoggingReporter report
INFO: {“traceId”:“a8f881b24e671fac”,“id”:“a8f881b24e671fac”,“kind”:“SERVER”,“name”:“get /registrationprocessor/v1/uploader/actuator/health”,“timestamp”:1663910673421387,“duration”:110452,“localEndpoint”:{“serviceName”:“unknown”,“ipv4”:“10.42.3.174”},“remoteEndpoint”:{“ipv4”:“127.0.0.1”,“port”:56766},“tags”:{“error”:“500”,“http.method”:“GET”,“http.path”:“/registrationprocessor/v1/uploader/actuator/health”,“http.status_code”:“500”}}

Thank you.