Event ID 7016 — Basic Service Operations
Applies To: Windows Server 2008
Service Control Manager transmits control requests to running services and driver services. It also maintains status information about those services, and reports configuration changes and state changes.
Event Details
Product: | Windows Operating System |
ID: | 7016 |
Source: | Service Control Manager |
Version: | 6.0 |
Symbolic Name: | EVENT_BAD_SERVICE_STATE |
Message: | The %1 service has reported an invalid current state %2. |
Resolve
Review the service status and error information
If a service is not coded correctly to appropriately handle control calls from the Service Control Manager (SCM), the SCM may log this event -- with a invalid current state value of zero (0) -- when you use the net start command to start the service. To resolve this issue, first review the current status of the service, review the Event logs for other related events that have been logged by the Service Control Manager (SCM) Eventlog Provider, and then trigger an update of the status of the service in SCM.
To perform these procedures, you must have membership in Administrators, or you must have been delegated the appropriate authority.
Review the state in which the service is operating
To review the state in which the service is operating:
Click the Start button, Run, then type cmd to open a command prompt.
Type sc queryex service_name at the command prompt to display the extended status of the service. This command will provide the following information about a service: SERVICE_NAME (the service's registry subkey name), TYPE (the type of service, for example, shared process, interactive), STATE (for example, running, paused, and the states that are not available), WIN32_EXIT_CODE (the Windows exit error code), SERVICE_EXIT_CODE (the service exit code), CHECKPOINT, WAIT_HINT (the time period the SCM waits before reporting a service failure), PID (ID of the process running the service), and FLAGS.
Note: If the service was started successfully, the WIN32_EXIT_CODE field should contain a zero (0). If the service failed to start when an attempt was made, this field should contain an exit code provided by the service when it could not start.
For more information about the sc command, see SC Command Reference Help (https://go.microsoft.com/fwlink/?LinkID=84961).
Review the related events logged by the SCM
To review the related events logged by the SCM:
Open Event Viewer by clicking the Start button, Control Panel, and Administration Tools, then double-clicking Event Viewer.
Note: For Windows Vista, use the Classic View display option in Control Panel to see the Administration Tools.
Click Event Viewer (Local), then Windows Logs and System.
In the details pane, click on the Source column to view the events sorted by the entity that logged that event. For events logged by the SCM, the source is the Service Control Manager Eventlog Provider.
If the results of procedures above show that the service did not fail and there are no related events logged by the SCM, then you can safely ignore this event and instead use the sc interrogate command to trigger an update of the status of the service in SCM.
Note: To fix the fundamental coding issue, either debug the service and fix the coding error or contact the application or driver vendor for an update or fix. For more information on debugging Windows services, see https://go.microsoft.com/fwlink/?LinkId=105088.
Update the status of the service in SCM
To trigger an update of the status of the service:
Click the Start button, Run, then type cmd to open a command prompt.
Type sc interrogate service_name (where service_name is the name of the service) at the command prompt to update the status of that service in Service Control Manager.
If the invalid current state value displayed is not zero(0), then the service status and related events for this service should help you to further troubleshoot and resolve the issue. Some examples are provided below:
- If event ID 7011 is also logged for this service, then extending the service timeout period to resolve event ID 7011 would also resolve this error.
- If event ID 7034 is also logged for this service, then restoring the service default settings to resolve event ID 7034 would also resolve this error.
Verify
To perform this procedure, you must have membership in Administrators, or you must have been delegated the appropriate authority.
To verify the state in which a service is operating:
Click the Start button, Run, then type cmd to open a command prompt.
Type sc interrogate service_name (where service_name is the name of the service) at the command prompt to update the status of that service in Service Control Manager.
Type sc qc service_name at the command prompt to display the configuration status of the service.
Type sc queryex service_name at the command prompt to display the extended status of the service. This command will provide the following information about a service: SERVICE_NAME (the service's registry subkey name), TYPE (the type of service, for example, shared process, interactive), STATE (for example, running, paused, and the states that are not available), WIN32_EXIT_CODE (the Windows exit error code), SERVICE_EXIT_CODE (the service exit code), CHECKPOINT, WAIT_HINT (the time period the SCM waits before reporting a service failure), PID (ID of the process running the service), and FLAGS. If the service was started successfully, the WIN32_EXIT_CODE field should contain a zero (0). If the service failed to start when an attempt was made, this field should contain an exit code provided by the service when it could not start.
Type net helpmsg exit_code (where exit_code is the 4 digit number of the error code) at the command prompt to display the meaning of the exit code.
For more information about the sc command, see SC Command Reference Help (https://go.microsoft.com/fwlink/?LinkID=84961). For more information about the net helpmsg command, see https://go.microsoft.com/fwlink/?LinkId=105087.