Deployment Manager upgrade fails if running as custom user

Paul.ZahPaul.Zah Posts: 3
edited November 19, 2013 1:54PM in Deployment Manager
The Deployment Manager fails to upgrade if the associated Windows service is set to run as a custom user. The associated Windows service does not automatically restart and manual attempts to start the service result in Windows "Error 1069: The service did not start due to a logon failure."

In order to start the service again, the password in the Logon field of the Windows service must be re-entered. The service is launched and Red Gate Deployment Manager starts, with no modifications to the original installation.

The user the service runs under has Windows Admin privileges and network access. If the service is set to run under the Local System account, it upgrades successfully.

The bug seems to be caused by the upgrade process (kicked off from the RGDM web UI) somehow muddling the password stored in the associated Windows service. The reason for this assumption is that the service cannot be started again until the password field is updated.

When the update is requested, Windows Event Viewer logs a Warning from ASP .NET:

Exception information:
Exception type: ArgumentNullException
Exception message: Value cannot be null.
Parameter name: httpContext
at System.Web.HttpContextWrapper..ctor(HttpContext httpContext)
at Glimpse.AspNet.AspNetFrameworkProvider.get_HttpRequestStore()
at Glimpse.Core.Framework.Factory.<>c__DisplayClass2.<InstantiateTimerStrategy>b__1()
at Glimpse.RavenDb.Profiler.get_Enabled()
at Glimpse.RavenDb.Profiler.StopTrackingStore(Object sender, EventArgs e)
at Raven.Client.Document.DocumentStore.Dispose()
at Autofac.Core.Disposer.Dispose(Boolean disposing)
at Autofac.Util.Disposable.Dispose()
at Autofac.Core.Lifetime.LifetimeScope.Dispose(Boolean disposing)
at Autofac.Util.Disposable.Dispose()
at RedGate.Deploy.Portal.MvcApplication.Application_End()



Request information:
Request URL:
Request path:
User host address:
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE

Thread information:
Thread ID: 9
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.Web.HttpContextWrapper..ctor(HttpContext httpContext)
at Glimpse.AspNet.AspNetFrameworkProvider.get_HttpRequestStore()
at Glimpse.Core.Framework.Factory.<>c__DisplayClass2.<InstantiateTimerStrategy>b__1()
at Glimpse.RavenDb.Profiler.get_Enabled()
at Glimpse.RavenDb.Profiler.StopTrackingStore(Object sender, EventArgs e)
at Raven.Client.Document.DocumentStore.Dispose()
at Autofac.Core.Disposer.Dispose(Boolean disposing)
at Autofac.Util.Disposable.Dispose()
at Autofac.Core.Lifetime.LifetimeScope.Dispose(Boolean disposing)
at Autofac.Util.Disposable.Dispose()
at RedGate.Deploy.Portal.MvcApplication.Application_End()

This message is followed by warnings from User Profile Service about "user registry handles leaked".

This is followed by an error message from MsInstaller:

Product: Deployment Manager -- Error 1402. Could not open key: HKEY_CURRENT_USER32\Software\Red Gate\Deployment Manager\Server. System error 1018. Verify that you have sufficient access to that key, or contact your support personnel.

Comments

  • Related to this issue is the fact that for any Deployment Manager Agents running as a different user than Local System, the corresponding Windows service stops whenever a job is submitted to the agent.
  • Hi Paul,

    Thanks for all the data that you have sent!

    I could not reproduce the error you described in the first forum post. I ran "Red Gate Deployment Manager" service as a local user (myself and I am an admin on my local machine). I successfully upgraded to the newest version (v2.3.4.13) from v2.2.20.11. The service started up after the upgrade successfully.

    Your event viewer log seems to suggest that the user account the service is running as does not have permissions to modify the registry. Could you check if that is the case?
    Related to this issue is the fact that for any Deployment Manager Agents running as a different user than Local System, the corresponding Windows service stops whenever a job is submitted to the agent.

    Would you be able to send the deployment log on the server and any event viewer log on the Agent?

    Thanks!
    Chirayu Shishodiya
    Software Engineer - Deployment Manager
    Red Gate
Sign In or Register to comment.