Registry doesn't automatically come up after server restart
search cancel

Registry doesn't automatically come up after server restart

book

Article ID: 122776

calendar_today

Updated On: 03-12-2025

Products

Service Virtualization

Issue/Introduction

Restarting Server which has all DevTest components running as services and "Automatic" option is selected is not starting Registry. Registry need to be started manually. The logs say Registry is not able to connect to IAM:

2018-12-07 18:31:56,054Z (13:31) [main] ERROR com.itko.lisa.coordinator.TestRegistryImpl - Couldn't connect to IAM
java.lang.RuntimeException: Could not obtain configuration from server [https://localhost:51111/auth/realms/service_virtualization/.well-known/uma-configuration].
at org.keycloak.authorization.client.AuthzClient.<init>(AuthzClient.java:92)
at org.keycloak.authorization.client.AuthzClient.create(AuthzClient.java:60)
at com.ca.ad.sv.iam.IAMClient.<init>(IAMClient.java:46)
at com.ca.devtest.acl.internal.IAMClientFactory.createIAMClient(IAMClientFactory.java:21)
at com.ca.devtest.acl.internal.IAMClientFactory.getIamClient(IAMClientFactory.java:13)
at com.ca.devtest.acl.internal.IAMUtil.pingIAM(IAMUtil.java:33)
at com.itko.lisa.coordinator.TestRegistryImpl.initialize(TestRegistryImpl.java:279)
at com.itko.lisa.coordinator.TestRegistryImpl.<init>(TestRegistryImpl.java:243)
at com.itko.lisa.coordinator.TestRegistryImpl.main(TestRegistryImpl.java:2186)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.exe4j.runtime.WinLauncher$2.run(Unknown Source)
Caused by: java.lang.RuntimeException: Error executing http method [org.apache.http.client.methods.RequestBuilder@6402b451]. Response : null
at org.keycloak.authorization.client.util.HttpMethod.execute(HttpMethod.java:106)
at org.keycloak.authorization.client.util.HttpMethodResponse$2.execute(HttpMethodResponse.java:48)
at org.keycloak.authorization.client.AuthzClient.<init>(AuthzClient.java:90)
... 14 more
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:51111 [localhost/127.0.0.1] failed: Connection refused: connect
at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:142)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:319)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
at org.keycloak.authorization.client.util.HttpMethod.execute(HttpMethod.java:84)
... 16 more
Caused by java.net.ConnectException: Connection refused: connect
at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net..Socket.connect(Socket.java:589)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:244)
at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:125)
... 27 more
2018-12-07 18:31:56,054Z (13:31) [main] ERROR com.itko.lisa.coordinator.TestRegistryImpl - ************************
2018-12-07 18:31:56,054Z (13:31) [main] ERROR com.itko.lisa.coordinator.TestRegistryImpl - Couldn't connect to IAM server https://localhost:51111/auth
2018-12-07 18:31:56,054Z (13:31) [main] ERROR com.itko.lisa.coordinator.TestRegistryImpl - Please make sure IAM server is up before starting Registry
2018-12-07 18:31:56,054Z (13:31) [main] ERROR com.itko.lisa.coordinator.TestRegistryImpl - ************************
2018-12-07 18:31:56,054Z (13:31) [main] INFO System.out - Please make sure IAM server is up before starting Registry
2018-12-07 18:31:56,101Z (13:31) [Thread-7] INFO com.itko.lisa.net.ActiveMQFactory - Closing AMQ connections

Environment

All supported DevTest releases.

Cause

Registry needs IAM and Enterprise Dashboard need to be started before it starts.

With "Automatic" start option, all Services are starting at the same time and causing the issue.

Resolution

Setting the Registry Service start option from Automatic --> Automatic (Delayed Start) resolves the issue.

Additional Information