Windows server 2003x64 and Deployment Manager Agent

oleg_sholeg_sh Posts: 4
edited July 7, 2014 6:05AM in Deployment Manager
Hello, Dear colleagues, help to deal with a problem.
I downloaded the last Deployment Manager version.
I installed the Agent on Windows 2003 x64. The service after start stops. Windows Management Framework, .NET Framework 4.0, PowerShell 2.0 and IIS 6.0 was installed.

Event Viewer:
After start service:

2014-03-03 16:41:42,390 [5] WARN  RedGate.Deploy.Startup [(null)] - Tried to load C:\Program Files (x86)\Red Gate\Deployment Agent\Agent\Plugins\RedGate.Deploy.SqlServerDbPackage.AgentPlugin\SQLite.Interop.dll as potential plugin, but failed.
System.BadImageFormatException: Could not load file or assembly 'file:///C:\Program Files (x86)\Red Gate\Deployment Agent\Agent\Plugins\RedGate.Deploy.SqlServerDbPackage.AgentPlugin\SQLite.Interop.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
File name: 'file:///C:\Program Files (x86)\Red Gate\Deployment Agent\Agent\Plugins\RedGate.Deploy.SqlServerDbPackage.AgentPlugin\SQLite.Interop.dll'
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at RedGate.Deploy.Agent.Plugins.PluginsModule.GetPotentialPluginAssemblies()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



2014-03-03 16:41:45,656 [9] ERROR RedGate.Deploy.Shared.Startup.Host [(null)] - System.Security.Cryptography.CryptographicException: Object already exists.

   at System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr)
   at System.Security.Cryptography.X509Certificates.X509Utils._ExportCertificatesToBlob(SafeCertStoreHandle safeCertStoreHandle, X509ContentType contentType, IntPtr password)
   at System.Security.Cryptography.X509Certificates.X509Certificate.ExportHelper(X509ContentType contentType, Object password)
   at System.Security.Cryptography.X509Certificates.X509Certificate.Export(X509ContentType contentType)
   at RedGate.Deploy.Shared.Security.CertificateEncoder.ToBase64String(X509Certificate2 certificate, X509ContentType exportType)
   at RedGate.Deploy.Shared.Configuration.AgentConfiguration.set_AgentCertificate(X509Certificate2 value)
   at RedGate.Deploy.Shared.Configuration.AgentConfiguration.GenerateNewCertificate()
   at RedGate.Deploy.Shared.Configuration.AgentConfiguration.get_AgentCertificate()
   at RedGate.Deploy.Agent.Services.AgentServiceHostStarter.SetupCredentials(ServiceHost host)
   at RedGate.Deploy.Shared.Services.ServiceHostStarter.LaunchServiceHost(Uri address, ServiceMetadata service)
   at RedGate.Deploy.Shared.Services.ServiceHostStarter.Start()
   at RedGate.Deploy.Agent.Commands.RunAgentCommand.Start()
   at RedGate.Deploy.Shared.Startup.WindowsServiceHost.RunService()


For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


EventType clr20r3, P1 redgate.deploy.agent.exe, P2 2.4.4.5, P3 530e1475, P4 mscorlib, P5 4.0.0.0, P6 517a1c71, P7 5b3f, P8 6, P9 udta330idobh2roz2ayvlcelag5agtls, P10 NIL.





Application: RedGate.Deploy.Agent.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Security.Cryptography.CryptographicException
Stack:
   at RedGate.Deploy.Shared.Startup.WindowsServiceHost.RunService()
   at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Threading.ThreadHelper.ThreadStart()


At Agent Tools start
2014-03-03 16:49:03,562 [1] FATAL RedGate.Deploy.Tools.Infrastructure.UnhandledErrorTrapper [(null)] - Could not start Deployment Manager tools.
Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(RedGate.Deploy.Shared.Configuration.IMutableAgentConfiguration)' on type 'SecurityTabViewModel'. ---> System.Security.Cryptography.CryptographicException: Object already exists.

   at System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr)
   at System.Security.Cryptography.X509Certificates.X509Utils._ExportCertificatesToBlob(SafeCertStoreHandle safeCertStoreHandle, X509ContentType contentType, IntPtr password)
   at System.Security.Cryptography.X509Certificates.X509Certificate.ExportHelper(X509ContentType contentType, Object password)
   at RedGate.Deploy.Shared.Security.CertificateEncoder.ToBase64String(X509Certificate2 certificate, X509ContentType exportType)
   at RedGate.Deploy.Shared.Configuration.AgentConfiguration.set_AgentCertificate(X509Certificate2 value)
   at RedGate.Deploy.Shared.Configuration.AgentConfiguration.GenerateNewCertificate()
   at RedGate.Deploy.Shared.Configuration.AgentConfiguration.get_AgentCertificate()
   at RedGate.Deploy.Tools.Views.AgentTabs.SecurityTabViewModel..ctor(IMutableAgentConfiguration agentConfiguration)
   at lambda_method(Closure , Object[] )
   at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
   --- End of inner exception stack trace ---
   at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
   at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
   at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)
   at Autofac.Core.Resolving.InstanceLookup.Execute()
   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters)
   at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
   at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
   at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)
   at Autofac.Core.Resolving.InstanceLookup.Execute()
   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters)
   at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
   at Autofac.ResolutionExtensions.Resolve[TService](IComponentContext context, IEnumerable`1 parameters)
   at RedGate.Deploy.Tools.Views.AgentModule.CreateShell(IComponentContext container)
   at Autofac.Builder.RegistrationBuilder.<>c__DisplayClass1`1.<ForDelegate>b__0(IComponentContext c, IEnumerable`1 p)
   at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
   at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)
   at Autofac.Core.Resolving.InstanceLookup.Execute()
   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters)
   at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()
   at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
   at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)
   at Autofac.Core.Resolving.InstanceLookup.Execute()
   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters)
   at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters)
   at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters)
   at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
   at Autofac.ResolutionExtensions.Resolve[TService](IComponentContext context, IEnumerable`1 parameters)
   at RedGate.Deploy.Tools.App.OnStartup(StartupEventArgs e)
   at System.Windows.Application.<.ctor>b__1(Object unused)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)


At Deployment Manager Tools.exe start
2014-03-03 16:49:56,671 [5] WARN  RedGate.Deploy.Startup [(null)] - Tried to load C:\Program Files (x86)\Red Gate\Deployment Agent\Agent\Plugins\RedGate.Deploy.SqlServerDbPackage.AgentPlugin\SQLite.Interop.dll as potential plugin, but failed.
System.BadImageFormatException: Could not load file or assembly 'file:///C:\Program Files (x86)\Red Gate\Deployment Agent\Agent\Plugins\RedGate.Deploy.SqlServerDbPackage.AgentPlugin\SQLite.Interop.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
File name: 'file:///C:\Program Files (x86)\Red Gate\Deployment Agent\Agent\Plugins\RedGate.Deploy.SqlServerDbPackage.AgentPlugin\SQLite.Interop.dll'
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at RedGate.Deploy.Agent.Plugins.PluginsModule.GetPotentialPluginAssemblies()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
«1

Comments

  • James BJames B Posts: 1,124 Silver 4
    This may occur if the agent was previously run under a different account, or if permissions are insufficient to access the keystore.
    Can you check the agent account has full control to “Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\ Machine Keysâ€
    Systems Software Engineer

    Redgate Software

  • This may occur if the agent was previously run under a different account, or if permissions are insufficient to access the keystore.
    Can you check the agent account has full control to “Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\ Machine Keysâ€
  • Installation of the old version helped. Thanks.
  • ATimsonATimson Posts: 15 Bronze 1
    This may occur if the agent was previously run under a different account, or if permissions are insufficient to access the keystore.
    Can you check the agent account has full control to “Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\ Machine Keysâ€
  • James BJames B Posts: 1,124 Silver 4
    Is this a completely fresh install with the very latest downloaded version, or was there previous an installation of DM on the same machine?
    Systems Software Engineer

    Redgate Software

  • ATimsonATimson Posts: 15 Bronze 1
    Completely fresh install; there was no previous agent installation on the machine.

    Our DM server is still on 2.4.8.34 (8 April 2014). If yesterday's patch had an agent update, then we're not on the *very* latest version, but it's certainly close. (The agent installer was freshly downloaded from the DM server before installing.)
  • James BJames B Posts: 1,124 Silver 4
    It might well be worth upgrading - I have a feeling this issue only affected one particular version (most likely the one you have!)
    Systems Software Engineer

    Redgate Software

  • ATimsonATimson Posts: 15 Bronze 1
    I've upgraded the server & agent to v2.4.10.68, and I'm still seeing the same problem.
  • James BJames B Posts: 1,124 Silver 4
    OK- looking back at the ticket raised from the original user, they uninstalled DM and reverted to this build: ftp://support.red-gate.com/patches/Depl ... anager.zip

    That worked OK, and they could add the agent. Once done, they could upgrade to the latest release OK.

    I'll let the development team know this still seems to be a problem in the meantime.
    Systems Software Engineer

    Redgate Software

  • ATimsonATimson Posts: 15 Bronze 1
    Thank you for that link - very useful. Getting to the newest version wasn't exactly straight-forward - I don't know if it's because the DM server & the agents were so out of sync, or if it was because of some other issue - but with some finessing I've successfully been able to install the Agent & deploy to the boxes. :)

    1) Install the old Agent MSI.

    2) Run the Agent Tools to add the DM server key, and get the agent key.

    3) Upgrade the Agent to the newest version via MSI.

    (Upgrading from the DM web failed: "System.ServiceModel.Security.SecurityNegotiationException: The remote agent 'XXX' rejected a connection from this Deployment Manager server. This happens when the Agent does not have the key of this Deployment Manager in its trusted Deployment Manager list. Please run the Programs->Agent Tools application on the remote machine, and verify that an entry for 'XXX' exists in the list of Trusted Deployment Manager Servers.")

    4) Add the Agent to DM and deploy as normal.

    Thanks again for your assistance!
  • James BJames B Posts: 1,124 Silver 4
    Glad to hear that's working now! I've let the team know in case there's still some obscure bug here; but you're only the second person to bump into this kind of problem from what I can tell, so hopefully it's just one of those things.

    Post back if you continue to have trouble.
    Systems Software Engineer

    Redgate Software

  • Hi James,

    Just to let you know, we have stumbled upon this problem as well at Skyscanner.

    It didn't keep us from doing successful deployments so we just ignored it but it would be nice to have a better understanding of this so we know the implications and how to fix it.

    I'll get back once I did some investigation on this and may have some questions about it.

    Cheers,
    Balint
    Bálint Bartha, Skyscanner
  • James BJames B Posts: 1,124 Silver 4
    I think this problem related to 2003 based Agents, but (should be) fixed in the very latest release.

    If that's not the case for you, post back though!
    Systems Software Engineer

    Redgate Software

  • Hi James,

    We are using Windows 2008 for the RGDM server and still seem to have this problem.
    Updating can be an option as we might be behind by several releases.
    I will come back to you in a week or so to let you know what are the results of my investigation.


    Cheers,
    Balint
    Bálint Bartha, Skyscanner
  • James BJames B Posts: 1,124 Silver 4
    It's the agent rather than the DM server that would be on 2003 for the problem to occur. See the Release Notes here.
    Systems Software Engineer

    Redgate Software

  • Hi,
    I have just had the same problem on a 2k3 64bit machine.
    Unfortunately it is a production box with restricted access so it's not a great place for for guessing or finger crossing.
    We would really appreciate some help.
    SkyCaptain
  • We believe this problem is fixed in version 2.4.12.1 of the Deployment Agent.

    Can you confirm the version of the agent installed on the machine in question? You can find that by looking in Control Panel/Uninstall or change a program for the version of Deployment Agent (publisher Red Gate Software Ltd.), or by looking at the file properties of C:\Program Files (x86)\Red Gate\Deployment Agent\Agent\RedGate.Deploy.Agent.exe).

    If you have version 2.4.12.1 installed and you're still having problems, please could you restart the service Red Gate Deployment Agent, and then look in the Windows Event Viewer for any errors or warnings from the Deployment Agent.
    Development Lead
    Redgate Software
  • Thanks for your reply Mike,
    The deployment agent version is 2.4.10.68 so I believe this is the problem. How can I upgrade?
    SkyCaptain
  • First you'll need to upgrade your Deployment Manager Server to 2.4.12.1 (assuming you haven't already), which you should be able to do with the built-in auto-update mechanism, or by downloading it from https://www.red-gate.com/delivery/deployment-manager/download.

    You would then normally be able to automatically update the agents from the Deployment Manager web interface, but unfortunately that doesn't work when the Agent service isn't running. Instead, you'll need to perform a manual upgrade of the agent. You can simply get the agent installer .msi from the Tools page of your own Deployment Manager server (http://{your_deployment_manager_server_address}:{port}/downloads/agentinstaller) and run it on the machine in question.

    I hope that helps.
    Development Lead
    Redgate Software
  • It really does. I will try that.
    Thanks very much.
    SkyCaptain
  • Just out of curiosity. I just realised that the agent is working fine on another 2k3 64bit machine ! which makes me think the original problem could be related to something different ?
    SkyCaptain
  • ATimsonATimson Posts: 15 Bronze 1
    skycaptain wrote:
    Just out of curiosity. I just realised that the agent is working fine on another 2k3 64bit machine ! which makes me think the original problem could be related to something different ?
    Did that other machine initially have an older version of the Agent installed? I was only having troubles with the initial install/configuration, and newer agent versions operated correctly when upgraded.
  • Yes ! before installing 2.4.10.68 there was another version of the agent installed. I'm a bit confused now!
    SkyCaptain
  • We introduced a bug in version 2.4.4.5 of the Deployment Agent that meant it was no longer capable of creating its own security certificate (the thumbprint used for server/agent communication) on Windows Server 2003. Because certificate creation only needs to happen once, only new installations were affected; upgrades from previous versions would have carried on working.

    We fixed this bug in version 2.4.12.1, so fresh installations will now work correctly.
    Development Lead
    Redgate Software
  • Mike Upton wrote:
    We introduced a bug in version 2.4.4.5 of the Deployment Agent that meant it was no longer capable of creating its own security certificate (the thumbprint used for server/agent communication) on Windows Server 2003. Because certificate creation only needs to happen once, only new installations were affected; upgrades from previous versions would have carried on working.

    We fixed this bug in version 2.4.12.1, so fresh installations will now work correctly.

    I'm sorry to say that it doesn't seem to be resolved. I'm having the same problem on a 2003 x86. And I'm using version 2.4.12.1 also tried a few earlier versions.

    Any tips on how to get it working? I have two 2003 x86 I need to deploy something on using Deployment Manager
  • If it's still happening in 2.4.12.1 then it must be a slightly different problem. Could you find any relevant messages from the Windows event log and post them here?
    Development Lead
    Redgate Software
  • I've cloned the computer and tried setting security to wide open on the Machinekeys directory and cleaning it out and it didn't change a thing. Also tried to install the agent as system using psexec, didn't solve it either.

    Event Type: Error
    Event Source: .NET Runtime
    Event Category: None
    Event ID: 1026
    Date: 03-07-2014
    Time: 10:16:39
    User: N/A

    Description:
    Application: RedGate.Deploy.Agent.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.Security.Cryptography.CryptographicException
    Stack:
    at RedGate.Deploy.Shared.Startup.WindowsServiceHost.RunService()
    at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
    at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
    at System.Threading.ThreadHelper.ThreadStart()


    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

    Event Type: Warning
    Event Source: Red Gate Deployment Agent
    Event Category: None
    Event ID: 0
    Date: 03-07-2014
    Time: 10:15:52
    User: N/A

    Description:
    2014-07-03 10:15:40,921 [5] WARN RedGate.Deploy.Startup [(null)] - Tried to load C:\Program Files\Red Gate\Deployment Agent\Agent\Plugins\RedGate.Deploy.SqlServerDbPackage.AgentPlugin\SQLite.Interop.dll as potential plugin, but failed.
    System.BadImageFormatException: Could not load file or assembly 'file:///C:\Program Files\Red Gate\Deployment Agent\Agent\Plugins\RedGate.Deploy.SqlServerDbPackage.AgentPlugin\SQLite.Interop.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
    File name: 'file:///C:\Program Files\Red Gate\Deployment Agent\Agent\Plugins\RedGate.Deploy.SqlServerDbPackage.AgentPlugin\SQLite.Interop.dll'
    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
    at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
    at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
    at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
    at System.Reflection.Assembly.LoadFrom(String assemblyFile)
    at RedGate.Deploy.Agent.Plugins.PluginsModule.GetPotentialPluginAssemblies()

    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
  • I've tried repairing .Net 4 - no change
    Using the local administrator account - no change

    When I start Agent Tools, I get the following error:

    Could not start Deployment Manager tools: An exception was thrown while invoking the constructore 'Void .ctor(RedGate.Deploy.Shared.IMutableAgentConfiguration)' on type 'Security TabViewModel'
  • The message about not being able to load SQLite.Interop.dll as a potential plugin is normal, and nothing to worry about. The problem is being caused by the CryptographicException, but we need more information about the underlying stack trace.

    Could you run the following from an administrative command prompt, and post the output here?
    "C:\Program Files (x86)\Red Gate\Deployment Agent\Agent\RedGate.Deploy.Agent.exe" agent --console
    

    Thanks
    Development Lead
    Redgate Software
  • Tried to load C:\Program Files\Red Gate\Deployment Agent\Agent\Plugins\RedGate.D
    eploy.SqlServerDbPackage.AgentPlugin\SQLite.Interop.dll as potential plugin, but
    failed.
    System.BadImageFormatException: Could not load file or assembly 'file:///C:\Prog
    ram Files\Red Gate\Deployment Agent\Agent\Plugins\RedGate.Deploy.SqlServerDbPack
    age.AgentPlugin\SQLite.Interop.dll' or one of its dependencies. The module was e
    xpected to contain an assembly manifest.
    File name: 'file:///C:\Program Files\Red Gate\Deployment Agent\Agent\Plugins\Red
    Gate.Deploy.SqlServerDbPackage.AgentPlugin\SQLite.Interop.dll'
    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String cod
    eBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&
    stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppre
    ssSecurityChecks)
    at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String code
    Base, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& s
    tackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppres
    sSecurityChecks)
    at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName as
    semblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntr
    ospection, Boolean suppressSecurityChecks)
    at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Ev
    idence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm,
    Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackM
    ark)
    at System.Reflection.Assembly.LoadFrom(String assemblyFile)
    at RedGate.Deploy.Agent.Plugins.PluginsModule.GetPotentialPluginAssemblies()

    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\M
    icrosoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure lo
    gging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fus
    ion!EnableLog].

    Deployment Agent version 2.4.8.34

    - RedGate.Deploy.Agent

    Detected plugin IConvention RedGate.Deploy.SqlServerDbPackage.AgentPlugin.DbPack
    ageConvention, RedGate.Deploy.SqlServerDbPackage.AgentPlugin, Version=0.0.2.1816
    , Culture=neutral, PublicKeyToken=7f465a1c156d4d57 (loaded from C:\Program Files
    \Red Gate\Deployment Agent\Agent\Plugins\RedGate.Deploy.SqlServerDbPackage.Agent
    Plugin\RedGate.Deploy.SqlServerDbPackage.AgentPlugin.dll)
    Started job queue
    System.Security.Cryptography.CryptographicException: Object already exists.

    at System.Security.Cryptography.CryptographicException.ThrowCryptographicExce
    ption(Int32 hr)
    at System.Security.Cryptography.X509Certificates.X509Utils._ExportCertificate
    sToBlob(SafeCertStoreHandle safeCertStoreHandle, X509ContentType contentType, In
    tPtr password)
    at System.Security.Cryptography.X509Certificates.X509Certificate.ExportHelper
    (X509ContentType contentType, Object password)
    at System.Security.Cryptography.X509Certificates.X509Certificate.Export(X509C
    ontentType contentType)
    at RedGate.Deploy.Shared.Security.CertificateEncoder.ToBase64String(X509Certi
    ficate2 certificate, X509ContentType exportType)
    at RedGate.Deploy.Shared.Configuration.AgentConfiguration.set_AgentCertificat
    e(X509Certificate2 value)
    at RedGate.Deploy.Shared.Configuration.AgentConfiguration.GenerateNewCertific
    ate()
    at RedGate.Deploy.Shared.Configuration.AgentConfiguration.get_AgentCertificat
    e()
    at RedGate.Deploy.Agent.Services.AgentServiceHostStarter.SetupCredentials(Ser
    viceHost host)
    at RedGate.Deploy.Shared.Services.ServiceHostStarter.LaunchServiceHost(Uri ad
    dress, ServiceMetadata service)
    at RedGate.Deploy.Shared.Services.ServiceHostStarter.Start()
    at RedGate.Deploy.Agent.Commands.RunAgentCommand.Start()
    at RedGate.Deploy.Shared.Startup.Host.InternalRunConsole(Action execute, Acti
    on shutdown)
    Command RedGate.Deploy.Agent.Commands.RunAgentCommand failed
    System.Security.Cryptography.CryptographicException: Object already exists.


    Server stack trace:
    at System.Security.Cryptography.CryptographicException.ThrowCryptographicExce
    ption(Int32 hr)
    at System.Security.Cryptography.X509Certificates.X509Utils._ExportCertificate
    sToBlob(SafeCertStoreHandle safeCertStoreHandle, X509ContentType contentType, In
    tPtr password)
    at System.Security.Cryptography.X509Certificates.X509Certificate.ExportHelper
    (X509ContentType contentType, Object password)
    at System.Security.Cryptography.X509Certificates.X509Certificate.Export(X509C
    ontentType contentType)
    at RedGate.Deploy.Shared.Security.CertificateEncoder.ToBase64String(X509Certi
    ficate2 certificate, X509ContentType exportType)
    at RedGate.Deploy.Shared.Configuration.AgentConfiguration.set_AgentCertificat
    e(X509Certificate2 value)
    at RedGate.Deploy.Shared.Configuration.AgentConfiguration.GenerateNewCertific
    ate()
    at RedGate.Deploy.Shared.Configuration.AgentConfiguration.get_AgentCertificat
    e()
    at RedGate.Deploy.Agent.Services.AgentServiceHostStarter.SetupCredentials(Ser
    viceHost host)
    at RedGate.Deploy.Shared.Services.ServiceHostStarter.LaunchServiceHost(Uri ad
    dress, ServiceMetadata service)
    at RedGate.Deploy.Shared.Services.ServiceHostStarter.Start()
    at RedGate.Deploy.Agent.Commands.RunAgentCommand.Start()
    at RedGate.Deploy.Shared.Startup.Host.InternalRunConsole(Action execute, Acti
    on shutdown)

    Exception rethrown at [0]:
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
    at RedGate.Deploy.Shared.Startup.CommandProcessor.<ProcessAsync>d__4.MoveNext
    ()
    Scheduler disposed.
    Exited job queue
Sign In or Register to comment.