My project uses JMS with ActiveMQ and it works fine, both in production and when I run my tests local computer. My problem occurs when Jenkins runs my tests (the same ones that are successful in my computer), I get the following entry in the console output:
2016-11-17 12:17:19,277 INFO o.a.activemq.store.SharedFileLocker Database activemq-data/localhost/KahaDB/lock is locked... waiting 10 seconds for the database to be unlocked. Reason: java.io.IOException: File 'activemq-data/localhost/KahaDB/lock' could not be locked.
Has anyone had the same experience and encountered a solution for the problem? Will be much grateful for your help!
More details of the console output:
2016-11-17 12:17:09,193 WARN o.a.a.broker.jmx.ManagementContext Failed to start jmx connector: Cannot bind to URL [rmi://localhost:1099/jmxrmi]: javax.naming.NameAlreadyBoundException: jmxrmi [Root exception is java.rmi.AlreadyBoundException: jmxrmi]. Will restart management to re-create jmx connector, trying to remedy this issue.
2016-11-17 12:17:09,257 INFO o.a.a.store.kahadb.plist.PListStore PListStore:[/var/lib/jenkins/jobs/mydir/workspace/myproject/activemq-data/localhost/tmp_storage] started
2016-11-17 12:17:09,271 INFO o.a.activemq.broker.BrokerService Using Persistence Adapter: KahaDBPersistenceAdapter[/var/lib/jenkins/jobs/mydir/workspace/myproject/activemq-data/localhost/KahaDB]
2016-11-17 12:17:09,277 INFO o.a.activemq.store.SharedFileLocker Database activemq-data/localhost/KahaDB/lock is locked... waiting 10 seconds for the database to be unlocked. Reason: java.io.IOException: File 'activemq-data/localhost/KahaDB/lock' could not be locked.