RefApp 2.11 QA issue: Reference Demo Data Module v 1.4.6 not started

I have a question, maybe @herbert24 or @sharif or @tendomart you’ll know the answer?

In the QA environment in the “System Information” page in “System Administration”, I am seeing a red “X” beside the “Reference Demo Data Module” under “Module Information” - It says “v 1.4.6 Not Started”

What causes this?

cc @dev4 @dev5

@grace Iam not pretty sure but at the first look of things , it is clear other modules are started but the demo-data module has failed to start . Those tests may need demo data to run.

Do you have the contents of the log file as well.

A quick fix would be to stop and restart the server , but the logs usually have a wealth of info to help debug this.

Is this on qa-server ?

Thanks so much @tendomart. This is from qa-refapp (https://qa-refapp.openmrs.org/) so I am assuming it’s on qa-server.

Sorry where would I find the log file contents?

Can you trigger a re-deploy via CI bamboo , at https://ci.openmrs.org/browse/REFAPP-OMODDISTRO

I cannot personally login , i don’t know what happened to my credentials.

You can find the logs at CI Bamboo.

@tendomart I seem to be able to see all the logs from the last successful parent build here without logging in. Does this show you anything that would explain why the Reference Demo Data Module isn’t building?

Let me look at them , i wanted to login so i can trigger an overall deploy or a module redeploy at https://ci.openmrs.org/browse/OENV-RM

1 Like

Thanks @tendomart; I haven’t actually triggered any builds in Bamboo before so I’m kind of afraid of messing things up :sweat_smile: Happy to learn another time

@grace I have looked at the logs and everything looks fine , can you try re-deploy .If you can log in , find a green play button at the top right corner under the qa-refapp section and click it.

Next time you can even simply re-start it under Settings > Manage modules section(though this is restricted on qa)

Did you want to run any demo data ? There is another way to do it but it takes a longer time for the server to run the queries against the database and requires a re-deploy too.

1 Like

@tendomart do you mean I should click this?

What do you see under "Deploy " Menu ?

Thanks @grace @tendomart @herbert24 , i released reference demo data fews day ago and all was fine, unfortunately it seem to have broken and i think that’s why recently referenceapplication demo server misbehaved recently so am looking into this thanks

2 Likes

True reference demo data isnot running and it have caused demo server not to be updated am not sure if this is because we haven’t released reference application module at the moment however refApp module is gona be released today and we if thats the cause cc @dkayiwa @ibacher

Is any one able to reproduce this locally?

1 Like

I can reproduce it by running the same docker-compose file with the same dbdump locally. The log file can be seen here, but the issue looks to be this:

WARN - ModuleUtil.refreshApplicationContext(936) |2020-11-20 16:15:40,291| Unable to invoke started() method on the module's activator
org.openmrs.api.APIException: Unable to install bundle AppointmentMetadata
	at org.openmrs.module.metadatadeploy.api.impl.MetadataDeployServiceImpl.installBundle(MetadataDeployServiceImpl.java:117)
	at org.openmrs.module.metadatadeploy.api.impl.MetadataDeployServiceImpl.installBundles(MetadataDeployServiceImpl.java:69)
	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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
	at com.sun.proxy.$Proxy140.installBundles(Unknown Source)
	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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
	at com.sun.proxy.$Proxy293.installBundles(Unknown Source)
	at org.openmrs.module.referencedemodata.ReferenceDemoDataActivator.createAppointmentTypes(ReferenceDemoDataActivator.java:119)
	at org.openmrs.module.referencedemodata.ReferenceDemoDataActivator.started(ReferenceDemoDataActivator.java:111)
	at org.openmrs.module.ModuleUtil.refreshApplicationContext(ModuleUtil.java:928)
	at org.openmrs.module.web.WebModuleUtil.refreshWAC(WebModuleUtil.java:847)
	at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:632)
	at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:612)
	at org.openmrs.web.Listener.startOpenmrs(Listener.java:251)
	at org.openmrs.web.WebDaemon$1.run(WebDaemon.java:42)
Caused by: org.openmrs.api.ValidationException: 'AppointmentType[hashCode=f282c552,uuid=4d85dda4-c437-11e4-a470-82b0ea87e2d8]' failed to validate with reason: name: Name is duplicated
	at org.openmrs.validator.ValidateUtil.validate(ValidateUtil.java:82)
	at org.openmrs.aop.RequiredDataAdvice.before(RequiredDataAdvice.java:127)
	at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:51)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
	at com.sun.proxy.$Proxy260.saveAppointmentType(Unknown Source)
	at org.openmrs.module.referencedemodata.handler.AppointmentTypeDeployHandler.save(AppointmentTypeDeployHandler.java:44)
	at org.openmrs.module.referencedemodata.handler.AppointmentTypeDeployHandler.save(AppointmentTypeDeployHandler.java:24)
	at org.openmrs.module.metadatadeploy.api.impl.MetadataDeployServiceImpl.installObject(MetadataDeployServiceImpl.java:189)
	at sun.reflect.GeneratedMethodAccessor646.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
	at com.sun.proxy.$Proxy140.installObject(Unknown Source)
	at sun.reflect.GeneratedMethodAccessor646.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
	at com.sun.proxy.$Proxy293.installObject(Unknown Source)
	at org.openmrs.module.metadatadeploy.bundle.AbstractMetadataBundle.install(AbstractMetadataBundle.java:104)
	at org.openmrs.module.referencedemodata.bundle.AppointmentMetadata.installAppointmentTypes(AppointmentMetadata.java:46)
	at org.openmrs.module.referencedemodata.bundle.AppointmentMetadata.install(AppointmentMetadata.java:21)
	at org.openmrs.module.metadatadeploy.api.impl.MetadataDeployServiceImpl.installBundle(MetadataDeployServiceImpl.java:111)
	... 35 more
1 Like

Some notes:

  • The dbdump file that we use to pre-populate the database for the qa-refapp image has all the appointment types we try to install pre-populated. This isn’t new, though. They’ve been there since we’ve had a qa-refapp image.
  • I don’t understand why it’s only failing on that one appointment type (“Urology (New Patient)”) when all the other appointment types are also prepopulated in the database by the same SQL script.
2 Likes

Thanks @ibacher for your pointers , so this https://github.com/openmrs/openmrs-module-referencedemodata/blob/master/api/src/main/java/org/openmrs/module/referencedemodata/bundle/AppointmentMetadata.java seems to be the cause.

so i think since this is a duplicate name(“urology”) not sure why they created same name however we may get rid of it by creating another corresponding uuid then on this line https://github.com/openmrs/openmrs-module-referencedemodata/blob/master/api/src/main/java/org/openmrs/module/referencedemodata/bundle/AppointmentMetadata.java#L46. any suggestion cc @ibacher @dkayiwa ,want to finish this then i continue with release

We definitely don’t want to remove that line from the Java file. If anything, we should modify the database dump used to not prepopulate the table. But it would be better if someone can dig into why this is happening for only that record and not for all the other records.

1 Like

Sure actually you are definitely right

Sure thanks