2022-07-18 23:38:21,078 | __main__ | misshtbtd | main | 337 |  INFO | MSHBD:Execution Started
2022-07-18 23:38:21,079 [onap_dcae_cbs_docker_client.client] DEBUG    opening config_path=/app-config/application_config.yaml
2022-07-18 23:38:21,079 | onap_dcae_cbs_docker_client.client | client | get_config | 217 |  DEBUG | opening config_path=/app-config/application_config.yaml
2022-07-18T23:38:21,091 CBS client lib response : {'CBS_polling_allowed': 'True', 'CBS_polling_interval': '300', 'consumerID': '1', 'groupID': 'hbgrpID', 'heartbeat_config': '{"vnfs": [{"eventName": "Heartbeat_vDNS","heartbeatcountmissed": 3,"heartbeatinterval": 60,"closedLoopControlName": "ControlLoopEvent1",     "policyVersion": "1.0.0.5",     "policyName":"vFireWall","policyScope": "resource=sampleResource,type=sampletype,CLName=sampleCLName","target_type": "VNF",        "target": "genVnfName", "version": "1.0"}, {"eventName": "Heartbeat_vFW","heartbeatcountmissed": 3,     "heartbeatinterval": 60,"closedLoopControlName": "ControlLoopEvent1","policyVersion": "1.0.0.5","policyName": "vFireWall","policyScope": "resource=sampleResource,type=sampletype,CLName=sampleCLName",    "target_type":"VNF",    "target": "genVnfName",    "version": "1.0"}, {"eventName": "Heartbeat_xx","heartbeatcountmissed": 3,      "heartbeatinterval": 60,"closedLoopControlName": "ControlLoopEvent1","policyVersion": "1.0.0.5","policyName": "vFireWall",      "policyScope": "resource=sampleResource,type=sampletype,CLName=sampleCLName","target_type": "VNF","target": "genVnfName","version": "1.0"}]}', 'pg_dbName': 'heartbeat', 'pg_ipAddress': 'dcae-heartbeat-pg-primary', 'pg_passwd': 'LonzYass5+Jasu', 'pg_portNum': 5432, 'pg_userName': 'heartbeat', 'streams_publishes': {'dcae_cl_out': {'dmaap_info': {'topic_url': 'http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_CL_OUTPUT'}, 'type': 'message_router'}}, 'streams_subscribes': {'ves-heartbeat': {'dmaap_info': {'topic_url': 'http://message-router:3904/events/unauthenticated.SEC_HEARTBEAT_OUTPUT'}, 'type': 'message_router'}}}
2022-07-18 23:38:21,091 [onap_dcae_cbs_docker_client.client] DEBUG    Returning config read from /app-config/application_config.yaml
2022-07-18 23:38:21,091 | onap_dcae_cbs_docker_client.client | client | get_config | 221 |  DEBUG | Returning config read from /app-config/application_config.yaml
2022-07-18 23:38:21,091 | __main__ | misshtbtd | fetch_json_file | 276 |  INFO | MSHBD:current config logged to : ../etc/download.json
2022-07-18 23:38:21,100 | __main__ | misshtbtd | fetch_json_file | 294 |  INFO | ('MSHBT: The json file is - ', '../etc/config.json')
2022-07-18 23:38:21,101 | __main__ | misshtbtd | main | 343 |  INFO | ('MSHBT:HB Properties -', 'dcae-heartbeat-pg-primary', '5432', 'heartbeat', 'LonzYass5+Jasu', 'heartbeat', 'True', '300')
2022-07-18 23:38:21,116 | __main__ | misshtbtd | create_database | 76 |  ERROR | ('MSHBD:DB Creation -', OperationalError('could not connect to server: Connection refused\n\tIs the server running on host "dcae-heartbeat-pg-primary" (10.233.5.186) and accepting\n\tTCP/IP connections on port 5432?\n'))
2022-07-18 23:38:21,117 | __main__ | misshtbtd | create_update_db | 304 |  INFO | ('MSHBT: DB parameters -', 'dcae-heartbeat-pg-primary', '5432', 'heartbeat', 'LonzYass5+Jasu', 'heartbeat')
2022-07-18 23:38:21,121 | __main__ | misshtbtd | main | 443 |  ERROR | MSHBD:Exception as Traceback (most recent call last):
  File "/app/bin/misshtbtd.py", line 348, in main
    create_update_db(update_db, jsfile, ip_address, port_num, user_name, password, db_name)
  File "/app/bin/misshtbtd.py", line 305, in create_update_db
    connection_db = heartbeat.postgres_db_open(user_name, password, ip_address, port_num, db_name)
  File "/app/bin/htbtworker.py", line 207, in postgres_db_open
    connection = psycopg2.connect(database=database_name, user=username, password=password, host=host, port=port)
  File "/usr/local/lib/python3.9/site-packages/psycopg2/__init__.py", line 127, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: could not connect to server: Connection refused
	Is the server running on host "dcae-heartbeat-pg-primary" (10.233.5.186) and accepting
	TCP/IP connections on port 5432?


2022-07-18 23:38:21,121 | __main__ | misshtbtd | main | 446 |  ERROR | Fatal error. Could not start missing heartbeat service due to: could not connect to server: Connection refused
	Is the server running on host "dcae-heartbeat-pg-primary" (10.233.5.186) and accepting
	TCP/IP connections on port 5432?

2022-07-18 23:38:21,472 [onap_dcae_cbs_docker_client.client] DEBUG    opening config_path=/app-config/application_config.yaml
2022-07-18 23:38:21,472 | onap_dcae_cbs_docker_client.client | client | get_config | 217 |  DEBUG | opening config_path=/app-config/application_config.yaml
2022-07-18 23:38:21,480 [onap_dcae_cbs_docker_client.client] DEBUG    Returning config read from /app-config/application_config.yaml
2022-07-18 23:38:21,480 | onap_dcae_cbs_docker_client.client | client | get_config | 221 |  DEBUG | Returning config read from /app-config/application_config.yaml
2022-07-18 23:38:21,480 | misshtbtd | misshtbtd | fetch_json_file | 276 |  INFO | MSHBD:current config logged to : ../etc/download.json
2022-07-18 23:38:21,484 | misshtbtd | misshtbtd | fetch_json_file | 294 |  INFO | ('MSHBT: The json file is - ', '../etc/config.json')
Traceback (most recent call last):
  File "/app/bin/cbs_polling.py", line 67, in <module>
2022-07-18T23:38:21,480 CBS client lib response : {'CBS_polling_allowed': 'True', 'CBS_polling_interval': '300', 'consumerID': '1', 'groupID': 'hbgrpID', 'heartbeat_config': '{"vnfs": [{"eventName": "Heartbeat_vDNS","heartbeatcountmissed": 3,"heartbeatinterval": 60,"closedLoopControlName": "ControlLoopEvent1",     "policyVersion": "1.0.0.5",     "policyName":"vFireWall","policyScope": "resource=sampleResource,type=sampletype,CLName=sampleCLName","target_type": "VNF",        "target": "genVnfName", "version": "1.0"}, {"eventName": "Heartbeat_vFW","heartbeatcountmissed": 3,     "heartbeatinterval": 60,"closedLoopControlName": "ControlLoopEvent1","policyVersion": "1.0.0.5","policyName": "vFireWall","policyScope": "resource=sampleResource,type=sampletype,CLName=sampleCLName",    "target_type":"VNF",    "target": "genVnfName",    "version": "1.0"}, {"eventName": "Heartbeat_xx","heartbeatcountmissed": 3,      "heartbeatinterval": 60,"closedLoopControlName": "ControlLoopEvent1","policyVersion": "1.0.0.5","policyName": "vFireWall",      "policyScope": "resource=sampleResource,type=sampletype,CLName=sampleCLName","target_type": "VNF","target": "genVnfName","version": "1.0"}]}', 'pg_dbName': 'heartbeat', 'pg_ipAddress': 'dcae-heartbeat-pg-primary', 'pg_passwd': 'LonzYass5+Jasu', 'pg_portNum': 5432, 'pg_userName': 'heartbeat', 'streams_publishes': {'dcae_cl_out': {'dmaap_info': {'topic_url': 'http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_CL_OUTPUT'}, 'type': 'message_router'}}, 'streams_subscribes': {'ves-heartbeat': {'dmaap_info': {'topic_url': 'http://message-router:3904/events/unauthenticated.SEC_HEARTBEAT_OUTPUT'}, 'type': 'message_router'}}}
    pollCBS(current_pid)
  File "/app/bin/cbs_polling.py", line 39, in pollCBS
    hbc_pid, hbc_state, hbc_srcName, hbc_time = db.read_hb_common(user_name, password, ip_address, port_num, db_name)
  File "/app/bin/misshtbtd.py", line 87, in read_hb_common
    connection_db = heartbeat.postgres_db_open(user_name, password, ip_address, port_num, db_name)
  File "/app/bin/htbtworker.py", line 207, in postgres_db_open
    connection = psycopg2.connect(database=database_name, user=username, password=password, host=host, port=port)
  File "/usr/local/lib/python3.9/site-packages/psycopg2/__init__.py", line 127, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: could not connect to server: Connection refused
	Is the server running on host "dcae-heartbeat-pg-primary" (10.233.5.186) and accepting
	TCP/IP connections on port 5432?

2022-07-18 23:38:21,528 | __main__ | misshtbtd | hb_cbs_polling_process | 195 |  INFO | MSHBT:Creaated CBS polling process
