keycloak icon indicating copy to clipboard operation
keycloak copied to clipboard

Keycloak service fails on first attempt however works on second

Open rausub opened this issue 11 months ago • 5 comments

SUMMARY

When running playbook for Keycloak Quarkus the first attempt fails with the following message: FAILED! => {"changed": false, "msg": "Unable to start service keycloak: Job for keycloak.service failed because the control process exited with error code.\nSee \"systemctl status keycloak.service\" and \"journalctl -xe\" for details.\n"}

When run again without any changes it is successful

It seems that notify : restart keyclock gets invoked on Flush Pending hanlders prior to Start and wait for keycloak service.

On the second run of the playbook, the handler is skipped because the previous run has run all the tasks that would have triggered it and runs

  • name: "Start and wait for keycloak service" ansible.builtin.include_tasks: start.yml

which is succesful.

Is there a better way to handle this restart on the first run ?

ISSUE TYPE
  • Bug Report
ANSIBLE VERSION
ansible [core 2.16.3]
  config file = /home/subin/sites/melb-test-lab/keycloak-ansible-deployment/ansible.cfg
  configured module search path = ['/home/subin/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/subin/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.12.3 (main, Nov  6 2024, 18:32:19) [GCC 13.2.0] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
Collection                               Version
---------------------------------------- -------
amazon.aws                               8.1.0  
azure.azcollection                       2.6.0  
community.digitalocean                   1.26.0 
fedora.linux_system_roles                1.88.9 
google.cloud                             1.3.0  
hetzner.hcloud                           4.1.0  
middleware_automation.common             1.2.2  
middleware_automation.infinispan         1.3.2  
middleware_automation.keycloak           2.4.3  

# /usr/lib/python3/dist-packages/ansible_collections
Collection                               Version
---------------------------------------- -------
amazon.aws                               7.2.0  
ansible.netcommon                        5.3.0  
ansible.posix                            1.5.4  
ansible.utils                            2.12.0 
ansible.windows                          2.2.0  
arista.eos                               6.2.2  
awx.awx                                  23.6.0 
azure.azcollection                       1.19.0 
check_point.mgmt                         5.2.2  
chocolatey.chocolatey                    1.5.1  
cisco.aci                                2.8.0  
cisco.asa                                4.0.3  
cisco.dnac                               6.10.2 
cisco.intersight                         2.0.7  
cisco.ios                                5.3.0  
cisco.iosxr                              6.1.1  
cisco.ise                                2.7.0  
cisco.meraki                             2.17.2 
cisco.mso                                2.5.0  
cisco.nxos                               5.3.0  
cisco.ucs                                1.10.0 
cloud.common                             2.1.4  
cloudscale_ch.cloud                      2.3.1  
community.aws                            7.1.0  
community.azure                          2.0.0  
community.ciscosmb                       1.0.7  
community.crypto                         2.17.1 
community.digitalocean                   1.26.0 
community.dns                            2.8.0  
community.docker                         3.7.0  
community.general                        8.3.0  
community.grafana                        1.7.0  
community.hashi_vault                    6.1.0  
community.hrobot                         1.9.0  
community.library_inventory_filtering_v1 1.0.0  
community.libvirt                        1.3.0  
community.mongodb                        1.6.3  
community.mysql                          3.8.0  
community.network                        5.0.2  
community.okd                            2.3.0  
community.postgresql                     3.3.0  
community.proxysql                       1.5.1  
community.rabbitmq                       1.2.3  
community.routeros                       2.12.0 
community.sap                            2.0.0  
community.sap_libs                       1.4.2  
community.sops                           1.6.7  
community.vmware                         4.1.0  
community.windows                        2.1.0  
community.zabbix                         2.3.1  
containers.podman                        1.11.0 
cyberark.conjur                          1.2.2  
cyberark.pas                             1.0.25 
dellemc.enterprise_sonic                 2.4.0  
dellemc.openmanage                       8.7.0  
dellemc.powerflex                        2.1.0  
dellemc.unity                            1.7.1  
f5networks.f5_modules                    1.27.1 
fortinet.fortimanager                    2.3.1  
fortinet.fortios                         2.3.4  
frr.frr                                  2.0.2  
gluster.gluster                          1.0.2  
google.cloud                             1.3.0  
grafana.grafana                          2.2.4  
hetzner.hcloud                           2.4.1  
hpe.nimble                               1.1.4  
ibm.qradar                               2.1.0  
ibm.spectrum_virtualize                  2.0.0  
ibm.storage_virtualize                   2.2.0  
infinidat.infinibox                      1.3.12 
infoblox.nios_modules                    1.6.1  
inspur.ispim                             2.2.0  
inspur.sm                                2.3.0  
junipernetworks.junos                    5.3.1  
kubernetes.core                          2.4.0  
lowlydba.sqlserver                       2.2.2  
microsoft.ad                             1.4.1  
netapp.aws                               21.7.1 
netapp.azure                             21.10.1
netapp.cloudmanager                      21.22.1
netapp.elementsw                         21.7.0 
netapp.ontap                             22.9.0 
netapp.storagegrid                       21.11.1
netapp.um_info                           21.8.1 
netapp_eseries.santricity                1.4.0  
netbox.netbox                            3.16.0 
ngine_io.cloudstack                      2.3.0  
ngine_io.exoscale                        1.1.0  
openstack.cloud                          2.2.0  
openvswitch.openvswitch                  2.1.1  
ovirt.ovirt                              3.2.0  
purestorage.flasharray                   1.26.0 
purestorage.flashblade                   1.15.0 
purestorage.fusion                       1.6.0  
sensu.sensu_go                           1.14.0 
splunk.es                                2.1.2  
t_systems_mms.icinga_director            2.0.1  
telekom_mms.icinga_director              1.35.0 
theforeman.foreman                       3.15.0 
vmware.vmware_rest                       2.3.1  
vultr.cloud                              1.12.1 
vyos.vyos                                4.1.0  
wti.remote                               1.0.5  
STEPS TO REPRODUCE

- name: Playbook for Keycloak Hosts
  become: true
  hosts: keycloak
  vars:
    keycloak_quarkus_admin_pass: "test"
    keycloak_quarkus_ha_enabled: true
    keycloak_quarkus_jdbc_url: jdbc:postgresql://test:5432/keycloak
    keycloak_quarkus_db_user: test
    keycloak_quarkus_db_pass: test
    keycloak_quarkus_version: '24.0.5'
    keycloak_quarkus_configure_firewalld: true
    keycloak_quarkus_proxy_mode: edge
    keycloak_quarkus_db_enabled: true
    keycloak_quarkus_systemd_wait_for_port_number: 8080
    keycloak_quarkus_admin_url: https://test/auth/
    keycloak_quarkus_frontend_url: https://test/auth/
    keycloak_quarkus_path: /oauth/
    keycloak_force_install: true    

    #https://github.com/ansible-middleware/keycloak/issues/108

  roles:
    - middleware_automation.keycloak.keycloak_quarkus
EXPECTED RESULTS

A successful deployment

ACTUAL RESULTS

Requires running deployment twice to achieve the same result.

TASK [middleware_automation.keycloak.keycloak_quarkus : Ensure logdirectory exists] ****************************************************************
changed: [10.1.240.211]
changed: [10.1.240.210]

TASK [middleware_automation.keycloak.keycloak_quarkus : Flush pending handlers] ********************************************************************

TASK [middleware_automation.keycloak.keycloak_quarkus : Flush pending handlers] ********************************************************************

RUNNING HANDLER [middleware_automation.keycloak.keycloak_quarkus : Rebuild keycloak config] ********************************************************
changed: [10.1.240.211]
changed: [10.1.240.210]

RUNNING HANDLER [middleware_automation.keycloak.keycloak_quarkus : Restart keycloak] ***************************************************************
included: /home/xx/.ansible/collections/ansible_collections/middleware_automation/keycloak/roles/keycloak_quarkus/tasks/restart/serial.yml for 10.1.240.210, 10.1.240.211

RUNNING HANDLER [middleware_automation.keycloak.keycloak_quarkus : Restart and enable {{ keycloak.service_name }} service on {{ item }}] ***********
included: /home/xx/.ansible/collections/ansible_collections/middleware_automation/keycloak/roles/keycloak_quarkus/tasks/restart.yml for 10.1.240.210, 10.1.240.211 => (item=10.1.240.210)
included: /home/xx/.ansible/collections/ansible_collections/middleware_automation/keycloak/roles/keycloak_quarkus/tasks/restart.yml for 10.1.240.210, 10.1.240.211 => (item=10.1.240.211)

RUNNING HANDLER [middleware_automation.keycloak.keycloak_quarkus : Restart and enable keycloak service] ********************************************
fatal: [10.1.240.210]: FAILED! => {"changed": false, "msg": "Unable to start service keycloak: Job for keycloak.service failed because the control process exited with error code.\nSee \"systemctl status keycloak.service\" and \"journalctl -xe\" for details.\n"}



On second attempt

TASK [middleware_automation.keycloak.keycloak_quarkus : Ensure logdirectory exists] ****************************************************************
ok: [10.1.240.211]
ok: [10.1.240.210]

TASK [middleware_automation.keycloak.keycloak_quarkus : Flush pending handlers] ********************************************************************

TASK [middleware_automation.keycloak.keycloak_quarkus : Flush pending handlers] ********************************************************************

TASK [middleware_automation.keycloak.keycloak_quarkus : Start and wait for keycloak service] *******************************************************
included: /home/xx/.ansible/collections/ansible_collections/middleware_automation/keycloak/roles/keycloak_quarkus/tasks/start.yml for 10.1.240.210, 10.1.240.211

TASK [middleware_automation.keycloak.keycloak_quarkus : Start keycloak service] ********************************************************************
changed: [10.1.240.211]
changed: [10.1.240.210]

TASK [middleware_automation.keycloak.keycloak_quarkus : Wait until keycloak becomes active http://localhost:8080/realms/master/.well-known/openid-configuration] ***
ok: [10.1.240.211]
ok: [10.1.240.210]

TASK [middleware_automation.keycloak.keycloak_quarkus : Link default logs directory] ***************************************************************
changed: [10.1.240.211]
changed: [10.1.240.210]

TASK [middleware_automation.keycloak.keycloak_quarkus : Check service status] **********************************************************************
ok: [10.1.240.211]
ok: [10.1.240.210]

rausub avatar Jan 15 '25 09:01 rausub

Can you please run the playbook with -vvv? and paste the result here. Just to see more details of the error.

RanabirChakraborty avatar Jan 15 '25 15:01 RanabirChakraborty

Can you please run the playbook with -vvv? and paste the result here. Just to see more details of the error.

Please see below

TASK [middleware_automation.keycloak.keycloak_quarkus : Flush pending handlers] ********************************************************************
task path: /home/xx/.ansible/collections/ansible_collections/middleware_automation/keycloak/roles/keycloak_quarkus/tasks/main.yml:74
NOTIFIED HANDLER middleware_automation.keycloak.keycloak_quarkus : Restart keycloak for 10.1.240.210
NOTIFIED HANDLER middleware_automation.keycloak.keycloak_quarkus : Rebuild keycloak config for 10.1.240.210
META: triggered running handlers for 10.1.240.210

TASK [middleware_automation.keycloak.keycloak_quarkus : Flush pending handlers] ********************************************************************
task path: /home/xx/.ansible/collections/ansible_collections/middleware_automation/keycloak/roles/keycloak_quarkus/tasks/main.yml:74
NOTIFIED HANDLER middleware_automation.keycloak.keycloak_quarkus : Restart keycloak for 10.1.240.211
NOTIFIED HANDLER middleware_automation.keycloak.keycloak_quarkus : Rebuild keycloak config for 10.1.240.211
META: triggered running handlers for 10.1.240.211

RUNNING HANDLER [middleware_automation.keycloak.keycloak_quarkus : Rebuild keycloak config] ********************************************************
task path: /home/xx/.ansible/collections/ansible_collections/middleware_automation/keycloak/roles/keycloak_quarkus/handlers/main.yml:3
included: /home/xx/.ansible/collections/ansible_collections/middleware_automation/keycloak/roles/keycloak_quarkus/tasks/rebuild_config.yml for 10.1.240.210, 10.1.240.211

RUNNING HANDLER [middleware_automation.keycloak.keycloak_quarkus : Rebuild keycloak config] ********************************************************
task path: /home/xx/.ansible/collections/ansible_collections/middleware_automation/keycloak/roles/keycloak_quarkus/tasks/rebuild_config.yml:3
<10.1.240.210> ESTABLISH SSH CONNECTION FOR USER: root
<10.1.240.210> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/xx/.ansible/cp/6364f49ece"' 10.1.240.210 '/bin/sh -c '"'"'echo ~root && sleep 0'"'"''
<10.1.240.211> ESTABLISH SSH CONNECTION FOR USER: root
<10.1.240.211> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/xx/.ansible/cp/7f67f20171"' 10.1.240.211 '/bin/sh -c '"'"'echo ~root && sleep 0'"'"''
<10.1.240.211> (0, b'/root\n', b'')
<10.1.240.211> ESTABLISH SSH CONNECTION FOR USER: root
<10.1.240.211> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/xx/.ansible/cp/7f67f20171"' 10.1.240.211 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1736990876.6532912-6730-209843680614645 `" && echo ansible-tmp-1736990876.6532912-6730-209843680614645="` echo /root/.ansible/tmp/ansible-tmp-1736990876.6532912-6730-209843680614645 `" ) && sleep 0'"'"''
<10.1.240.210> (0, b'/root\n', b'')
<10.1.240.210> ESTABLISH SSH CONNECTION FOR USER: root
<10.1.240.210> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/xx/.ansible/cp/6364f49ece"' 10.1.240.210 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1736990876.694109-6729-25100274233250 `" && echo ansible-tmp-1736990876.694109-6729-25100274233250="` echo /root/.ansible/tmp/ansible-tmp-1736990876.694109-6729-25100274233250 `" ) && sleep 0'"'"''
<10.1.240.211> (0, b'ansible-tmp-1736990876.6532912-6730-209843680614645=/root/.ansible/tmp/ansible-tmp-1736990876.6532912-6730-209843680614645\n', b'')
Using module file /usr/lib/python3/dist-packages/ansible/modules/command.py
<10.1.240.211> PUT /home/xx/.ansible/tmp/ansible-local-3731zcvzafz6/tmpeijrpebk TO /root/.ansible/tmp/ansible-tmp-1736990876.6532912-6730-209843680614645/AnsiballZ_command.py
<10.1.240.211> SSH: EXEC sftp -b - -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/xx/.ansible/cp/7f67f20171"' '[10.1.240.211]'
<10.1.240.210> (0, b'ansible-tmp-1736990876.694109-6729-25100274233250=/root/.ansible/tmp/ansible-tmp-1736990876.694109-6729-25100274233250\n', b'')
Using module file /usr/lib/python3/dist-packages/ansible/modules/command.py
<10.1.240.210> PUT /home/xx/.ansible/tmp/ansible-local-3731zcvzafz6/tmpm88f7ntp TO /root/.ansible/tmp/ansible-tmp-1736990876.694109-6729-25100274233250/AnsiballZ_command.py
<10.1.240.210> SSH: EXEC sftp -b - -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/xx/.ansible/cp/6364f49ece"' '[10.1.240.210]'
<10.1.240.211> (0, b'sftp> put /home/xx/.ansible/tmp/ansible-local-3731zcvzafz6/tmpeijrpebk /root/.ansible/tmp/ansible-tmp-1736990876.6532912-6730-209843680614645/AnsiballZ_command.py\n', b'')
<10.1.240.211> ESTABLISH SSH CONNECTION FOR USER: root
<10.1.240.211> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/xx/.ansible/cp/7f67f20171"' 10.1.240.211 '/bin/sh -c '"'"'chmod u+x /root/.ansible/tmp/ansible-tmp-1736990876.6532912-6730-209843680614645/ /root/.ansible/tmp/ansible-tmp-1736990876.6532912-6730-209843680614645/AnsiballZ_command.py && sleep 0'"'"''
<10.1.240.211> (0, b'', b'')
<10.1.240.211> ESTABLISH SSH CONNECTION FOR USER: root
<10.1.240.211> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/xx/.ansible/cp/7f67f20171"' -tt 10.1.240.211 '/bin/sh -c '"'"'PATH=/etc/alternatives/jre_17/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin JAVA_HOME=/etc/alternatives/jre_17 /usr/bin/python3.6 /root/.ansible/tmp/ansible-tmp-1736990876.6532912-6730-209843680614645/AnsiballZ_command.py && sleep 0'"'"''
<10.1.240.210> (0, b'sftp> put /home/xx/.ansible/tmp/ansible-local-3731zcvzafz6/tmpm88f7ntp /root/.ansible/tmp/ansible-tmp-1736990876.694109-6729-25100274233250/AnsiballZ_command.py\n', b'')
<10.1.240.210> ESTABLISH SSH CONNECTION FOR USER: root
<10.1.240.210> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/xx/.ansible/cp/6364f49ece"' 10.1.240.210 '/bin/sh -c '"'"'chmod u+x /root/.ansible/tmp/ansible-tmp-1736990876.694109-6729-25100274233250/ /root/.ansible/tmp/ansible-tmp-1736990876.694109-6729-25100274233250/AnsiballZ_command.py && sleep 0'"'"''
<10.1.240.210> (0, b'', b'')
<10.1.240.210> ESTABLISH SSH CONNECTION FOR USER: root
<10.1.240.210> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/xx/.ansible/cp/6364f49ece"' -tt 10.1.240.210 '/bin/sh -c '"'"'PATH=/etc/alternatives/jre_17/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin JAVA_HOME=/etc/alternatives/jre_17 /usr/bin/python3.6 /root/.ansible/tmp/ansible-tmp-1736990876.694109-6729-25100274233250/AnsiballZ_command.py && sleep 0'"'"''
<10.1.240.211> (0, b'\r\n{"changed": true, "stdout": "Updating the configuration and installing your custom providers, if any. Please wait.\\n2025-01-15 20:28:00,077 WARN  [org.key.qua.run.cli.Picocli] (main) The following run time non-cli options were found, but will be ignored during build time: kc.db-url, kc.db-username, kc.db-password, kc.hostname-url, kc.hostname-admin-url, kc.hostname-strict, kc.hostname-strict-backchannel, kc.http-enabled, kc.http-port, kc.https-port, kc.proxy, kc.log, kc.log-file, kc.log-file-format, kc.log-level\\n\\n2025-01-15 20:28:09,807 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index org.apache.tools.ant.Task: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\\n2025-01-15 20:28:09,852 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index org.springframework.core.io.DefaultResourceLoader: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\\n2025-01-15 20:28:09,853 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index org.springframework.core.io.ResourceLoader: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\\n2025-01-15 20:28:09,855 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index org.springframework.core.io.Resource: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\\n2025-01-15 20:28:09,904 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index jakarta.jms.XAConnection: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\\n2025-01-15 20:28:09,904 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index jakarta.jms.XASession: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\\n2025-01-15 20:28:09,905 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index jakarta.jms.XAConnectionFactory: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\\n2025-01-15 20:28:09,924 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index org.apache.activemq.artemis.core.journal.RecordInfo: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\\n2025-01-15 20:28:09,925 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index org.apache.activemq.artemis.core.journal.Journal: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\\n2025-01-15 20:28:09,927 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index io.mashona.logwriting.ArrayStore: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\\n2025-01-15 20:28:09,999 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index jakarta.jms.Connection: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\\n2025-01-15 20:28:16,707 INFO  [io.qua.dep.QuarkusAugmentor] (main) Quarkus augmentation completed in 14335ms\\nServer configuration updated and persisted. Run the following command to review the configuration:\\n\\n\\tkc.sh show-config", "stderr": "", "rc": 0, "cmd": "/opt/keycloak/keycloak-24.0.5/bin/kc.sh build\\n", "start": "2025-01-15 20:27:58.190521", "end": "2025-01-15 20:28:16.893836", "delta": "0:00:18.703315", "msg": "", "invocation": {"module_args": {"_raw_params": "/opt/keycloak/keycloak-24.0.5/bin/kc.sh build\\n", "_uses_shell": true, "expand_argument_vars": true, "stdin_add_newline": true, "strip_empty_ends": true, "argv": null, "chdir": null, "executable": null, "creates": null, "removes": null, "stdin": null}}}\r\n', b'Shared connection to 10.1.240.211 closed.\r\n')
<10.1.240.211> ESTABLISH SSH CONNECTION FOR USER: root
<10.1.240.211> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/xx/.ansible/cp/7f67f20171"' 10.1.240.211 '/bin/sh -c '"'"'rm -f -r /root/.ansible/tmp/ansible-tmp-1736990876.6532912-6730-209843680614645/ > /dev/null 2>&1 && sleep 0'"'"''
<10.1.240.211> (0, b'', b'')
changed: [10.1.240.211] => {
    "changed": true,
    "cmd": "/opt/keycloak/keycloak-24.0.5/bin/kc.sh build\n",
    "delta": "0:00:18.703315",
    "end": "2025-01-15 20:28:16.893836",
    "invocation": {
        "module_args": {
            "_raw_params": "/opt/keycloak/keycloak-24.0.5/bin/kc.sh build\n",
            "_uses_shell": true,
            "argv": null,
            "chdir": null,
            "creates": null,
            "executable": null,
            "expand_argument_vars": true,
            "removes": null,
            "stdin": null,
            "stdin_add_newline": true,
            "strip_empty_ends": true
        }
    },
    "msg": "",
    "rc": 0,
    "start": "2025-01-15 20:27:58.190521",
    "stderr": "",
    "stderr_lines": [],
    "stdout": "Updating the configuration and installing your custom providers, if any. Please wait.\n2025-01-15 20:28:00,077 WARN  [org.key.qua.run.cli.Picocli] (main) The following run time non-cli options were found, but will be ignored during build time: kc.db-url, kc.db-username, kc.db-password, kc.hostname-url, kc.hostname-admin-url, kc.hostname-strict, kc.hostname-strict-backchannel, kc.http-enabled, kc.http-port, kc.https-port, kc.proxy, kc.log, kc.log-file, kc.log-file-format, kc.log-level\n\n2025-01-15 20:28:09,807 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index org.apache.tools.ant.Task: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\n2025-01-15 20:28:09,852 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index org.springframework.core.io.DefaultResourceLoader: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\n2025-01-15 20:28:09,853 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index org.springframework.core.io.ResourceLoader: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\n2025-01-15 20:28:09,855 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index org.springframework.core.io.Resource: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\n2025-01-15 20:28:09,904 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index jakarta.jms.XAConnection: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\n2025-01-15 20:28:09,904 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index jakarta.jms.XASession: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\n2025-01-15 20:28:09,905 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index jakarta.jms.XAConnectionFactory: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\n2025-01-15 20:28:09,924 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index org.apache.activemq.artemis.core.journal.RecordInfo: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\n2025-01-15 20:28:09,925 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index org.apache.activemq.artemis.core.journal.Journal: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\n2025-01-15 20:28:09,927 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index io.mashona.logwriting.ArrayStore: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\n2025-01-15 20:28:09,999 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index jakarta.jms.Connection: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\n2025-01-15 20:28:16,707 INFO  [io.qua.dep.QuarkusAugmentor] (main) Quarkus augmentation completed in 14335ms\nServer configuration updated and persisted. Run the following command to review the configuration:\n\n\tkc.sh show-config",
    "stdout_lines": [
        "Updating the configuration and installing your custom providers, if any. Please wait.",
        "2025-01-15 20:28:00,077 WARN  [org.key.qua.run.cli.Picocli] (main) The following run time non-cli options were found, but will be ignored during build time: kc.db-url, kc.db-username, kc.db-password, kc.hostname-url, kc.hostname-admin-url, kc.hostname-strict, kc.hostname-strict-backchannel, kc.http-enabled, kc.http-port, kc.https-port, kc.proxy, kc.log, kc.log-file, kc.log-file-format, kc.log-level",
        "",
        "2025-01-15 20:28:09,807 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index org.apache.tools.ant.Task: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95",
        "2025-01-15 20:28:09,852 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index org.springframework.core.io.DefaultResourceLoader: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95",
        "2025-01-15 20:28:09,853 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index org.springframework.core.io.ResourceLoader: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95",
        "2025-01-15 20:28:09,855 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index org.springframework.core.io.Resource: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95",
        "2025-01-15 20:28:09,904 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index jakarta.jms.XAConnection: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95",
        "2025-01-15 20:28:09,904 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index jakarta.jms.XASession: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95",
        "2025-01-15 20:28:09,905 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index jakarta.jms.XAConnectionFactory: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95",
        "2025-01-15 20:28:09,924 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index org.apache.activemq.artemis.core.journal.RecordInfo: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95",
        "2025-01-15 20:28:09,925 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index org.apache.activemq.artemis.core.journal.Journal: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95",
        "2025-01-15 20:28:09,927 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index io.mashona.logwriting.ArrayStore: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95",
        "2025-01-15 20:28:09,999 WARN  [io.qua.dep.ind.IndexWrapper] (build-9) Failed to index jakarta.jms.Connection: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95",
        "2025-01-15 20:28:16,707 INFO  [io.qua.dep.QuarkusAugmentor] (main) Quarkus augmentation completed in 14335ms",
        "Server configuration updated and persisted. Run the following command to review the configuration:",
        "",
        "\tkc.sh show-config"
    ]
}
<10.1.240.210> (0, b'\r\n{"changed": true, "stdout": "Updating the configuration and installing your custom providers, if any. Please wait.\\n2025-01-15 20:28:02,185 WARN  [org.key.qua.run.cli.Picocli] (main) The following run time non-cli options were found, but will be ignored during build time: kc.db-url, kc.db-username, kc.db-password, kc.hostname-url, kc.hostname-admin-url, kc.hostname-strict, kc.hostname-strict-backchannel, kc.http-enabled, kc.http-port, kc.https-port, kc.proxy, kc.log, kc.log-file, kc.log-file-format, kc.log-level\\n\\n2025-01-15 20:28:21,827 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index org.springframework.core.io.DefaultResourceLoader: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\\n2025-01-15 20:28:21,829 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index org.springframework.core.io.ResourceLoader: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\\n2025-01-15 20:28:21,837 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index org.apache.tools.ant.Task: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\\n2025-01-15 20:28:22,061 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index org.springframework.core.io.Resource: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\\n2025-01-15 20:28:22,263 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index org.apache.activemq.artemis.core.journal.RecordInfo: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\\n2025-01-15 20:28:22,264 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index org.apache.activemq.artemis.core.journal.Journal: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\\n2025-01-15 20:28:22,321 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index io.mashona.logwriting.ArrayStore: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\\n2025-01-15 20:28:22,363 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index jakarta.jms.XAConnection: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\\n2025-01-15 20:28:22,368 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index jakarta.jms.XASession: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\\n2025-01-15 20:28:22,369 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index jakarta.jms.XAConnectionFactory: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\\n2025-01-15 20:28:22,529 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index jakarta.jms.Connection: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\\n2025-01-15 20:28:40,227 INFO  [io.qua.dep.QuarkusAugmentor] (main) Quarkus augmentation completed in 33193ms\\nServer configuration updated and persisted. Run the following command to review the configuration:\\n\\n\\tkc.sh show-config", "stderr": "", "rc": 0, "cmd": "/opt/keycloak/keycloak-24.0.5/bin/kc.sh build\\n", "start": "2025-01-15 20:27:58.549038", "end": "2025-01-15 20:28:40.848043", "delta": "0:00:42.299005", "msg": "", "invocation": {"module_args": {"_raw_params": "/opt/keycloak/keycloak-24.0.5/bin/kc.sh build\\n", "_uses_shell": true, "expand_argument_vars": true, "stdin_add_newline": true, "strip_empty_ends": true, "argv": null, "chdir": null, "executable": null, "creates": null, "removes": null, "stdin": null}}}\r\n', b'Shared connection to 10.1.240.210 closed.\r\n')
<10.1.240.210> ESTABLISH SSH CONNECTION FOR USER: root
<10.1.240.210> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/xx/.ansible/cp/6364f49ece"' 10.1.240.210 '/bin/sh -c '"'"'rm -f -r /root/.ansible/tmp/ansible-tmp-1736990876.694109-6729-25100274233250/ > /dev/null 2>&1 && sleep 0'"'"''
<10.1.240.210> (0, b'', b'')
changed: [10.1.240.210] => {
    "changed": true,
    "cmd": "/opt/keycloak/keycloak-24.0.5/bin/kc.sh build\n",
    "delta": "0:00:42.299005",
    "end": "2025-01-15 20:28:40.848043",
    "invocation": {
        "module_args": {
            "_raw_params": "/opt/keycloak/keycloak-24.0.5/bin/kc.sh build\n",
            "_uses_shell": true,
            "argv": null,
            "chdir": null,
            "creates": null,
            "executable": null,
            "expand_argument_vars": true,
            "removes": null,
            "stdin": null,
            "stdin_add_newline": true,
            "strip_empty_ends": true
        }
    },
    "msg": "",
    "rc": 0,
    "start": "2025-01-15 20:27:58.549038",
    "stderr": "",
    "stderr_lines": [],
    "stdout": "Updating the configuration and installing your custom providers, if any. Please wait.\n2025-01-15 20:28:02,185 WARN  [org.key.qua.run.cli.Picocli] (main) The following run time non-cli options were found, but will be ignored during build time: kc.db-url, kc.db-username, kc.db-password, kc.hostname-url, kc.hostname-admin-url, kc.hostname-strict, kc.hostname-strict-backchannel, kc.http-enabled, kc.http-port, kc.https-port, kc.proxy, kc.log, kc.log-file, kc.log-file-format, kc.log-level\n\n2025-01-15 20:28:21,827 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index org.springframework.core.io.DefaultResourceLoader: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\n2025-01-15 20:28:21,829 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index org.springframework.core.io.ResourceLoader: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\n2025-01-15 20:28:21,837 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index org.apache.tools.ant.Task: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\n2025-01-15 20:28:22,061 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index org.springframework.core.io.Resource: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\n2025-01-15 20:28:22,263 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index org.apache.activemq.artemis.core.journal.RecordInfo: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\n2025-01-15 20:28:22,264 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index org.apache.activemq.artemis.core.journal.Journal: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\n2025-01-15 20:28:22,321 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index io.mashona.logwriting.ArrayStore: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\n2025-01-15 20:28:22,363 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index jakarta.jms.XAConnection: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\n2025-01-15 20:28:22,368 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index jakarta.jms.XASession: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\n2025-01-15 20:28:22,369 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index jakarta.jms.XAConnectionFactory: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\n2025-01-15 20:28:22,529 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index jakarta.jms.Connection: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95\n2025-01-15 20:28:40,227 INFO  [io.qua.dep.QuarkusAugmentor] (main) Quarkus augmentation completed in 33193ms\nServer configuration updated and persisted. Run the following command to review the configuration:\n\n\tkc.sh show-config",
    "stdout_lines": [
        "Updating the configuration and installing your custom providers, if any. Please wait.",
        "2025-01-15 20:28:02,185 WARN  [org.key.qua.run.cli.Picocli] (main) The following run time non-cli options were found, but will be ignored during build time: kc.db-url, kc.db-username, kc.db-password, kc.hostname-url, kc.hostname-admin-url, kc.hostname-strict, kc.hostname-strict-backchannel, kc.http-enabled, kc.http-port, kc.https-port, kc.proxy, kc.log, kc.log-file, kc.log-file-format, kc.log-level",
        "",
        "2025-01-15 20:28:21,827 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index org.springframework.core.io.DefaultResourceLoader: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95",
        "2025-01-15 20:28:21,829 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index org.springframework.core.io.ResourceLoader: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95",
        "2025-01-15 20:28:21,837 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index org.apache.tools.ant.Task: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95",
        "2025-01-15 20:28:22,061 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index org.springframework.core.io.Resource: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95",
        "2025-01-15 20:28:22,263 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index org.apache.activemq.artemis.core.journal.RecordInfo: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95",
        "2025-01-15 20:28:22,264 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index org.apache.activemq.artemis.core.journal.Journal: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95",
        "2025-01-15 20:28:22,321 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index io.mashona.logwriting.ArrayStore: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95",
        "2025-01-15 20:28:22,363 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index jakarta.jms.XAConnection: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95",
        "2025-01-15 20:28:22,368 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index jakarta.jms.XASession: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95",
        "2025-01-15 20:28:22,369 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index jakarta.jms.XAConnectionFactory: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95",
        "2025-01-15 20:28:22,529 WARN  [io.qua.dep.ind.IndexWrapper] (build-66) Failed to index jakarta.jms.Connection: Class does not exist in ClassLoader QuarkusClassLoader:Deployment Class Loader: PROD for keycloak@69f63d95",
        "2025-01-15 20:28:40,227 INFO  [io.qua.dep.QuarkusAugmentor] (main) Quarkus augmentation completed in 33193ms",
        "Server configuration updated and persisted. Run the following command to review the configuration:",
        "",
        "\tkc.sh show-config"
    ]
}

RUNNING HANDLER [middleware_automation.keycloak.keycloak_quarkus : Restart keycloak] ***************************************************************
task path: /home/xx/.ansible/collections/ansible_collections/middleware_automation/keycloak/roles/keycloak_quarkus/handlers/main.yml:9
included: /home/xx/.ansible/collections/ansible_collections/middleware_automation/keycloak/roles/keycloak_quarkus/tasks/restart/serial.yml for 10.1.240.210, 10.1.240.211

RUNNING HANDLER [middleware_automation.keycloak.keycloak_quarkus : Restart and enable {{ keycloak.service_name }} service on {{ item }}] ***********
task path: /home/xx/.ansible/collections/ansible_collections/middleware_automation/keycloak/roles/keycloak_quarkus/tasks/restart/serial.yml:5
included: /home/xx/.ansible/collections/ansible_collections/middleware_automation/keycloak/roles/keycloak_quarkus/tasks/restart.yml for 10.1.240.210, 10.1.240.211 => (item=10.1.240.210)
included: /home/xx/.ansible/collections/ansible_collections/middleware_automation/keycloak/roles/keycloak_quarkus/tasks/restart.yml for 10.1.240.210, 10.1.240.211 => (item=10.1.240.211)

RUNNING HANDLER [middleware_automation.keycloak.keycloak_quarkus : Restart and enable keycloak service] ********************************************
task path: /home/xx/.ansible/collections/ansible_collections/middleware_automation/keycloak/roles/keycloak_quarkus/tasks/restart.yml:2
<10.1.240.210> ESTABLISH SSH CONNECTION FOR USER: root
<10.1.240.210> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/xx/.ansible/cp/6364f49ece"' 10.1.240.210 '/bin/sh -c '"'"'echo ~root && sleep 0'"'"''
<10.1.240.210> (0, b'/root\n', b'')
<10.1.240.210> ESTABLISH SSH CONNECTION FOR USER: root
<10.1.240.210> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/xx/.ansible/cp/6364f49ece"' 10.1.240.210 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1736990922.1231952-6977-156216340806474 `" && echo ansible-tmp-1736990922.1231952-6977-156216340806474="` echo /root/.ansible/tmp/ansible-tmp-1736990922.1231952-6977-156216340806474 `" ) && sleep 0'"'"''
<10.1.240.210> (0, b'ansible-tmp-1736990922.1231952-6977-156216340806474=/root/.ansible/tmp/ansible-tmp-1736990922.1231952-6977-156216340806474\n', b'')
Using module file /usr/lib/python3/dist-packages/ansible/modules/systemd.py
<10.1.240.210> PUT /home/xx/.ansible/tmp/ansible-local-3731zcvzafz6/tmpnszfueb7 TO /root/.ansible/tmp/ansible-tmp-1736990922.1231952-6977-156216340806474/AnsiballZ_systemd.py
<10.1.240.210> SSH: EXEC sftp -b - -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/xx/.ansible/cp/6364f49ece"' '[10.1.240.210]'
<10.1.240.210> (0, b'sftp> put /home/xx/.ansible/tmp/ansible-local-3731zcvzafz6/tmpnszfueb7 /root/.ansible/tmp/ansible-tmp-1736990922.1231952-6977-156216340806474/AnsiballZ_systemd.py\n', b'')
<10.1.240.210> ESTABLISH SSH CONNECTION FOR USER: root
<10.1.240.210> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/xx/.ansible/cp/6364f49ece"' 10.1.240.210 '/bin/sh -c '"'"'chmod u+x /root/.ansible/tmp/ansible-tmp-1736990922.1231952-6977-156216340806474/ /root/.ansible/tmp/ansible-tmp-1736990922.1231952-6977-156216340806474/AnsiballZ_systemd.py && sleep 0'"'"''
<10.1.240.210> (0, b'', b'')
<10.1.240.210> ESTABLISH SSH CONNECTION FOR USER: root
<10.1.240.210> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/xx/.ansible/cp/6364f49ece"' -tt 10.1.240.210 '/bin/sh -c '"'"'/usr/bin/python3.6 /root/.ansible/tmp/ansible-tmp-1736990922.1231952-6977-156216340806474/AnsiballZ_systemd.py && sleep 0'"'"''
<10.1.240.210> (1, b'\r\n{"failed": true, "msg": "Unable to start service keycloak: Job for keycloak.service failed because the control process exited with error code.\\nSee \\"systemctl status keycloak.service\\" and \\"journalctl -xe\\" for details.\\n", "invocation": {"module_args": {"name": "keycloak", "enabled": true, "state": "restarted", "daemon_reload": true, "daemon_reexec": false, "scope": "system", "no_block": false, "force": null, "masked": null}}}\r\n', b'Shared connection to 10.1.240.210 closed.\r\n')
<10.1.240.210> Failed to connect to the host via ssh: Shared connection to 10.1.240.210 closed.
<10.1.240.210> ESTABLISH SSH CONNECTION FOR USER: root
<10.1.240.210> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 -o 'ControlPath="/home/xx/.ansible/cp/6364f49ece"' 10.1.240.210 '/bin/sh -c '"'"'rm -f -r /root/.ansible/tmp/ansible-tmp-1736990922.1231952-6977-156216340806474/ > /dev/null 2>&1 && sleep 0'"'"''
<10.1.240.210> (0, b'', b'')
fatal: [10.1.240.210]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "daemon_reexec": false,
            "daemon_reload": true,
            "enabled": true,
            "force": null,
            "masked": null,
            "name": "keycloak",
            "no_block": false,
            "scope": "system",
            "state": "restarted"
        }
    },
    "msg": "Unable to start service keycloak: Job for keycloak.service failed because the control process exited with error code.\nSee \"systemctl status keycloak.service\" and \"journalctl -xe\" for details.\n"
}

NO MORE HOSTS LEFT *********************************************************************************************************************************

PLAY RECAP *****************************************************************************************************************************************
10.1.240.210               : ok=56   changed=17   unreachable=0    failed=1    skipped=25   rescued=0    ignored=0   
10.1.240.211               : ok=45   changed=13   unreachable=0    failed=0    skipped=16   rescued=0    ignored=0   

rausub avatar Jan 16 '25 01:01 rausub

I would like to add that I have noticed this works fine on fast environment where the install can take place relative quickly, i'm only having issues with this if deploying on slower environments

rausub avatar Feb 25 '25 00:02 rausub

Hello, thanks for reporting. It would really helpful if you can upload the keycloak logs for the failed start operation, end the output of journactl -xe -ukeycloak.

BTW, have you tried increasing the startup waiting time keycloak_quarkus_systemd_wait_for_timeout to something longer? (default is 60 seconds). On a slow network or instance the initial database schema creation could be timing out.

guidograzioli avatar Apr 14 '25 08:04 guidograzioli

This is probably it ! I’ll increase that time out and I’ll let you know if it makes difference.


From: Guido Grazioli @.> Sent: Monday, April 14, 2025 6:56:46 PM To: ansible-middleware/keycloak @.> Cc: Subin Mathew @.>; Author @.> Subject: Re: [ansible-middleware/keycloak] Keycloak service fails on first attempt however works on second (Issue #259)

EXTERNAL:

Hello, thanks for reporting. It would really helpful if you can upload the keycloak logs for the failed start operation, end the output of journactl -xe -ukeycloak.

BTW, have you tried increasing the startup waiting time keycloak_quarkus_systemd_wait_for_timeout to something longer? (default is 60 seconds). On a slow network or instance the initial database schema creation could be timing out.

— Reply to this email directly, view it on GitHubhttps://github.com/ansible-middleware/keycloak/issues/259#issuecomment-2800942230, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BK22Y6JKZTOZESOU4HEL74D2ZNZ45AVCNFSM6AAAAABVG2H7NWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMBQHE2DEMRTGA. You are receiving this because you authored the thread.Message ID: @.***>

[https://avatars.githubusercontent.com/u/849495?s=20&v=4]guidograzioli left a comment (ansible-middleware/keycloak#259)https://github.com/ansible-middleware/keycloak/issues/259#issuecomment-2800942230

Hello, thanks for reporting. It would really helpful if you can upload the keycloak logs for the failed start operation, end the output of journactl -xe -ukeycloak.

BTW, have you tried increasing the startup waiting time keycloak_quarkus_systemd_wait_for_timeout to something longer? (default is 60 seconds). On a slow network or instance the initial database schema creation could be timing out.

— Reply to this email directly, view it on GitHubhttps://github.com/ansible-middleware/keycloak/issues/259#issuecomment-2800942230, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BK22Y6JKZTOZESOU4HEL74D2ZNZ45AVCNFSM6AAAAABVG2H7NWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMBQHE2DEMRTGA. You are receiving this because you authored the thread.Message ID: @.***>

DISCLAIMER - This message contains confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that you must not disseminate, copy or take any action in reliance on it. If you have received this message in error please notify Rauland Australia Pty Ltd on (02) 9908 1777 immediately. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Rauland Australia Pty Ltd.

rausub avatar Apr 15 '25 00:04 rausub

Closing; welcome to reopen is the issue still happens

guidograzioli avatar May 19 '25 15:05 guidograzioli