Skip to content

Control Center (CC) Issues

Troubleshoot Control Center issues like threshold updates, UI access failures, and 503 errors.

6 min read Updated SS RS

Below are the troubleshooting of CC issues:

  • Unable to add/update/disable thresholds
  • Component Instance is not Updated in CC UI
  • Unable to Access CC UI
    • Case 1: Through HAProxy IP
    • Case 2: After the Update of CC & UI Builds
  • Unable to Perform Changes in CC UI
  • Displaying 503 Service Unavailable
  • Unable to Add Component Instance in CC

For reference:

The following section contains basic Linux commands: Basic Commands

Unable to add/update/disable thresholds#

Not able to add/update/disable thresholds post importing percona table dump from DC to DR(TCDT) setup.

Solution: The issue is resolved by the below steps.

  1. Take a dump of the mentioned tables from DC with the below command.

    mysqldump -h 192.0.2.110 -u dbadmin -p'<password>' -P 3306 --ssl-
    mode=disabled appsone user_access_details | sed -e 's/DEFINER[ ]*=[
    ]*[^*]*\*/\*/' > user_access_details.sql
    mysqldump -h 192.0.2.110 -u dbadmin      -p'<password>' -P 3306 --ssl-
    mode=disabled appsone user_attributes      | sed -e 's/DEFINER[ ]*=[ ]*
    [^*]*\*/\*/' > user_attributes.sql
    mysqldump -h 192.0.2.110 -u dbadmin  -p'<password>' -P 3306     --ssl-
    mode=disabled appsone user_forensic_notification_mapping |      sed -e
    's/DEFINER[ ]*=[ ]*[^*]*\*/\*/' >
    user_forensic_notification_mapping.sql
    mysqldump -h 192.0.2.110 -u dbadmin -p'<password>' -P 3306 --ssl-
    mode=disabled appsone user_notification_choice | sed -e 's/DEFINER[
    ]*=[ ]*[^*]*\*/\*/' > user_notification_choice.sql
    mysqldump -h 192.0.2.110 -u dbadmin -p'<password>' -P 3306 --ssl-
    mode=disabled appsone user_notification_mapping | sed -e 's/DEFINER[
    ]*=[ ]*[^*]*\*/\*/' > user_notification_mapping.sql
    
    user_access_details
    user_attributes
    user_forensic_notification_mapping
    user_notification_choice
    user_notification_mapping
    
  2. Copied to DR setup(TCDT)

  3. Imported to Percona Master node with below commands.

    mysql -h 192.0.2.110 -u dbadmin -p'<password>' -P 3306 --ssl-
    mode=disabled appsone < user_notification_mapping.sql
    
  4. The issue happened because of importing DC tables dump from DC to DR(TCDT) along with Definer for LDAP users mapping

Component Instance is not Updated in CC UI#

When a component instance in CC UI is created. It says added successfully but it is not getting reflected in the UI.

Entry could be seen in comp_instance table of master percona DB but the same was not reflected in percona slave DB.

RCA: Percona slave was going OOM as redis microservice was sending data every 5 mins and it was not able to process that much data due to which memory kept on increasing.

Solution : Do the fine tuning and below consul keys should be updated as below.

service/redismicroservice/scheduler/rateofexecution:600000
service/redismicroservice/threadpoolcoresize:200
service/redismicroservice/threadpoolmaxsize:200
service/redismicroservice/perconadb/idleconnections:50
service/redismicroservice/perconadb/maxpoolsize:100
service/redismicroservice/share/live/connection:false

Recovery steps :

  1. Update the above consul keys.
  2. Stop redis microservice.
  3. Check master status in percona-node1: show master status \G .

    Expected output:

    *************************** 1. row ***************************
    File: mysql-bin.000020
    Position: 1544
    Binlog_Do_DB: appsone,appsonekeycloak,appsone_mle
    Binlog_Ignore_DB:
    Executed_Gtid_Set:
    1 row in set (0.01 sec)
    ERROR:
    No query specified
    
  4. Check slave status in percona node 2 with below command:

    mysql> show slave status \G;
    
  5. If o/p shows below fields as 'no', this means slave is not in running state.

    Slave_IO_Running: No
    Slave_SQL_Running: No
    
  6. Reset and start slave using below commands.

    mysql> reset slave;
    Query OK, 0 rows affected, 1 warning (0.01 sec)
    

    For information: Use this command only if percona slave is down since the beginning. Otherwise, skip this command as using this command will start the slave sync from the very beginning and will take time.

    mysql> start slave user='replicator' password='<password>'
    default_auth='mysql_native_password';
    Query OK, 0 rows affected, 1 warning (0.02 sec)
    
  7. Check below parameter

    Seconds_Behind_Master: 775460 //It means that node2 is still
    replicating data from node 1.
    Wait for this parameter to become 0.
    
  8. Restart the redis microservice.

Note: If the slave is not running, then we can start percona using startservices.sh script which will itself take care of step no. 6.

Unable to Access CC UI#

Case 1: Through HAProxy IP#

Failing to access CC UI through HAProxy IP. The controlcenter and HAProxy services are up and running but the CC dashboard is not accessible through HAProxy IP and PORT.

Solution:

  1. Delete the below key,

    consul kv delete service/data/receiver/kpi/endpoint
    
  2. Add the below consul key with HAProxy IP and PORT,

    consul kv put service/cc/data/receiver/kpi/endpoint
    https://192.0.2.71:9998/raw-kpi-data
    

Post updating the key the issue is resolved.

Note: This issue is present in HEAL 2.0 and fixed in HEAL 2.1.0 build.

Case 2: After the Update of CC & UI Builds#

Unable to access the UI and CC after upgrading the builds from CC 1.4.8 to 1.4.9 and UI 1.4.7 to 1.4.9 .

Invalid token: PKIX path building failed: unable to find valid
certificate path
CC UI error after updating CC & UI builds: Invalid token — PKIX path building failed
CC UI error — Invalid token: PKIX path building failed (after updating CC & UI builds)

Solution:

  1. Check the UI and CC Nomad configuration files.
  2. Correct the Java path in the volume section from the below directory:

    /opt/Heal/Appsone_Service/data/cert/cacerts:/usr/local/openjdk-
    11/lib/security/cacerts
    
  3. Restart the UI and CC services.

After this, you will be able to access the UI and CC.

Unable to Perform Changes in CC UI#

Unable to make configuration changes from the Control Center (CC) user interface.

RCA: We observe an issue involving an invalid token along with a HAProxy DNS name resolving the problem.

When attempting a telnet to the HAProxy DNS from the CC Docker container, it failed to resolve. However, it resolved successfully with the HAProxy IP address. Suspecting a caching issue, we restarted Keycloak, UI, and CC, but the problem persisted.

Solution:

As a workaround, we added the HAProxy DNS name along with the HAProxy IP address under extra hosts and restarted the CC service. Subsequently, the issue was resolved.

Note: Root Cause Analysis (RCA) was inconclusive as to why the issue occurred suddenly without any changes or patching activities in the DR setup.

Displaying 503 Service Unavailable#

Controlcenter service is displaying 503 Service Unavailable.

RCA: By checking the Nomad status, found that the Controlcenter service was dead.

The stderr error indicated: "Error reading file: Unexpected response code 500(failed to list entries: Open apmt/heal12/nomad/alloc/wef rterk jkd lsfjlsjfjfsfjksafh/alloc/logs)."

Further analysis revealed that the Heal Control Center service was unable to connect to MySQL for the 'dbadmin ' user. The Heal UI service, running for 18 days, had outdated credentials in the conf-properties file, specifically, the consul key service/perconadb/password_ui was incorrectly updated with an encoded password that included an extra new line character.

Solution:

  1. Correct the below consul key,

    service/perconadb/password_ui
    

    with the correct encoded value of '<password>' and restarted CC. Subsequently, CC started running properly.

  2. After updating the consul key, the UI service went down, so we restarted it from node 220 .

This action resulted in the MySQL credentials being updated to dbadmin/<password> inside the container, and the UI service started running fine.

Unable to Add Component Instance in CC#

After upgrading the CC build to 1.4.6-vapt , it is possible to add up to the host level, but not to add a component instance in CC.

The following error was observed in the CC logs:

2024-05-06 13:05:03.328 [qtp805603120-171] ERROR
c.a.a.c.d.m.CompInstanceDataService:120 - Exception while adding
group kpi for component instance-
298:java.sql.SQLIntegrityConstraintViolationException: Column
'attribute_value' cannot be null [statement:"insert into
comp_instance_kpi_group_details
(attribute_value,created_time,updated_time,user_details_id,comp_inst
ance_id,mst_producer_kpi_mapping_id,collection_interval,mst_kpi_deta
ils_id,is_discovery,kpi_group_name,mst_kpi_group_id,mst_producer_id,
alias_name) values
(:attributeValue,:createdTime,:updatedTime,:userDetailsId,:compInsta
nceId,:mstProducerKpiMappingId,:collectionInterval,:mstKpiDetailsId,
:isDiscovery,:kpiGroupName,:mstKpiGroupId,:mstProducerId,:aliasName)"
, located:"insert into comp_instance_kpi_group_details
(attribute_value,created_time,updated_time,user_details_id,comp_inst
ance_id,mst_producer_kpi_mapping_id,collection_interval,mst_kpi_deta
ils_id,is_discovery,kpi_group_name,mst_kpi_group_id,mst_producer_id,
alias_name) values
(:attributeValue,:createdTime,:updatedTime,:userDetailsId,:compInsta
nceId,:mstProducerKpiMappingId,:collectionInterval,:mstKpiDetailsId,
:isDiscovery,:kpiGroupName,:mstKpiGroupId,:mstProducerId,:aliasName)"
, rewritten:"insert into comp_instance_kpi_group_details
(attribute_value,created_time,updated_time,user_details_id,comp_inst
ance_id,mst_producer_kpi_mapping_id,collection_interval,mst_kpi_deta
ils_id,is_discovery,kpi_group_name,mst_kpi_group_id,mst_producer_id,
alias_name) values (?,?,?,?,?,?,?,?,?,?,?,?,?)", arguments:{
positional:{}, named:{aliasName:'ALL',updatedTime:'2024-05-06
07:35:03',compInstanceId:298,attributeValue:'null',isDiscovery:0,mst
ProducerKpiMappingId:5780,producerName:'null',userDetailsId:'7640123
a-fbde-4fe5-9812-
581cd1e3a9c1',attributeStatus:0,notification:0,createdTime:'2024-05-
06
07:35:03',mstKpiDetailsId:256,mstKpiGroupId:16,id:0,mstProducerId:28
4,isGroup:0,class:class
com.appnomic.appsone.controlcenter.beans.CompInstanceKpiGroupDetails
Bean,collectionInterval:60,kpiGroupName:'URL Status',status:1},
finder:[]}]

Solution:

To resolve the issue, update the database and restart the necessary services:

  1. Update the Database: Connect to your database and execute the following SQL statements:

    UPDATE appsone.mst_component_files SET relative_path = '' WHERE
    mst_component_id = 9;
    UPDATE mst_producer_kpi_mapping SET is_default = 0
    WHERE mst_kpi_details_id = (SELECT id FROM mst_kpi_details WHERE
    account_id = 1 AND identifier = 'URL_STATUS')
    AND producer_id != (SELECT id FROM mst_producer WHERE account_id = 1
    AND name = 'Check_URL_Response_Wget');
    
  2. Restart Services: After updating the database, restart the redis-microservice and CC services to apply the changes.