Unable to start OpenMRS: Scheduler service not found

i recently installed on Local host for testing purpose, but i’m having little trouble, actually i try to upload module, Cashier module, it gave me an error saying that it needs some other module to support, so i downloaded other module and upload them, while i’m uploading other module suddenly i got disconnect from server, after i restart TOMcat server then i got this error, could you please help me how can i get rid of it thanks.

You need to provide some more details like what the other module was, and more so, a link to the full tomcat log.

1 Like

the problem is i upload first this module openhmis.cashier-2.4.0.omod after i uploaded then it says these module requires in order to function Cashier module, So i downloaded dependency module, and tried to upload, i uploaded 1,2,3 module, after uploading 1,2,3 module i also try to upload 4 module then my web browser goes blank, i waited about 10 minute to see result, there is nothing happen other than blank web browser, after 10 minute i reload the page then i got error saying above pictures.

  1. openhmis.inventory-2.0.0.omod
  2. openhmis.backboneforms-2.3.4.omod,
  3. openhmis.commons-3.0.3.omod,
  4. jasperreport-1.5.5.omod

I am able to load and run the Jasper module (as well as all the other modules that you are trying to run) with OpenMRS 1.9.x and 1.11.x with my local setup. Are you able to load any modules at all or is it just the Jasper module that is giving you problems?

@andrewbhandari - Are you running Java 8 on this server? I have just now run into this same issue on a Windows Server that is running Java 8. I am currently testing using Java 7 (which is what we test our modules with) and will let you know if that resolves the issue.

FWIW, this error message is usually not the cause. It is rather a symptom of something else. So you need to look at the entire log to get the root cause.

1 Like

@dkayiwa I know that this kind of error is usually the result of some other exception but unfortunately in this case there are no other exceptions that are logged.

When we switched to running Tomcat with Java 7 the issue went away. So, at least for the short-term that can be considered as a workaround. Our team will be working on figuring out what the real cause is and hopefully get a fix out soon-ish: http://issues.openhmisafrica.org/issue/core-31

really i do not have clue i keep getting error. some module are loads without error, some modules makes whole system down, needs to manually delete module from module directory after deleting error module, then things get back to normal. i think the module has BUG or may be Tomcat is freaking.

Have you tried running Tomcat with Java 7? That fixed the issue right away for us.

1 Like

This is occurring for me using Amazon Linux on an EC2 instance. I am running OpenMRS 1.11.4 as a WAR that was downloaded as is from OpenMRS.

ERROR - Listener.contextInitialized(188) |2015-12-31 20:51:57,883| Got exception while starting up: 

org.openmrs.module.ModuleException: Unable to start OpenMRS. Error thrown was: org.openmrs.api.APIException: Service not found: interface org.openmrs.scheduler.SchedulerService
 at org.openmrs.web.WebDaemon.startOpenmrs(WebDaemon.java:64)
 at org.openmrs.web.Listener.contextInitialized(Listener.java:180)
 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4210)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4709)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:802)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583)
 at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:676)
 at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:602)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:503)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1322)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:325)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1068)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1060)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
 at org.apache.catalina.core.StandardService.start(StandardService.java:525)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:759)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
 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:497)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: javax.servlet.ServletException: org.openmrs.api.APIException: Service not found: interface org.openmrs.scheduler.SchedulerService
 at org.openmrs.web.Listener.startOpenmrs(Listener.java:260)
 at org.openmrs.web.WebDaemon$1.run(WebDaemon.java:42)
Caused by: org.openmrs.api.APIException: Service not found: interface org.openmrs.scheduler.SchedulerService
 at org.openmrs.api.context.ServiceContext.getService(ServiceContext.java:755)
 at org.openmrs.api.context.ServiceContext.getSchedulerService(ServiceContext.java:310)
 at org.openmrs.api.context.Context.getSchedulerService(Context.java:529)
 at org.openmrs.module.web.WebModuleUtil.stopTasks(WebModuleUtil.java:382)
 at org.openmrs.module.web.WebModuleUtil.stopModule(WebModuleUtil.java:861)
 at org.openmrs.module.web.WebModuleUtil.shutdownModules(WebModuleUtil.java:804)
 at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:649)
 at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:609)
 at org.openmrs.web.Listener.startOpenmrs(Listener.java:252)
 ... 1 more

The error occurs as soon as I add openhmis.commons-3.1.0.omod to the modules directory. If I remove that module, everything starts up fine. I have separately tested putting in both Cashier and Inventory (as well as all their dependencies) as well, and I get the same error. It seems as soon as the Commons module is introduced, the server fails to start up with the exception above.

FWIW, I am running Tomcat 6 with Java 8.

java -version
openjdk version "1.8.0_65"
OpenJDK Runtime Environment (build 1.8.0_65-b17)
OpenJDK 64-Bit Server VM (build 25.65-b01, mixed mode)

Let me know if there is anything else I can provide. I will try downgrading to Java 7 to see if that fixes things. (See reply below, this worked).

Downgrading to JDK 7 fixed things. Not sure what would cause the incompatibility in Java 8 with no other changes. However, at least things are working. Thanks!