• FEATURES
  • PRICING
  • MARKETPLACE
  • CASE STUDIES
  • BLOG
  • Unable to start new OpenSpecimen installation in Tomcat

    Hello there!

    I’ve followed the instructions to build and deploy the current OpenSpecimen version from source (in a Ubuntu VM for the time being).

    In Tomcat I am unable to start openspecimen, however - ‘FAIL - Application at context path /openspecimen could not be started’.

    I’ve attached today’s localhost and catalina tomcat logs.

    The most obvious exception seems to be this, in the localhost log:

    04-Aug-2017 17:44:27.751 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘de-liquibase’ defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is liquibase.exception.LockException: Could not acquire change log lock. Currently locked by fe80:0:0:0:93b0:c1da:d005:c432%enp0s3 (fe80:0:0:0:93b0:c1da:d005:c432%enp0s3) since 31/07/17 19:31
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1514)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:636)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:934)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:939)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1812)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
    Caused by: liquibase.exception.LockException: Could not acquire change log lock. Currently locked by fe80:0:0:0:93b0:c1da:d005:c432%enp0s3 (fe80:0:0:0:93b0:c1da:d005:c432%enp0s3) since 31/07/17 19:31
    at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:174)
    at liquibase.Liquibase.update(Liquibase.java:186)
    at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:402)
    at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:366)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)
    … 25 more

    Has anyone run into this before, how do I sort out the LockException?
    Many thanks for your help, any ideas would be much appreciated!

    localhost.2017-08-04.log (11.6 KB)
    catalina.2017-08-04.log (13.0 KB)

    Hi JR553:

    who is the bad boy fe80:0:0:0:93b0:c1da:d005:c432%enp0s3?

    It’s blocking you!!

    “…Caused by: liquibase.exception.LockException: Could not acquire change
    log lock. Currently locked by fe80:0:0:0:93b0:c1da:d005:c432%enp0s3
    (fe80:0:0:0:93b0:c1da:d005:c432%enp0s3) since 31/07/17 19:31
    at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:174)…”

    It’s a new instalation?

    Did the tables where created in the database?

    Does this aplies to your envoronment?
    https://community.appian.com/support/w/kb/249/kb-1024-could-not-acquire-change-log-lock-currently-locked-by-user-error-thrown-during-application-server-startup

    And now a minor change…

    You must change a couple of directives in the file: $TOMCAT_HOME/conf/context.xml
    (if you dont hace TOMCAT_HOME, you can use $CATALINA_HOME instead)

    Replace: maxActive with maxToral
    Replace: maxWait with maxWaitMillis

    as you can see in your “catalina.2017-08-04.log”
    “…Property maxActive is not used in DBCP2, use maxTotal instead…”
    “…Property maxWait is not used in DBCP2 , use maxWaitMillis…”

    This will not resolve your problem…but you will have a few less error messages…

    good luck!

    The problems with the structure of the file system … are prior to the deployment of the openspecimen?

    Maybe you should solve it before deploy …

    04-Aug-2017 17:38:08.842 WARNING [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/common/classes], exists: [false], isDirectory: [false], canRead: [false]
    04-Aug-2017 17:38:09.155 WARNING [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/common], exists: [false], isDirectory: [false], canRead: [false]
    04-Aug-2017 17:38:09.186 WARNING [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/server/classes], exists: [false], isDirectory: [false], canRead: [false]
    04-Aug-2017 17:38:09.190 WARNING [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/shared/classes], exists: [false], isDirectory: [false], canRead: [false]
    04-Aug-2017 17:38:09.193 WARNING [main] org.apache.catalina.startup.ClassLoaderFactory.validateFile Problem with directory [/usr/share/tomcat8/shared], exists: [false], isDirectory: [false], canRead: [false]

    Hi @JR553

    Please refer to the below post for a similar issue and solution mentioned in it.

    ~Sri

    Hi James,

    From the error, it seems OpenSpecimen was abruptly killed or stopped while it was creating the database schema. Therefore the next time
    OpenSpecimen is run, it sees the tables are locked. In order to move ahead, please remove the lock manually by running below SQL. Restart OpenSpecimen after executing
    below command:

    delete from databasechangeloglock;

    Thanks,
    Abhijit