Skip to content

Unable to Log in as 'appsoneadmin' in HEAL

Unable to Log in as 'appsoneadmin' in HEAL in Keycloak Operational Issues.

5 min read Updated SS RS

Unable to Log in as 'appsoneadmin' in HEAL#

After being logged out of the HEAL system, we encountered errors in the ‘EVENT_ENTITY' table within the 'appsonekeycloak' database on Percona. Additionally, there were continuous login error attempts for the 'appsoneadmin’ user.

Initial Actions:

  1. Implement an account lock policy and activate a password policy in HEAL.
  2. After modifying settings on the ‘Auth’ page, you will be redirected to the ‘Reset Password’ page.
  3. Successfully reset the password to ‘<password>’ and gain temporary access.
  4. However, soon after, there was login issues with the ‘appsoneadmin’ user, as indicated by session authentication errors in the “EVENT_ENTITY” table.

Solution:

  1. Upon review, it was found that the maximum login failures in Keycloak were set to 5. This was followed by a change in the password policy, requiring a reset of the 'appsoneadmin' password.
  2. The problem emerged after restarting all the services. During this, other modules attempted to log in to Keycloak with the old password, leading to exceeding the maximum login failures count, resulting in the user account being locked.
  3. To resolve this, revert to an older dump of the 'appsonekeycloak' database, which fixed the issue.

Note: When changing the password for 'appsoneadmin', it is also necessary to update the Consul key at /service/keycloak/password.

Changing Domain Name Certificates in haproxy.example#

To change the domain name certificates in haproxy.example to a different domain, follow the below steps:

  1. Navigate to the Certificate Directory:

    Directory

    /opt/appnomic/Appsone_Service/utilities/Certificate
    
  2. Update the conf.sh file:

    1. Open the conf.sh file.
    2. Add the HAProxy/Keycloak server IP address in the SAN entry as follows:

      Bash

      SAN20='192.0.2.34'
      SAN21='192.0.2.94'
      

    Note: Do not change any other fields.

  3. Create haproxy.pem:

    1. Execute the command.

      Bash

      ./CreateCertificate pem
      
    2. If an error occurs (as shown below), follow the provided solution.

    Error Encountered:

    Bash

    Error Loading extension section v3_req
    ... (error details) ...
    unable to load certificates
    

    Solution:

    1. Modify the script to include the following line for IP address validation:

      Bash

      if [[ $line =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
      
    2. After successfully generating the haproxy.pem, proceed to the next steps.

    3. Follow the below steps to copy the haproxy.pem File:
      1. Navigate to the pem folder.
      2. Copy the haproxy.pem file to the <Appsone_service>/data/certs folder.
    4. Validate the Certificate on the Target Box:

      1. Execute the following command to export the certificate:

        Bash

        echo -n | openssl s_client -connect
        'appnomic.finacleassure.globalbank.example:9111' | sed -ne '/-BEGIN
        CERTIFICATE-/,/-END CERTIFICATE-/p' > haproxy_DNS_new.crt
        
      2. Import the certificate using keytool:

        /opt/java8/jre/bin/keytool -import -trustcacerts -keystore
        /tmp/cacerts -storepass changeit -noprompt -alias haproxy_DNS_new_2
        -file /tmp/haproxy_DNS_new.crt
        
      3. Execute the below command to copy the cacerts file to the Component Agent's keyfiles directory:

        cp cacerts
        /opt/Agents/ComponentAgent/ComponentAgent_35_Physical/config/keyfile
        s/cacerts
        
    5. Restart and Validation.

      1. Restart the Component Agent (CA) and verify its functionality.
      2. Follow the same procedure for LFA and Supervisor as well.

Keycloak Auth Page 404 Error After Changing Network Mode#

After switching the network mode for all services from 'bridge ' to 'host ,' the Keycloak auth page, UI, and CC display a 404 error.

Server Analysis: Keycloak logs reveal the error, indicating multiple IP mappings for the hostname on the server.

2023-10-10T19:13:49.063213869+05:30 stdout F 13:43:49,060 ERROR
[org.jboss.msc.service.fail] (ServerService Thread Pool -- 60)
MSC000001: Failed to start service
org.wildfly.clustering.jgroups.channel.ee:
org.jboss.msc.service.StartException in service
org.wildfly.clustering.jgroups.channel.ee:
java.lang.IllegalStateException: java.lang.NullPointerException
2023-10-10T19:13:49.063213869+05:30 stdout F    at
org.wildfly.clustering.service@19.1.0.Final//org.wildfly.clustering.
service.FunctionalService.start(FunctionalService.java:66)
2023-10-10T19:13:49.063213869+05:30 stdout F    at
org.wildfly.clustering.service@19.1.0.Final//org.wildfly.clustering.
service.AsyncServiceConfigurator$AsyncService.lambda$start$0(AsyncSe
rviceConfigurator.java:117)
2023-10-10T19:13:49.063213869+05:30 stdout F    at
org.jboss.threads@2.3.3.Final//org.jboss.threads.ContextClassLoaderS
avingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
2023-10-10T19:13:49.063213869+05:30 stdout F    at
org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecut
or.safeRun(EnhancedQueueExecutor.java:1982)
2023-10-10T19:13:49.063213869+05:30 stdout F    at
org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecut
or$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
2023-10-10T19:13:49.063213869+05:30 stdout F    at
org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecut
or$ThreadBody.run(EnhancedQueueExecutor.java:1377)
2023-10-10T19:13:49.063213869+05:30 stdout F    at
java.base/java.lang.Thread.run(Thread.java:829)
2023-10-10T19:13:49.063213869+05:30 stdout F    at
org.jboss.threads@2.3.3.Final//org.jboss.threads.JBossThread.run(JBo
ssThread.java:485)
2023-10-10T19:13:49.063213869+05:30 stdout F Caused by:
java.lang.IllegalStateException: java.lang.NullPointerException
2023-10-10T19:13:49.063213869+05:30 stdout F    at
org.jboss.as.clustering.jgroups@19.1.0.Final//org.jboss.as.clusterin
g.jgroups.subsystem.ChannelServiceConfigurator.get(ChannelServiceCon
figurator.java:116)
2023-10-10T19:13:49.063213869+05:30 stdout F    at
org.jboss.as.clustering.jgroups@19.1.0.Final//org.jboss.as.clusterin
g.jgroups.subsystem.ChannelServiceConfigurator.get(ChannelServiceCon
figurator.java:58)
2023-10-10T19:13:49.063213869+05:30 stdout F    at
org.wildfly.clustering.service@19.1.0.Final//org.wildfly.clustering.
service.FunctionalService.start(FunctionalService.java:63)
2023-10-10T19:13:49.063213869+05:30 stdout F    ... 7 more
2023-10-10T19:13:49.063213869+05:30 stdout F Caused by:
java.lang.NullPointerException
2023-10-10T19:13:49.063213869+05:30 stdout F    at
org.jgroups@4.1.9.Final//org.jgroups.protocols.UDP.dumpSocketInfo(UD
P.java:547)
2023-10-10T19:13:49.063213869+05:30 stdout F    at
org.jgroups@4.1.9.Final//org.jgroups.protocols.UDP.createSockets(UDP
.java:413)
2023-10-10T19:13:49.063213869+05:30 stdout F    at
org.jgroups@4.1.9.Final//org.jgroups.protocols.UDP.start(UDP.java:294
)

RCA: The 404 error is due to the absence of an /etc/hosts entry for the hostname in host mode.

Solution:

To resolve the issue, add an /etc/hosts entry for the hostname against the server IP. After updating the hosts file, restart Keycloak, UI, and CC (this action ensures accessibility to the UI).

Update the /etc/hosts file and restart services:

  1. Edit the /etc/hosts file to map the hostname against the server IP.
  2. Restart Keycloak, UI, and CC services.

CXO Issues#

Below are the CXO issues:

  • CXO dashboard issue - Unable to view the data
  • CXO dashboard - Not able to collect the data for disk space and table space-related KPI
  • Data not reflecting on CXO Dashboard

CXO dashboard issue - Unable to view the data#

Text fields are not optimized for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default.

This occurred due to the missing of attached templates.

Solution: Follow the below steps to rectify the issue.

  1. Use a keyword field instead.
  2. Set fielddata=true on [instance_name ] (to load field data by uninverting the inverted index).

    Note: This can use significant memory.

  3. After the upgrade of OpenSearch from standalone to Cluster, the template was missed to updated.

  4. Update the templates into OpenSearch.

    • Navigate to the template folder and execute the below command:
    curl -ku admin:admin -XPUT
    "http://192.0.2.64:9200/_template/healcql_appsone_txn_data_index
    _template" -H 'Content-Type: application/json' -
    d@healcql_appsone_txn_data_index_template.json
    

Post re-update of the template, the issue was resolved.

Keycloak Issues screenshot (page 48)

CXO dashboard - Not able to collect the data#

Unable to collect the data for disk space and table space-related KPI.

Keycloak Issues screenshot (page 48)

Solution:

  1. Changed the From_ist time format from the last 5 mins to 17 mins in healcql to OpenSearch configuration file as shown in the below screenshot.

    Keycloak Issues screenshot (page 49)

  2. Post which the data is not obtained.

Data not reflecting on CXO Dashboard#

Data not reflecting on CXO Dashboard and getting stopped within 2min. Also, the cron is not working correctly.

Keycloak Issues screenshot (page 49)

Solution:

  1. The env variables were not getting loaded correctly via cron.
  2. Load the env variables by “.~/.bash_profile” , the issue got resolved.

Cron script:

CRON SCRIPT: /2 * . ~/.bash_profile ; cd /appsone/HEAL/healcql-to-opensearch;sh healcql-to-opensearch.sh &>debug.log