Expand my Community achievements bar.

server automatically get crashed, could you please assist anyone?

Avatar

Level 2

Hi

17.01.2018 05:03:16.702 *ERROR* [FelixDispatchQueue] org.apache.sling.event FrameworkEvent ERROR (org.osgi.framework.ServiceException: Service factory exception: Could not obtain lock)

org.osgi.framework.ServiceException: Service factory exception: Could not obtain lock

        at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:352)

        at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:247)

        at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:344)

        at org.apache.felix.framework.Felix.getService(Felix.java:3699)

        at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:470)

        at org.apache.sling.event.impl.jobs.JobConsumerManager$ConsumerInfo.getExecutor(JobConsumerManager.java:450)

        at org.apache.sling.event.impl.jobs.JobConsumerManager.getExecutor(JobConsumerManager.java:203)

        at org.apache.sling.event.impl.jobs.queues.QueueJobCache.getNextJob(QueueJobCache.java:169)

        at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJobs(JobQueueImpl.java:201)

        at org.apache.sling.event.impl.jobs.queues.QueueManager.start(QueueManager.java:252)

        at org.apache.sling.event.impl.jobs.queues.QueueManager.fullTopicScan(QueueManager.java:373)

        at org.apache.sling.event.impl.jobs.queues.QueueManager.configurationChanged(QueueManager.java:360)

        at org.apache.sling.event.impl.jobs.config.JobManagerConfiguration.notifiyListeners(JobManagerConfiguration.java:547)

        at org.apache.sling.event.impl.jobs.config.JobManagerConfiguration.access$200(JobManagerConfiguration.java:84)

        at org.apache.sling.event.impl.jobs.config.JobManagerConfiguration$1.run(JobManagerConfiguration.java:534)

        at org.apache.sling.commons.scheduler.impl.QuartzJobExecutor.execute(QuartzJobExecutor.java:118)

        at org.quartz.core.JobRunShell.run(JobRunShell.java:202)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

        at java.lang.Thread.run(Thread.java:745)

Caused by: java.lang.IllegalStateException: Could not obtain lock

        at org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainLock(AbstractComponentManager.java:198)

        at org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainStateLock(AbstractComponentManager.java:246)

        at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:763)

        at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:347)

        ... 19 common frames omitted

17.01.2018 05:03:17.255 *INFO* [sling-default-1-org.apache.sling.event.impl.jobs.config.JobManagerConfiguration$1:989c697d-6fa8-4059-9ed4-5f953a3e9609] org.apache.sling.event.impl.jobs.queues.JobQueueImpl.com_day_cq_replication_job_EHS_Q

A_Publish_Q10_Forward_Replication Starting job queue com_day_cq_replication_job_EHS_QA_Publish_Q10_Forward_Replication

17.01.2018 05:03:17.258 *INFO* [sling-default-1-org.apache.sling.event.impl.jobs.config.JobManagerConfiguration$1:989c697d-6fa8-4059-9ed4-5f953a3e9609] org.apache.sling.event Service [QueueMBean for queue com_day_cq_replication_job_EHS_Q

A_Publish_Q10_Forward_Replication,2013, [org.apache.sling.event.jobs.jmx.StatisticsMBean]] ServiceEvent REGISTERED

17.01.2018 05:03:22.397 *ERROR* [FelixDispatchQueue] org.apache.sling.event FrameworkEvent ERROR (org.osgi.framework.ServiceException: Service factory exception: Could not obtain lock)

org.osgi.framework.ServiceException: Service factory exception: Could not obtain lock

        at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:352)

        at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:247)

        at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:344)

        at org.apache.felix.framework.Felix.getService(Felix.java:3699)

        at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:470)

        at org.apache.sling.event.impl.jobs.JobConsumerManager$ConsumerInfo.getExecutor(JobConsumerManager.java:450)

        at org.apache.sling.event.impl.jobs.JobConsumerManager.getExecutor(JobConsumerManager.java:203)

        at org.apache.sling.event.impl.jobs.queues.QueueJobCache.getNextJob(QueueJobCache.java:169)

        at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJobs(JobQueueImpl.java:201)

        at org.apache.sling.event.impl.jobs.queues.QueueManager.start(QueueManager.java:252)

        at org.apache.sling.event.impl.jobs.queues.QueueManager.fullTopicScan(QueueManager.java:373)

        at org.apache.sling.event.impl.jobs.queues.QueueManager.configurationChanged(QueueManager.java:360)

        at org.apache.sling.event.impl.jobs.config.JobManagerConfiguration.notifiyListeners(JobManagerConfiguration.java:547)

        at org.apache.sling.event.impl.jobs.config.JobManagerConfiguration.access$200(JobManagerConfiguration.java:84)

        at org.apache.sling.event.impl.jobs.config.JobManagerConfiguration$1.run(JobManagerConfiguration.java:534)

3 Replies

Avatar

Level 2

I have seen this behavior when a server is retstarted by a different user account and does not permissions for the .lock file created by the previous user account.

Check the owner on the .lock file.

Avatar

Level 2

I have restarted with Admin rights only. Where can i check the .lock file?

Avatar

Level 3

.Lock is one of the hidden file. It will be under crx-quickstart/repository.

Use the find command to check the .lock file.

find path/crx-quickstart/repository -name "\.lock" -exec