Unable to download virtual services from the Virtual Service Catalog from the 'Action' column.
Tried to delete solrData folder, removed ED url, restarted VSC Service and added ED url.
Can see that connections to all Registries are fine but the VSC is unable to load/fetch any VS.
Release : 10.6
Component : DevTest Virtual Service Catalog
In the VSCatalog log file below error could be seen when VSC is trying to fetch the VSE details from Registries:
2022-07-08 08:00:03.365 DEBUG 17384 --- [FetchVsesService-1] c.c.a.s.b.s.v.l.DefaultFetchVsesService : Exception thrown while creating JWT token for devtest apis: Exception is: org.keycloak.authorization.client.util.HttpResponseException: Unexpected response from server: 400 / Bad Request
at org.keycloak.authorization.client.util.HttpMethod.execute(HttpMethod.java:95)
at org.keycloak.authorization.client.util.HttpMethodResponse$2.execute(HttpMethodResponse.java:48)
at org.keycloak.authorization.client.AuthzClient.obtainAccessToken(AuthzClient.java:133)
at com.ca.ad.sv.bespin.security.SvDevtestTokenProvider.createJwtForDevtestApi(SvDevtestTokenProvider.java:47)
at com.ca.ad.sv.bespin.service.vse.lisa2solr.DefaultFetchVsesService.getCredentials(DefaultFetchVsesService.java:196)
at com.ca.ad.sv.bespin.service.vse.lisa2solr.DefaultFetchVsesService.lambda$null$0(DefaultFetchVsesService.java:164)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
at com.ca.ad.sv.bespin.service.vse.lisa2solr.DefaultFetchVsesService.lambda$fetchServicesFromVSEs$1(DefaultFetchVsesService.java:151)
at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1548)
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
at com.ca.ad.sv.bespin.service.vse.lisa2solr.DefaultFetchVsesService.fetchServicesFromVSEs(DefaultFetchVsesService.java:144)
at com.ca.ad.sv.bespin.service.vse.lisa2solr.DefaultFetchVsesService.fetchVsesToSolr(DefaultFetchVsesService.java:100)
at com.ca.ad.sv.bespin.config.FetchVsesEventListener.handleVsesRefresh(FetchVsesEventListener.java:37)
at com.ca.ad.sv.bespin.config.FetchVsesEventListener$$FastClassBySpringCGLIB$$e7d1264f.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Since the error is coming from Keycloak, checked the IAM server log and found below WARN message repeatedly:
2022-07-13 09:00:03,265 WARN [org.keycloak.events] (default task-35) type=LOGIN_ERROR, realmId=service_virtualization, clientId=virtual-service-catalog, userId=84804632-5dab-43c4-9687-ce400ba55e5c, ipAddress=xx.xx.xx.xx, error=user_disabled, auth_method=openid-connect, application='Virtual Service Catalog', grant_type=password, client_auth_method=client-secret, username=vscuser
Since the "vscuser" is a default user used for internal usage by DevTest for integrating VSC with other modules, it cannot be looked into directly as any other DevTest user. To check the status of vscuser, there is a workaround as below:
- Open IAM console with admin login.
- Search for any user and click on the ID hyperlink that will open the user details page. Copy the browser url of this page.
- Now open a NEW tab in the same browser and paste the copied url and replace the last part(ID value) with 84804632-5dab-43c4-9687-ce400ba55e5c
- The URL would loo something like below:
https://<IAMHOSTNAME>:51111/auth/admin/service_virtualization/console/#/realms/service_virtualization/users/84804632-5dab-43c4-9687-ce400ba55e5c
- Make sure the "User Enabled" toggle button is turned ON as in below screen and then SAVE the change.
!! IMPORTANT: DO NOT CHANGE ANY OTHER SETTING WIHOUT CONSULTING PRODUCT SUPPORT. !!
- Now re-login into the VSC console and refresh the virtual services list and you should be able to see them loading and able to download them properly from actions column.