Unable to Register Agents after upgrading to Patch for Windows Servers 9.3.4440

Version 7



    This document provides a resolution for issues with Agent installs after recently updating to Patch for Windows Servers 9.3.4440.




    After upgrading, you are able to start a manual agent install and select the policies but when clicking register the registration fails.




    The console certificate failed to renew on upgrade.

    This is verified by Looking at the Logs on the agent and the console machine. C:\ProgramData\LANDESK\Shavlik Protect\Logs


    From Agent: STAgentManagement.log:

    RegistrationServiceClient.cpp:419 Unable to register agent with host 'https://ConsoleMachineName.local:3121/ST/Console/AgentRegistration/Registration'. Error: 'class STServiceModel::Wws::CWebServiceException at RegistrationServiceClient.cpp:409: Unable to register the agent with the provided registration key.
    Error detail: The body of the received message contained a fault. The fault reason was: 'Database error'.


    From Console: ST.Service.Host.managed.log:

    AgentRegistrationService.cs:199|ST.Agent.Common.ServiceStoreException: Database error ---> ST.Data.DbAccessLayer.StatementConflictException: Statement conflicted with constraint. SQL exception message: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_AgentAttachment_Attachment". The conflict occurred in database "ShavlikProtect", table "dbo.Attachment", column 'uid'.
    The statement has been terminated.





    Option 1

    Wait 30 days for the certificate to automatically update.

    The following SQL query is used to get the Date of upgrade

    Select * FROM PropertyCollection WHERE collectionId ='9d2a58a7-a5e6-4d80-9997-a442099cce80'


    Option 2

    1. Close the console
    2. Stop the Ivanti Patch for Windows Servers Console Service
    3. Change directions to C:\Program Files\LANDESK\Shavlik Protect
    4. Open the STEnvironment.config
    5. Copy the data in "" from the consoleId="********-****-****-****-************" Section
    6. Close the Configuration file
    7. Open an elevated command prompt
    8. Run the following command stmgmt.exe -console_installation -id  "consoleID" Replaceing consoleID with the data from step 5 above
    9. When this is complete start the console service
    10. Install the agent on the target machine.


    Additional Items


    You can following this document to test the certificate, specifically STMgmt.exe -test_console Test And Renew Patch For Windows Console Certificates

    If the Certificate Serial Number test does not pass, we will need to get the certificate serial number and replace what is in the STEnvironment.config with the correct Serial number.

    1. Open the MMC and load the local certificates snap-in.
    2. Under personal then certificates find the one Issued by ST Root Authority and double click on it.
    3. Click on the details tab and copy the serial number and paste it to a notepad.
    4. Now in the notepad remove the spaces from the serial number and copy the number again.
    5. Open Notepad as administrator then open STEnvironment.config from the C:\Program Files\LANDESK\Shavlik Protect folder.
    6. Replace the consoleCertificateSerialNumber="***************************************" with the one you just copied from your notepad.
    7. Save exit and try the console again.


    If all the above fails, you could try this:

    Doing this will require you to reinstall all of your agents.
    1. Uninstall Patch for Windows Servers.
    2. Using MMC as noted above, delete the ST Root Authority certificates (Issued by) from these locations.
      • Personal\Certificates
      • Trusted Root Certificates Authorities\Certificates
    3. Re-install Patch for Windows Servers.
    4. Attempt to install an agent.


    Affected Product(s)


    Ivanti Patch for Windows Servers 9.3.4440