Solution - ArcFM - ArcFM License Server loses licenses; running License Updater produces an "Invalid Namespace" error

Version 4

    Behavior

     

    The ArcFM Solution License Manager is not functioning properly. ArcFM licenses are unable to be checked-out, and the Desktop Administrator reads:

     

    The specified server name(s) are either not reachable or are invalid.


    Attempting to run the ArcFM Solution "License Updater" produces an error that simply states:


    Invalid Namespace


    The license service may be running on the server, but the LicenseService.log contains repeating entries reading:

     

    System.Management.ManagementException: Invalid namespace

       at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)

       at System.Management.ManagementScope.InitializeGuts(Object o)

       at System.Management.ManagementScope.Initialize()

       at System.Management.ManagementObjectSearcher.Initialize()

       at System.Management.ManagementObjectSearcher.Get()

       at Miner.LicenseManagement.LicenseLoader.ValidateMACAddress(String macAddress)

       at Miner.LicenseManagement.LicenseLoader.ValidateDevice()

       at Miner.LicenseManagement.LicenseServer.LoadLicense(String LicenseFile)

    2013-02-26 17:08:55,201 [3] FATAL Miner.LicenseManagement.LicenseServer [(null)] - Failed to initialize server

    System.ApplicationException: LicenseServer failed to initialize.


    Alternately, the error may read "Critical Error," "Not Found," or some other error in place of "Invalid Namespace."


    Cause

     

    These errors originate from the Micorsoft .NET framework, and are evidence of corruption with the .NET runtime installation, or, more likely, the underlying WMI repository. 

     

    Solution

     

    Several approaches may be tried to resolve the error. Doing a system restore to a restore point known to be good is one recommended approach. Attempting a repair of the .NET framework installed from the Windows Control Panel > Programs is also recommended.

     

    Re-registering components of the WMI layer may resolve the error. An article from Microsoft's Technet website (WMI: Rebuilding the WMI Repository) has solutions that have resolved the issue in the past, and describes the following steps:


        a. Re-register all of the dlls and recompile the .mofs in the wbem folder and re-registering WMI Service and Provider. You can use the following script by saving to txt file then renaming to .bat and running from command prompt with admin right and changing focus to following directory: C:\Windows\System32\Wbem.

    @echo off
    sc config winmgmt start= disabled
    net stop winmgmt /y
    %systemdrive%
    cd %windir%\system32\wbem
    for /f %%s in ('dir /b *.dll') do regsvr32 /s %
    wmiprvse /regserver
    winmgmt /regserver
    sc config winmgmt start= auto
    net start winmgmt
    for /f %s in ('dir /s /b *.mof *.mfl') do mofcomp %s

        b. Reboot the machine and test WMI

    Next, check the repository for consistencies:

    For Windows Vista, Windows 7, Windows Server 2008, and Windows Server 2008 R2, you can run winmgmt /verifyrepository from a command prompt.

    Windows XP and Windows Server 2003 run: WmiDiag tool with the checkconsistency option. For example: WmiDiag checkconsistency

     

    The Technet article includes further troubleshooting recommendations for the WMI layer if  the repository still tests as inconsistent; see the article and Microsoft's Windows documentation for further troubleshooting recommendations.