Hi @aihamh ,
Thanks for your response.
-
As you mentioned above like pre-registration-core is not an spring service, but I can see in pre-registration-core module having “PreRegistartionCoreApplication” class which contains main method and it is anoted with @SpringBootApplication. Then I think it should run as spring-boot Project. Correct me if I am wrong.
-
When I am trying to run “pre-registration-application-service” it is running partially but at the end it’s giving some which is regrading to “error connecting to auth service”. I thinks it is not able to fetch token and it might be related to key-cloak IAM. Is there any configuration guide we need to follow for key-cloak setup or if you have any setup details. So that we can follow. Same issue is coming for pre-registration-batchjob service. I am attaching error logs and screenshot for same.
{“@timestamp”:“2024-04-24T18:34:24.120+05:30”,“@version”:“1”,“message”:“Fetched the identity json from config server{\r\n\t"identity": {\r\n\t\t"IDSchemaVersion": {\r\n\t\t\t"value": "IDSchemaVersion"\r\n\t\t},\r\n\t\t"name": {\r\n\t\t\t"value": "fullName"\r\n\t\t},\r\n\t\t"gender": {\r\n\t\t\t"value": "gender"\r\n\t\t},\r\n\t\t"dob": {\r\n\t\t\t"value": "dateOfBirth"\r\n\t\t},\r\n\t\t"age": {\r\n\t\t\t"value": "age"\r\n\t\t},\r\n\t\t"introducerRID": {\r\n\t\t\t"value": "introducerRID"\r\n\t\t},\r\n\t\t"introducerUIN": {\r\n\t\t\t"value": "introducerUIN"\r\n\t\t},\r\n\t\t"introducerVID": {\r\n\t\t\t"value": "introducerVID"\r\n\t\t},\r\n\t\t"introducerName": {\r\n\t\t\t"value": "introducerName"\r\n\t\t},\r\n\t\t"phone": {\r\n\t\t\t"value": "phone"\r\n\t\t},\r\n\t\t"phoneNumber": {\r\n\t\t\t"value": "phone"\r\n\t\t},\r\n\t\t"email": {\r\n\t\t\t"value": "email"\r\n\t\t},\r\n\t\t"emailId": {\r\n\t\t\t"value": "email"\r\n\t\t},\r\n\t\t"uin": {\r\n\t\t\t"value": "UIN"\r\n\t\t},\r\n\t\t"vid": {\r\n\t\t\t"value": "VID"\r\n\t\t},\r\n\t\t"individualBiometrics": {\r\n\t\t\t"value": "individualBiometrics"\r\n\t\t},\r\n\t\t"introducerBiometrics": {\r\n\t\t\t"value": "introducerBiometrics"\r\n\t\t},\r\n\t\t"individualAuthBiometrics": {\r\n\t\t\t"value": "individualAuthBiometrics"\r\n\t\t},\r\n\t\t"officerBiometricFileName": {\r\n\t\t\t"value": "officerBiometricFileName"\r\n\t\t},\r\n\t\t"supervisorBiometricFileName": {\r\n\t\t\t"value": "supervisorBiometricFileName"\r\n\t\t},\r\n\t\t"residenceStatus": {\r\n\t\t\t"value": "residenceStatus"\r\n\t\t},\r\n\t\t"preferredLanguage": {\r\n\t\t\t"value": "preferredLang"\r\n\t\t},\r\n\t\t"locationHierarchyForProfiling": {\r\n\t\t\t"value": "zone,postalCode"\r\n\t\t},\r\n\t\t"addressLine1": {\r\n\t\t\t"value": "addressLine1"\r\n\t\t},\r\n\t\t"addressLine2": {\r\n\t\t\t"value": "addressLine2"\r\n\t\t},\r\n\t\t"addressLine3": {\r\n\t\t\t"value": "addressLine3"\r\n\t\t},\r\n\t\t"location1": {\r\n\t\t\t"value": "city"\r\n\t\t},\r\n\t\t"location2": {\r\n\t\t\t"value": "region"\r\n\t\t},\r\n\t\t"location3": {\r\n\t\t\t"value": "province"\r\n\t\t},\r\n\t\t"postalCode": {\r\n\t\t\t"value": "postalCode"\r\n\t\t},\r\n\t\t"location4": {\r\n\t\t\t"value": "zone"\r\n\t\t},\r\n\t\t"fullAddress": {\r\n\t\t\t"value": "addressLine1,addressLine2,addressLine3,city,region,province,postalCode"\r\n\t\t},\r\n\t\t"bestTwoFingers": {\r\n\t\t\t"value": "bestTwoFingers"\r\n\t\t},\r\n\t\t"birthdate": {\r\n\t\t\t"value": "dateOfBirth"\r\n\t\t},\r\n\t\t"picture": {\r\n\t\t\t"value": "face"\r\n\t\t},\r\n\t\t"phone_number": {\r\n\t\t\t"value": "phone"\r\n\t\t},\r\n\t\t"address": {\r\n\t\t\t"value": "addressLine1,addressLine2,addressLine3,city,region,province,postalCode"\r\n\t\t},\r\n\r\n\t\t"individual_id": {\r\n\t\t\t"value": "individual_id"\r\n\t\t},\r\n\t\t"street_address": {\r\n\t\t\t"value": "addressLine1,addressLine2,addressLine3"\r\n\t\t},\r\n\t\t"locality": {\r\n\t\t\t"value": "city"\r\n\t\t},\r\n\t\t"region": {\r\n\t\t\t"value": "region"\r\n\t\t},\r\n\t\t"postal_code": {\r\n\t\t\t"value": "postalCode"\r\n\t\t},\r\n\t\t"country": {\r\n\t\t\t"value": "province"\r\n\t\t}\r\n\t},\r\n\t"metaInfo": {\r\n\t\t"value": "metaInfo"\r\n\t},\r\n\t"audits": {\r\n\t\t"value": "audits"\r\n\t},\r\n\t"documents": {\r\n\t\t"poa": {\r\n\t\t\t"value": "proofOfAddress"\r\n\t\t},\r\n\t\t"poi": {\r\n\t\t\t"value": "proofOfIdentity"\r\n\t\t},\r\n\t\t"por": {\r\n\t\t\t"value": "proofOfRelationship"\r\n\t\t},\r\n\t\t"pob": {\r\n\t\t\t"value": "proofOfDateOfBirth"\r\n\t\t},\r\n\t\t"poe": {\r\n\t\t\t"value": "proofOfException"\r\n\t\t}\r\n\t},\r\n\t"attributeUpdateCountLimit": {\r\n\t\t"fullName": 2,\r\n\t\t"gender": 1,\r\n\t\t"dob": 1,\r\n\t\t"age": 1\r\n\t}\r\n}\r\n”,“logger_name”:“io.mosip.preregistration.application.service.DemographicService”,“thread_name”:“restartedMain”,“level”:“INFO”,“level_value”:20000,“appName”:“pre-registration-application-service”}
{“@timestamp”:“2024-04-24T18:34:24.121+05:30”,“@version”:“1”,“message”:“sessionId - idType - id - In applicationStartedEvent method of ApplicationEventListerner demographic Service setup() method is called”,“logger_name”:“io.mosip.preregistration.application.config.ApplicationEventListerner”,“thread_name”:“restartedMain”,“level”:“INFO”,“level_value”:20000,“appName”:“pre-registration-application-service”}
{“@timestamp”:“2024-04-24T18:34:24.182+05:30”,“@version”:“1”,“message”:"getAllDocCategoriesAndTypes url: http://masterdata.kernel/v1/masterdata/validdocuments/all?pageSize=50 ",“logger_name”:“io.mosip.preregistration.core.util.ValidationUtil”,“thread_name”:“restartedMain”,“level”:“INFO”,“level_value”:20000,“appName”:“pre-registration-application-service”}
{“@timestamp”:“2024-04-24T18:34:24.304+05:30”,“@version”:“1”,“message”:“Requesting for new Token for the provided OIDC Service: http://localhost:8080/auth/realms/",“logger_name”:“io.mosip.kernel.auth.defaultadapter.helper.TokenHelper”,“thread_name”:“restartedMain”,“level”:“INFO”,“level_value”:20000,“appName”:“pre-registration-application-service”,“traceId”:“cdd2a5db9c0339fd”,“spanId”:“cdd2a5db9c0339fd”,“spanExportable”:“false”,“X-Span-Export”:“false”,“X-B3-SpanId”:“cdd2a5db9c0339fd”,“X-B3-TraceId”:"cdd2a5db9c0339fd”}
{“@timestamp”:“2024-04-24T18:34:24.358+05:30”,“@version”:“1”,“message”:“error connecting to auth service {"error":"Unable to find matching target resource method"}”,“logger_name”:“io.mosip.kernel.auth.defaultadapter.helper.TokenHelper”,“thread_name”:“restartedMain”,“level”:“ERROR”,“level_value”:40000,“appName”:“pre-registration-application-service”,“traceId”:“cdd2a5db9c0339fd”,“spanId”:“cdd2a5db9c0339fd”,“spanExportable”:“false”,“X-Span-Export”:“false”,“X-B3-SpanId”:“cdd2a5db9c0339fd”,“X-B3-TraceId”:“cdd2a5db9c0339fd”}
{“@timestamp”:“2024-04-24T18:34:24.358+05:30”,“@version”:“1”,“message”:“error connecting to auth service Problem in connecting to auth service”,“logger_name”:“io.mosip.kernel.auth.defaultadapter.helper.TokenHelper”,“thread_name”:“restartedMain”,“level”:“ERROR”,“level_value”:40000,“appName”:“pre-registration-application-service”,“traceId”:“cdd2a5db9c0339fd”,“spanId”:“cdd2a5db9c0339fd”,“spanExportable”:“false”,“X-Span-Export”:“false”,“X-B3-SpanId”:“cdd2a5db9c0339fd”,“X-B3-TraceId”:“cdd2a5db9c0339fd”}
{“@timestamp”:“2024-04-24T18:34:24.359+05:30”,“@version”:“1”,“message”:“there is some issue with getting token with clienid and secret”,“logger_name”:“io.mosip.kernel.auth.defaultadapter.config.SelfTokenRestInterceptor”,“thread_name”:“restartedMain”,“level”:“ERROR”,“level_value”:40000,“appName”:“pre-registration-application-service”,“traceId”:“cdd2a5db9c0339fd”,“spanId”:“cdd2a5db9c0339fd”,“spanExportable”:“false”,“X-Span-Export”:“false”,“X-B3-SpanId”:“cdd2a5db9c0339fd”,“X-B3-TraceId”:“cdd2a5db9c0339fd”}
{“@timestamp”:“2024-04-24T18:34:24.385+05:30”,“@version”:“1”,“message”:“\r\n\r\nError starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.”,“logger_name”:“org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener”,“thread_name”:“restartedMain”,“level”:“INFO”,“level_value”:20000,“appName”:“pre-registration-application-service”}
{“@timestamp”:“2024-04-24T18:34:24.400+05:30”,“@version”:“1”,“message”:“Application run failed”,“logger_name”:“org.springframework.boot.SpringApplication”,“thread_name”:“restartedMain”,“level”:“ERROR”,“level_value”:40000,“stack_trace”:“io.mosip.kernel.auth.defaultadapter.exception.AuthAdapterException: Self cached auth token is null\r\n\tat io.mosip.kernel.auth.defaultadapter.config.SelfTokenRestInterceptor.intercept(SelfTokenRestInterceptor.java:71)\r\n\tat org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:92)\r\n\tat brave.spring.web.TracingClientHttpRequestInterceptor.intercept(TracingClientHttpRequestInterceptor.java:53)\r\n\tat org.springframework.cloud.sleuth.instrument.web.client.LazyTracingClientHttpRequestInterceptor.intercept(TraceWebClientAutoConfiguration.java:293)\r\n\tat org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:92)\r\n\tat org.springframework.http.client.InterceptingClientHttpRequest.executeInternal(InterceptingClientHttpRequest.java:76)\r\n\tat org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48)\r\n\tat org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53)\r\n\tat org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:723)\r\n\tat org.springframework.web.client.RestTemplate.execute(RestTemplate.java:680)\r\n\tat org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:629)\r\n\tat io.mosip.preregistration.core.util.ValidationUtil.getAllDocCategoriesAndTypes(ValidationUtil.java:329)\r\n\tat io.mosip.preregistration.application.service.DocumentService.setup(DocumentService.java:187)\r\n\tat io.mosip.preregistration.application.service.DocumentService$$FastClassBySpringCGLIB$$22bc9d53.invoke()\r\n\tat org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)\r\n\tat org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684)\r\n\tat io.mosip.preregistration.application.service.DocumentService$$EnhancerBySpringCGLIB$$2e443631.setup()\r\n\tat io.mosip.preregistration.application.config.ApplicationEventListerner.applicationStartedEvent(ApplicationEventListerner.java:36)\r\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:566)\r\n\tat org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:261)\r\n\tat org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:180)\r\n\tat org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:142)\r\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)\r\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)\r\n\tat org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)\r\n\tat org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:400)\r\n\tat org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:354)\r\n\tat org.springframework.boot.context.event.EventPublishingRunListener.started(EventPublishingRunListener.java:97)\r\n\tat org.springframework.boot.SpringApplicationRunListeners.started(SpringApplicationRunListeners.java:72)\r\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:334)\r\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)\r\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)\r\n\tat io.mosip.preregistration.application.PreRegistrationApplication.main(PreRegistrationApplication.java:23)\r\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:566)\r\n\tat org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)\r\n”,“appName”:“pre-registration-application-service”}
Please guide us if any inputs from your side.
Thanks in advance.!