Could not start service 'TIM.Collection.Svc' on entity 25: the service did not stop. Unable to set or change the EM associated with a Service on the Services Tab. The Save button is greyed out.

Document ID : KB000048441
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

Problem #1:

Services including the Tim Collection Service, Stats Aggregation Service, or the DB Cleanup Service will not start. Looking at the appropriate EM log does not show the service running at all. For example, log entries for DailyAggregation will be missing if the Stats Aggregation Service is locked and cannot be started.

Problem #2:

You are unable to set or change the EM associated with a Service. This is normally done by selecting and saving a new EM from the Services Tab in the MOM's APM CE User Interface.

However, when accessing the Setup > Services menu and clicking on a Service link (i.e. Stats Aggregation Service), the Save button is greyed out. This should never be the case.

This article explains how to resolve the issue underlying both of these problems.

Solution:

In addition to the greyed out button, you will see the following error in the EM log:

[\ERROR] [\ServicesCheck.Thread1] [\Manager.com.timestock.tess.services.service.\CheckServices] Could not start service 'TIM.Collection.Svc' on entity 25: the service did not stop

The Save button is greyed out due to a locked entity service in the APMDB database. When a Service is locked, the service in question, in this case the TIM Collection Service, cannot be started.

The SQL query below will allow you to release the lock set in the ts_entity_service table in the database for the locked service.

Do notexecute the SQL query until the following steps have been taken:

  1. Stop the Collector EM that runs the service.

  2. Make a full database backup, or backup the individual table ts_entity_service.

To release the lock, run the following SQL query against the APMDB for the locked Service of interest:

The field ts_entity_service.ts_service_id has the following valid numerical values corresponding to each of the three Services:

  • 1 = TIM Collection Service

  • 2 = Stats Aggregation Service

  • 3 = DB Cleanup Service

In this example, the query releases a lock on the TIM Collection Service which has a ts_service_id of 1:

UPDATE ts_entity_service
SET ts_locked_by_entity=ts_entity_id
WHERE ts_locked_by_entity='0' AND ts_service_id='1';