Problem Starting Modules on Platform 2.3.3 Upon Restart

Background We want to upgrade from OpenMRS 1.11.6 to a distribution based on reference application 2.11.0 (because we have custom modules). The process of upgrade is mostly smooth apart from minor issues which we can easily handle.

We have servers which are normally turned off in the evening and then restarted the next morning. In 1.11.6 we have configured OpenMRS to start automatically at the boot time. We have never had any issue on both docker based and native deployments. That is OpenMRS 1.11.6 has always started fine with all the required modules as expected.

Problem We want to have the same configuration for OpenMRS platform 2.3.3. However we are facing a problem that whenever the servers are rebooted none of the modules are started presenting us with the screen as shown in the screenshot below.

Examining the logs indicates the following pattern which keeps repeating consistently across all the instances we have tested.

WARN - NewPooledConnection.handleThrowable(546) |2021-06-04 19:38:00,023| [c3p0] A PooledConnection that has already signalled a Connection error is still in use!
WARN - NewPooledConnection.handleThrowable(547) |2021-06-04 19:38:00,024| [c3p0] Another error has occurred [ com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 20 milliseconds ago.  The last packet sent successfully to the server was 20 milliseconds ago. ] which will not be reported to listeners!
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 20 milliseconds ago.  The last packet sent successfully to the server was 20 milliseconds ago.
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
        at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:990)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2515)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2484)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858)
        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1966)
        at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:116)
        at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:82)
        at org.hibernate.loader.Loader.getResultSet(Loader.java:2066)
        at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1863)
        at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1839)
        at org.hibernate.loader.Loader.doQuery(Loader.java:910)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:355)
        at org.hibernate.loader.Loader.doList(Loader.java:2554)
        at org.hibernate.loader.Loader.doList(Loader.java:2540)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2370)
        at org.hibernate.loader.Loader.list(Loader.java:2365)
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:497)
        at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:387)
        at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:236)
        at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1300)
        at org.hibernate.internal.QueryImpl.list(QueryImpl.java:103)
        at org.hibernate.internal.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:966)
        at org.openmrs.hl7.db.hibernate.HibernateHL7DAO.getNextHL7InQueue(HibernateHL7DAO.java:205)
        at org.openmrs.hl7.impl.HL7ServiceImpl.getNextHL7InQueue(HL7ServiceImpl.java:311)
        at sun.reflect.GeneratedMethodAccessor851.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.$Proxy221.getNextHL7InQueue(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor851.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.cache.interceptor.CacheInterceptor$1.invoke(CacheInterceptor.java:52)
        at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:303)
        at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:122)
        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.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.$Proxy222.getNextHL7InQueue(Unknown Source)
        at org.openmrs.hl7.HL7InQueueProcessor.processNextHL7InQueue(HL7InQueueProcessor.java:92)
        at org.openmrs.hl7.HL7InQueueProcessor.processHL7InQueue(HL7InQueueProcessor.java:113)
        at org.openmrs.scheduler.tasks.ProcessHL7InQueueTask.execute(ProcessHL7InQueueTask.java:51)
        at org.openmrs.scheduler.tasks.TaskThreadedInitializationWrapper.execute(TaskThreadedInitializationWrapper.java:68)
        at org.openmrs.scheduler.timer.TimerSchedulerTask.execute(TimerSchedulerTask.java:94)
        at org.openmrs.api.context.Daemon$3.run(Daemon.java:205)
Caused by: java.lang.NullPointerException
        at com.mysql.jdbc.MysqlIO.clearInputStream(MysqlIO.java:901)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2474)
        ... 59 more
ERROR - SqlExceptionHelper.logExceptions(146) |2021-06-04 19:38:00,025| Communications link failure

The last packet successfully received from the server was 20 milliseconds ago.  The last packet sent successfully to the server was 20 milliseconds ago.
WARN - DefaultConnectionTester.statusOnException(148) |2021-06-04 19:38:00,031| SQL State '08007' of Exception tested by statusOnException() implies that the database is invalid, and the pool should refill it
self with fresh Connections.
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Communications link failure during rollback(). Transaction resolution unknown.
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
        at com.mysql.jdbc.Util.getInstance(Util.java:408)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:898)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:887)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:861)
        at com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:4576)
        at com.mchange.v2.c3p0.impl.NewProxyConnection.rollback(NewProxyConnection.java:860)
        at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doRollback(JdbcTransaction.java:163)
        at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.rollback(AbstractTransactionImpl.java:211)
        at org.springframework.orm.hibernate4.HibernateTransactionManager.doRollback(HibernateTransactionManager.java:604)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:849)
        at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:826)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.completeTransactionAfterThrowing(TransactionAspectSupport.java:533)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:285)
        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.$Proxy221.getNextHL7InQueue(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor851.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.cache.interceptor.CacheInterceptor$1.invoke(CacheInterceptor.java:52)
        at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:303)
        at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.openmrs.aop.LoggingAdvice.invoke(LoggingAdvice.java:122)
        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.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.$Proxy222.getNextHL7InQueue(Unknown Source)
        at org.openmrs.hl7.HL7InQueueProcessor.processNextHL7InQueue(HL7InQueueProcessor.java:92)
        at org.openmrs.hl7.HL7InQueueProcessor.processHL7InQueue(HL7InQueueProcessor.java:113)
        at org.openmrs.scheduler.tasks.ProcessHL7InQueueTask.execute(ProcessHL7InQueueTask.java:51)
        at org.openmrs.scheduler.tasks.TaskThreadedInitializationWrapper.execute(TaskThreadedInitializationWrapper.java:68)
        at org.openmrs.scheduler.timer.TimerSchedulerTask.execute(TimerSchedulerTask.java:94)
        at org.openmrs.api.context.Daemon$3.run(Daemon.java:205)

At first, we suspected it could be a docker related issue especially because after restarting the tomcat containers manually usually things work albeit several times at times. We thought it could be the order of container starting up at boot time (even though this did not explain why it was working fine with 1.11.6). We have come to learn the problem persist even when Tomcat & MySQL are deployed natively. While we are investigating the issue we would like leave it here in case someone can shed light.

Environment: Java8, Tomcat8, MySQL5.6, OpenMRS platform 2.3.3.

@willa thanks for reporting this and would like to pose a question here

Is this issue persisting with MySQL 5.7?

Platform 2.3.3 works smoothly with MySQL 5.7

Is it not supposed to work smoothly with MyQL 5.6?

@gcliff It’s supposed to run well on Mysql 5.6 since platform 2.3.3 is a maintenance release of 2.3. x line which supports the Mysql version basing on the release notes.

1 Like

@willa kind request please! do you mind sharing the entire error logs using pastebin? I may not be of help but we learn from such errors and we can reference from them just in case the error re-occurs.

Something else I see in the logs.

ERROR - MarkerIgnoringBase.error(159) |2021-06-08 12:28:27,194| Unable to refresh the spring application context.  Root Cause was:
java.net.UnknownHostException: www.springframework.org
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:607)
	at java.net.Socket.connect(Socket.java:556)
	at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
	at sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
	at sun.net.www.http.HttpClient.New(HttpClient.java:339)
	at sun.net.www.http.HttpClient.New(HttpClient.java:357)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1570)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
	at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
	at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
	at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
	at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:76)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadDocument(XmlBeanDefinitionReader.java:429)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:391)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:217)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)
	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
	at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:452)
	at org.openmrs.module.ModuleUtil.refreshApplicationContext(ModuleUtil.java:889)
	at org.openmrs.module.web.WebModuleUtil.refreshWAC(WebModuleUtil.java:853)
	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)
WARN - ModuleFactory.stopModule(1155) |2021-06-08 12:28:27,469| Unable to call module's Activator.shutdown() method
org.openmrs.api.APIException: Service not found: interface org.openmrs.module.reporting.dataset.definition.service.DataSetDefinitionService
	at org.openmrs.api.context.ServiceContext.getService(ServiceContext.java:686)
	at org.openmrs.api.context.Context.getService(Context.java:986)
	at org.openmrs.module.appointmentschedulingui.AppointmentSchedulingUIActivator.removeDataSetDefinitions(AppointmentSchedulingUIActivator.java:107)
	at org.openmrs.module.appointmentschedulingui.AppointmentSchedulingUIActivator.stopped(AppointmentSchedulingUIActivator.java:95)
	at org.openmrs.module.ModuleFactory.stopModule(ModuleFactory.java:1151)
	at org.openmrs.module.ModuleFactory.stopModule(ModuleFactory.java:1077)
	at org.openmrs.module.ModuleFactory.stopModule(ModuleFactory.java:1077)
	at org.openmrs.module.ModuleFactory.stopModule(ModuleFactory.java:1077)
	at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:653)
	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)
WARN - ModuleFactory.stopModule(1054) |2021-06-08 12:28:27,483| Unable to call module's Activator.willStop() method
java.lang.NullPointerException
	at org.openmrs.api.context.ServiceContext.getRegisteredComponents(ServiceContext.java:916)
	at org.openmrs.api.context.ServiceContext.getRegisteredComponents(ServiceContext.java:880)
	at org.openmrs.api.context.Context.getRegisteredComponents(Context.java:1248)
	at org.openmrs.module.reporting.ReportingModuleActivator.cancelAllScheduledTasks(ReportingModuleActivator.java:64)
	at org.openmrs.module.reporting.ReportingModuleActivator.willStop(ReportingModuleActivator.java:46)
	at org.openmrs.module.ModuleFactory.stopModule(ModuleFactory.java:1050)
	at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:653)
	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)
ERROR - EptsReportsActivator.willStop(55) |2021-06-08 12:28:27,486| An error occured trying to purge EPTS reports
java.lang.NullPointerException
	at org.openmrs.api.context.ServiceContext.getRegisteredComponents(ServiceContext.java:916)
	at org.openmrs.api.context.ServiceContext.getRegisteredComponents(ServiceContext.java:880)
	at org.openmrs.api.context.Context.getRegisteredComponents(Context.java:1248)
	at org.openmrs.module.eptsreports.reporting.EptsReportInitializer.purgeReports(EptsReportInitializer.java:54)
	at org.openmrs.module.eptsreports.EptsReportsActivator.willStop(EptsReportsActivator.java:52)
	at org.openmrs.module.ModuleFactory.stopModule(ModuleFactory.java:1050)
	at org.openmrs.module.ModuleFactory.stopModule(ModuleFactory.java:1077)
	at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:653)
	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)
WARN - ModuleFactory.stopModule(1155) |2021-06-08 12:28:27,499| Unable to call module's Activator.shutdown() method
java.lang.NullPointerException
	at org.openmrs.api.context.ServiceContext.getRegisteredComponents(ServiceContext.java:916)
	at org.openmrs.api.context.ServiceContext.getRegisteredComponents(ServiceContext.java:880)
	at org.openmrs.api.context.Context.getRegisteredComponents(Context.java:1248)
	at org.openmrs.util.HandlerUtil.getHandlersForType(HandlerUtil.java:118)
	at org.openmrs.module.event.EventActivator.stopped(EventActivator.java:90)
	at org.openmrs.module.ModuleFactory.stopModule(ModuleFactory.java:1151)
	at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:653)
	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)
INFO - ServiceContext.startRefreshingContext(832) |2021-06-08 12:28:27,506| Refreshing Context
INFO - EhCacheManagerFactoryBean.afterPropertiesSet(129) |2021-06-08 12:28:27,740| Initializing EhCache CacheManager
WARN - SimpleUrlHandlerMapping.registerHandlers(115) |2021-06-08 12:28:28,699| Neither 'urlMap' nor 'mappings' set on SimpleUrlHandlerMapping
INFO - ServiceContext.doneRefreshingContext(843) |2021-06-08 12:28:28,700| Done refreshing Context
WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2078) |2021-06-08 12:28:28,715| Unable to find a runtime properties file at /var/lib/tomcat8/openmrs-runtime.properties
WARN - OpenmrsUtil.getRuntimePropertiesFilePathName(2078) |2021-06-08 12:28:28,802| Unable to find a runtime properties file at /var/lib/tomcat8/openmrs-runtime.properties
08-Jun-2021 12:28:28.823 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/var/lib/tomcat8/webapps/openmrs.war] has finished in [290,410] ms
08-Jun-2021 12:28:28.824 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/var/lib/tomcat8/webapps/ROOT]
08-Jun-2021 12:28:29.160 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
08-Jun-2021 12:28:29.161 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/var/lib/tomcat8/webapps/ROOT] has finished in [337] ms
08-Jun-2021 12:28:29.164 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
08-Jun-2021 12:28:29.172 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 290798 ms

Look at your custom modules and remove this: Fixing java.net.UnknownHostException: www.springframework.org by dkayiwa · Pull Request #9 · OpenHMIS/openmrs-module-jasperreports · GitHub

Thanks, will take a look. Could this also be the reason for the issues I have reported above?

@dkayiwa this is just a feedback. I did find a module with the problem you linked. Thanks a ton buddy.