Thursday, April 01, 2010

FIMService: "The dependency service does not exist or has been marked for deletion"

David Lundell and I have both encountered this now across two customers and I've never gotten around to blogging it or reporting it as a bug. In situations I'm not entirely clear on yet, an installation of the FIM Service results in an improper registration of a service dependency for SQL Server. You will not run into this problem until you've rebooted the servers running FIMService as that is when it seems to manifest. To see if you are potentially affected, run this SC command against each of your FIMService instances:

sc.exe \\server qc FIMService

A proper configuration for a server *not* running SQL Server would be:

[SC] QueryServiceConfig SUCCESS

SERVICE_NAME: FIMService
        TYPE               : 10  WIN32_OWN_PROCESS
        START_TYPE         : 2   AUTO_START  (DELAYED)
        ERROR_CONTROL      : 1   NORMAL
        BINARY_PATH_NAME   : "C:\Program Files\Microsoft Forefront Identity Manager\2010\Service\Microsoft.ResourceManagement.Service.exe"
        LOAD_ORDER_GROUP   :
        TAG                : 0
        DISPLAY_NAME       : Forefront Identity Manager Service
        DEPENDENCIES       :
        SERVICE_START_NAME : TEST\svc_fimws

If you have SQL loaded or are running your FIMService on the same box as your SQL Server, then you should see an entry under the DEPENDENCIES area for MSSQL. If you see a dependency listed for MSSQL or MSSQL$<instance name> and it's on one of your web frontend boxes without SQL or the Windows Internal Database then you will see the "marked for deletion" error after you reboot and you will not be able to start the service. Attempting to start it from SC will return:

[SC] StartService FAILED 1075:

The dependency service does not exist or has been marked for deletion.

 

Repro

I seem to have this situation on my web frontend servers, but only on the subsequent nodes in the WSS Farm, not the initial node that I've installed the portal components in. So, fresh install of RTM bits into a WSS Farm. Node 1 should get the all of the components while the second node should just get the service – this is the node I'm seeing the issue on at the moment but I seem to recall seeing this on both nodes in the past.

Resolution

You have two ways to resolve this:

1) You can manually hack the dependency out of the registry and reboot (not recommended), or

2) Use SC to fix it safely and avoid the reboot

sc.exe \\server config FIMService depend= /

NOTE: There is a space after the equal sign.

Here are my steps and results running from a PowerShell prompt:

PS G:\FIMTasks> sc.exe \\tstapp02 config FIMService depend= /
[SC] ChangeServiceConfig SUCCESS
PS G:\FIMTasks> sc.exe \\tstapp02 qc FIMService
[SC] QueryServiceConfig SUCCESS

SERVICE_NAME: FIMService
TYPE : 10 WIN32_OWN_PROCESS
START_TYPE : 2 AUTO_START (DELAYED)
ERROR_CONTROL : 1 NORMAL
BINARY_PATH_NAME : "C:\Program Files\Microsoft Forefront Identity Manager\2010\Service\Microsoft.ResourceManagement.Service.exe"
LOAD_ORDER_GROUP :
TAG : 0
DISPLAY_NAME : Forefront Identity Manager Service
DEPENDENCIES :
SERVICE_START_NAME : TEST\svc_fimws
PS G:\FIMTasks> sc.exe \\tstapp02 start FIMService

SERVICE_NAME: FIMService
TYPE : 10 WIN32_OWN_PROCESS
STATE : 2 START_PENDING
(STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
PID : 3016
FLAGS :



Using this approach removes the need for a reboot.

2 comments:

Thomas said...

Thanks for this explanation, I stumbled on exact the same problem (RTM bits)

Ant said...

Thanks for this post, I also came across the same problem.

Possibly a coincidence but before I encountered the problem I had installed the SQL Native Client (a previous sync service hotfix required this if SQL was on a remote server).

Post a Comment