OCI - Mosip 1.2.0 V3 Installation failing for keymanager

Hi

I’m following the documentation https://docs.mosip.io/1.2.0/deploymentnew/v3-installation/aws-installation-guidelines-new to setup MOSIP on Oracle Cloud environment. Currently I’m facing the below issue when trying to setup the keymanager. All kernel-keygen pods are failing with following error and the job kernel-keygen is unsuccesful. Can you please check and confirm whether any of the prerequisites are missing here. I’m using the default conf secrets and config server.

@timestamp”:“2024-03-08T07:27:52.974Z”,“@version”:“1”,“message”:“Application run failed”,“logger_name”:“org.springframework.boot.SpringApplication”,“thread_name”:“main”,“level”:“ERROR”,“level_value”:40000,“stack_trace”:“java.lang.IllegalStateException: Failed to execute CommandLineRunner\n\tat org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:800)\n\tat org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:781)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:335)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)\n\tat io.mosip.kernel.keygenerator.KeysGeneratorApplication.main(KeysGeneratorApplication.java:23)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:566)\n\tat org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:87)\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:50)\n\tat org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:593)\nCaused by: io.mosip.kernel.keymanagerservice.exception.InvalidApplicationIdException: KER-KMS-002 → ApplicationId not found in Key Policy. Key/CSR generation not allowed.\n\tat io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper.getKeyPolicy(KeymanagerDBHelper.java:257)\n\tat io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl.generateMasterKey(KeymanagerServiceImpl.java:488)\n\tat io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl$$FastClassBySpringCGLIB$$37c188ac.invoke()\n\tat org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)\n\tat org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n\tat org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294)\n\tat org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)\n\tat org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\n\tat io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl$$EnhancerBySpringCGLIB$$fa9e7ffb.generateMasterKey()\n\tat io.mosip.kernel.keygenerator.generator.KeysGenerator.generateMasterKey(KeysGenerator.java:195)\n\tat io.mosip.kernel.keygenerator.generator.KeysGenerator.lambda$generateKeys$0(KeysGenerator.java:120)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1541)\n\tat io.mosip.kernel.keygenerator.generator.KeysGenerator.generateKeys(KeysGenerator.java:100)\n\tat io.mosip.kernel.keygenerator.KeysGeneratorApplication.run(KeysGeneratorApplication.java:31)\n\tat org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:797)\n\t… 13 common frames omitted\n”,“appName”:“keys-generator”}

Hi @subhashchandrab

We have gone through the logs, please we would request you to share the full log file to understand the issue.

Best Regards,
Team MOSIP

{“@timestamp”:“2024-03-11T08:39:23.385Z”,“@version”:“1”,“message”:“sessionId - applicationId - KERNEL - Getting Key CSR for application ID: KERNEL, RefId: SIGN”,“logger_name”:“io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.423Z”,“@version”:“1”,“message”:“Generated Master Key for Application ID & ReferenceId: KERNEL:SIGN”,“logger_name”:“io.mosip.kernel.keygenerator.generator.KeysGenerator”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.424Z”,“@version”:“1”,“message”:“sessionId - - - Fetching Key Policy for keyPolicyName(Cache): PRE_REGISTRATION”,“logger_name”:“io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.426Z”,“@version”:“1”,“message”:“sessionId - applicationId - - Request for Master Key Generation”,“logger_name”:“io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.426Z”,“@version”:“1”,“message”:“sessionId - applicationId - PRE_REGISTRATION - Generate Key for application ID: PRE_REGISTRATION, RefId: , force flag: false”,“logger_name”:“io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.426Z”,“@version”:“1”,“message”:“sessionId - - - Getting key alias”,“logger_name”:“io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.428Z”,“@version”:“1”,“message”:“sessionId - PRE_REGISTRATION - - PreExpireDays found as key policy:60”,“logger_name”:“io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.428Z”,“@version”:“1”,“message”:“sessionId - keyAlias - [KeyAlias(alias=da973c45-4cd2-4b49-8e63-cc9b5286c7fa, applicationId=PRE_REGISTRATION, referenceId=, keyGenerationTime=2024-03-08T07:22:28.161599, keyExpiryTime=2027-03-08T07:22:28.161599, status=null, certThumbprint=5928F3A7C345C1AAEEA1418C4AD974963EC9FFB20F38E65396C712FCFDC947FD, uniqueIdentifier=4A0BDE279E37B250BF411A1C8D6B10F0FBDE5798)] - keyAlias”,“logger_name”:“io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.428Z”,“@version”:“1”,“message”:“sessionId - currentKeyAlias - [KeyAlias(alias=da973c45-4cd2-4b49-8e63-cc9b5286c7fa, applicationId=PRE_REGISTRATION, referenceId=, keyGenerationTime=2024-03-08T07:22:28.161599, keyExpiryTime=2027-03-08T07:22:28.161599, status=null, certThumbprint=5928F3A7C345C1AAEEA1418C4AD974963EC9FFB20F38E65396C712FCFDC947FD, uniqueIdentifier=4A0BDE279E37B250BF411A1C8D6B10F0FBDE5798)] - currentKeyAlias”,“logger_name”:“io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.428Z”,“@version”:“1”,“message”:“sessionId - currentKeyAlias - 1 - key details present in DBKeyAlias(alias=da973c45-4cd2-4b49-8e63-cc9b5286c7fa, applicationId=PRE_REGISTRATION, referenceId=, keyGenerationTime=2024-03-08T07:22:28.161599, keyExpiryTime=2027-03-08T07:22:28.161599, status=null, certThumbprint=5928F3A7C345C1AAEEA1418C4AD974963EC9FFB20F38E65396C712FCFDC947FD, uniqueIdentifier=4A0BDE279E37B250BF411A1C8D6B10F0FBDE5798)”,“logger_name”:“io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.428Z”,“@version”:“1”,“message”:“sessionId - applicationId - PRE_REGISTRATION - Getting Key CSR for application ID: PRE_REGISTRATION, RefId: “,“logger_name”:“io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{”@timestamp”:“2024-03-11T08:39:23.462Z”,“@version”:“1”,“message”:“Generated Master Key for Application ID & ReferenceId: PRE_REGISTRATION”,“logger_name”:“io.mosip.kernel.keygenerator.generator.KeysGenerator”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.463Z”,“@version”:“1”,“message”:“sessionId - - - Fetching Key Policy for keyPolicyName(Cache): REGISTRATION”,“logger_name”:“io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.465Z”,“@version”:“1”,“message”:“sessionId - applicationId - - Request for Master Key Generation”,“logger_name”:“io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.465Z”,“@version”:“1”,“message”:“sessionId - applicationId - REGISTRATION - Generate Key for application ID: REGISTRATION, RefId: , force flag: false”,“logger_name”:“io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.465Z”,“@version”:“1”,“message”:“sessionId - - - Getting key alias”,“logger_name”:“io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.467Z”,“@version”:“1”,“message”:“sessionId - REGISTRATION - - PreExpireDays found as key policy:60”,“logger_name”:“io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.467Z”,“@version”:“1”,“message”:“sessionId - keyAlias - [KeyAlias(alias=95a08d63-43db-4c17-a1d5-217894a28860, applicationId=REGISTRATION, referenceId=, keyGenerationTime=2024-03-08T07:22:28.406050, keyExpiryTime=2027-03-08T07:22:28.406050, status=null, certThumbprint=AA65596C98291BAFE01086A52BE6118F8540D4EDB7210AFED80F5518CE43C89D, uniqueIdentifier=5D99774EB260A5565CEF032D2015C9C91725AEA2)] - keyAlias”,“logger_name”:“io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.467Z”,“@version”:“1”,“message”:“sessionId - currentKeyAlias - [KeyAlias(alias=95a08d63-43db-4c17-a1d5-217894a28860, applicationId=REGISTRATION, referenceId=, keyGenerationTime=2024-03-08T07:22:28.406050, keyExpiryTime=2027-03-08T07:22:28.406050, status=null, certThumbprint=AA65596C98291BAFE01086A52BE6118F8540D4EDB7210AFED80F5518CE43C89D, uniqueIdentifier=5D99774EB260A5565CEF032D2015C9C91725AEA2)] - currentKeyAlias”,“logger_name”:“io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.467Z”,“@version”:“1”,“message”:“sessionId - currentKeyAlias - 1 - key details present in DBKeyAlias(alias=95a08d63-43db-4c17-a1d5-217894a28860, applicationId=REGISTRATION, referenceId=, keyGenerationTime=2024-03-08T07:22:28.406050, keyExpiryTime=2027-03-08T07:22:28.406050, status=null, certThumbprint=AA65596C98291BAFE01086A52BE6118F8540D4EDB7210AFED80F5518CE43C89D, uniqueIdentifier=5D99774EB260A5565CEF032D2015C9C91725AEA2)”,“logger_name”:“io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.467Z”,“@version”:“1”,“message”:“sessionId - applicationId - REGISTRATION - Getting Key CSR for application ID: REGISTRATION, RefId: “,“logger_name”:“io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{”@timestamp”:“2024-03-11T08:39:23.548Z”,“@version”:“1”,“message”:“Generated Master Key for Application ID & ReferenceId: REGISTRATION”,“logger_name”:“io.mosip.kernel.keygenerator.generator.KeysGenerator”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.548Z”,“@version”:“1”,“message”:“sessionId - - - Fetching Key Policy for keyPolicyName(Cache): REGISTRATION_PROCESSOR”,“logger_name”:“io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.550Z”,“@version”:“1”,“message”:“sessionId - applicationId - - Request for Master Key Generation”,“logger_name”:“io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.550Z”,“@version”:“1”,“message”:“sessionId - applicationId - REGISTRATION_PROCESSOR - Generate Key for application ID: REGISTRATION_PROCESSOR, RefId: , force flag: false”,“logger_name”:“io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.550Z”,“@version”:“1”,“message”:“sessionId - - - Getting key alias”,“logger_name”:“io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.552Z”,“@version”:“1”,“message”:“sessionId - REGISTRATION_PROCESSOR - - PreExpireDays found as key policy:60”,“logger_name”:“io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.552Z”,“@version”:“1”,“message”:“sessionId - keyAlias - [KeyAlias(alias=3cf52d61-eca6-41ea-9257-4cc40fd43914, applicationId=REGISTRATION_PROCESSOR, referenceId=, keyGenerationTime=2024-03-08T07:22:28.767564, keyExpiryTime=2027-03-08T07:22:28.767564, status=null, certThumbprint=037D97E8A2FEAE183A9967CA95DF3101219564F83752EF32135BE6B120C4334F, uniqueIdentifier=D5A60E2DF3D7AEC85735FA6D605F521EB2C9CD78)] - keyAlias”,“logger_name”:“io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.552Z”,“@version”:“1”,“message”:“sessionId - currentKeyAlias - [KeyAlias(alias=3cf52d61-eca6-41ea-9257-4cc40fd43914, applicationId=REGISTRATION_PROCESSOR, referenceId=, keyGenerationTime=2024-03-08T07:22:28.767564, keyExpiryTime=2027-03-08T07:22:28.767564, status=null, certThumbprint=037D97E8A2FEAE183A9967CA95DF3101219564F83752EF32135BE6B120C4334F, uniqueIdentifier=D5A60E2DF3D7AEC85735FA6D605F521EB2C9CD78)] - currentKeyAlias”,“logger_name”:“io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.552Z”,“@version”:“1”,“message”:“sessionId - currentKeyAlias - 1 - key details present in DBKeyAlias(alias=3cf52d61-eca6-41ea-9257-4cc40fd43914, applicationId=REGISTRATION_PROCESSOR, referenceId=, keyGenerationTime=2024-03-08T07:22:28.767564, keyExpiryTime=2027-03-08T07:22:28.767564, status=null, certThumbprint=037D97E8A2FEAE183A9967CA95DF3101219564F83752EF32135BE6B120C4334F, uniqueIdentifier=D5A60E2DF3D7AEC85735FA6D605F521EB2C9CD78)”,“logger_name”:“io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.552Z”,“@version”:“1”,“message”:“sessionId - applicationId - REGISTRATION_PROCESSOR - Getting Key CSR for application ID: REGISTRATION_PROCESSOR, RefId: “,“logger_name”:“io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{”@timestamp”:“2024-03-11T08:39:23.585Z”,“@version”:“1”,“message”:“Generated Master Key for Application ID & ReferenceId: REGISTRATION_PROCESSOR”,“logger_name”:“io.mosip.kernel.keygenerator.generator.KeysGenerator”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.585Z”,“@version”:“1”,“message”:“sessionId - - - Fetching Key Policy for keyPolicyName(Cache): ID_REPO”,“logger_name”:“io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.588Z”,“@version”:“1”,“message”:“sessionId - applicationId - - Request for Master Key Generation”,“logger_name”:“io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.588Z”,“@version”:“1”,“message”:“sessionId - applicationId - ID_REPO - Generate Key for application ID: ID_REPO, RefId: , force flag: false”,“logger_name”:“io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.588Z”,“@version”:“1”,“message”:“sessionId - - - Getting key alias”,“logger_name”:“io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.590Z”,“@version”:“1”,“message”:“sessionId - ID_REPO - - PreExpireDays found as key policy:60”,“logger_name”:“io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.590Z”,“@version”:“1”,“message”:“sessionId - keyAlias - [KeyAlias(alias=0041bf80-7a61-459d-805e-12a7a01881ef, applicationId=ID_REPO, referenceId=, keyGenerationTime=2024-03-08T07:22:29.444812, keyExpiryTime=2027-03-08T07:22:29.444812, status=null, certThumbprint=D7244BE637F13B3F4B3B7078B7E1AC8C71330150D49B95CED23FBA8E668549D9, uniqueIdentifier=BA68E212DEF90E312FB5F429DA68E6575CBAD83F)] - keyAlias”,“logger_name”:“io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.590Z”,“@version”:“1”,“message”:“sessionId - currentKeyAlias - [KeyAlias(alias=0041bf80-7a61-459d-805e-12a7a01881ef, applicationId=ID_REPO, referenceId=, keyGenerationTime=2024-03-08T07:22:29.444812, keyExpiryTime=2027-03-08T07:22:29.444812, status=null, certThumbprint=D7244BE637F13B3F4B3B7078B7E1AC8C71330150D49B95CED23FBA8E668549D9, uniqueIdentifier=BA68E212DEF90E312FB5F429DA68E6575CBAD83F)] - currentKeyAlias”,“logger_name”:“io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.590Z”,“@version”:“1”,“message”:“sessionId - currentKeyAlias - 1 - key details present in DBKeyAlias(alias=0041bf80-7a61-459d-805e-12a7a01881ef, applicationId=ID_REPO, referenceId=, keyGenerationTime=2024-03-08T07:22:29.444812, keyExpiryTime=2027-03-08T07:22:29.444812, status=null, certThumbprint=D7244BE637F13B3F4B3B7078B7E1AC8C71330150D49B95CED23FBA8E668549D9, uniqueIdentifier=BA68E212DEF90E312FB5F429DA68E6575CBAD83F)”,“logger_name”:“io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.590Z”,“@version”:“1”,“message”:“sessionId - applicationId - ID_REPO - Getting Key CSR for application ID: ID_REPO, RefId: “,“logger_name”:“io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{”@timestamp”:“2024-03-11T08:39:23.662Z”,“@version”:“1”,“message”:“Generated Master Key for Application ID & ReferenceId: ID_REPO”,“logger_name”:“io.mosip.kernel.keygenerator.generator.KeysGenerator”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.663Z”,“@version”:“1”,“message”:“sessionId - - - Fetching Key Policy for keyPolicyName(Cache): IDA”,“logger_name”:“io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.664Z”,“@version”:“1”,“message”:“sessionId - keyPolicy - Optional.empty - Key Policy not found for this application Id. Key/CSR generation not allowed.”,“logger_name”:“io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper”,“thread_name”:“main”,“level”:“ERROR”,“level_value”:40000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.669Z”,“@version”:“1”,“message”:“\n\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”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.675Z”,“@version”:“1”,“message”:“Application run failed”,“logger_name”:“org.springframework.boot.SpringApplication”,“thread_name”:“main”,“level”:“ERROR”,“level_value”:40000,“stack_trace”:“java.lang.IllegalStateException: Failed to execute CommandLineRunner\n\tat org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:800)\n\tat org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:781)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:335)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)\n\tat io.mosip.kernel.keygenerator.KeysGeneratorApplication.main(KeysGeneratorApplication.java:23)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:566)\n\tat org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:87)\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:50)\n\tat org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:593)\nCaused by: io.mosip.kernel.keymanagerservice.exception.InvalidApplicationIdException: KER-KMS-002 → ApplicationId not found in Key Policy. Key/CSR generation not allowed.\n\tat io.mosip.kernel.keymanagerservice.helper.KeymanagerDBHelper.getKeyPolicy(KeymanagerDBHelper.java:257)\n\tat io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl.generateMasterKey(KeymanagerServiceImpl.java:488)\n\tat io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl$$FastClassBySpringCGLIB$$37c188ac.invoke()\n\tat org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)\n\tat org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n\tat org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294)\n\tat org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)\n\tat org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\n\tat io.mosip.kernel.keymanagerservice.service.impl.KeymanagerServiceImpl$$EnhancerBySpringCGLIB$$2569ef23.generateMasterKey()\n\tat io.mosip.kernel.keygenerator.generator.KeysGenerator.generateMasterKey(KeysGenerator.java:195)\n\tat io.mosip.kernel.keygenerator.generator.KeysGenerator.lambda$generateKeys$0(KeysGenerator.java:120)\n\tat java.base/java.util.ArrayList.forEach(ArrayList.java:1541)\n\tat io.mosip.kernel.keygenerator.generator.KeysGenerator.generateKeys(KeysGenerator.java:100)\n\tat io.mosip.kernel.keygenerator.KeysGeneratorApplication.run(KeysGeneratorApplication.java:31)\n\tat org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:797)\n\t… 13 common frames omitted\n”,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.676Z”,“@version”:“1”,“message”:“Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@6f10d5b6: startup date [Mon Mar 11 08:39:14 UTC 2024]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@7ec7ffd3”,“logger_name”:“org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.679Z”,“@version”:“1”,“message”:“Unregistering JMX-exposed beans on shutdown”,“logger_name”:“org.springframework.jmx.export.annotation.AnnotationMBeanExporter”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.679Z”,“@version”:“1”,“message”:“Unregistering JMX-exposed beans”,“logger_name”:“org.springframework.jmx.export.annotation.AnnotationMBeanExporter”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.683Z”,“@version”:“1”,“message”:“Closing JPA EntityManagerFactory for persistence unit ‘hibernate’”,“logger_name”:“org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.684Z”,“@version”:“1”,“message”:“HikariPool-1 - Shutdown initiated…”,“logger_name”:“com.zaxxer.hikari.HikariDataSource”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}
{“@timestamp”:“2024-03-11T08:39:23.686Z”,“@version”:“1”,“message”:“HikariPool-1 - Shutdown completed.”,“logger_name”:“com.zaxxer.hikari.HikariDataSource”,“thread_name”:“main”,“level”:“INFO”,“level_value”:20000,“appName”:“keys-generator”}

@mahammedtaheer Can you please look into the logs once and see what could be the possible resolution?

Best regards,
Team MOSIP

Hi @subhashchandrab

Can you check ‘mosip.kernel.keymanager.autogen.appids.list’ property in kernel-xx.properties file. The list contains IDA application id which is not needed in keymanager service. Remove the IDA value from the comma separated list and run the key generator job again.

Thanks

1 Like