Environment is Offline

rjayakumarrjayakumar Posts: 34
edited August 21, 2014 4:20AM in Deployment Manager
We are trying to add a server.
As a application server its always showing OFFLINE but add it as a db server - its fine. But this is happening only for one server.

We have tried re-installing the agent and added again, in vain.
Few lines of the error is as below.

2014-08-20 18:30:29,180 [10] ERROR RedGate.Deploy.Agent.Services.Jobs.JobRunner [(null)] - Error while executing job: This job type (RedGate.Deploy.Agent.FolderTracking.RefreshFolderSizesJob) is not supported.
System.NotSupportedException: This job type (RedGate.Deploy.Agent.FolderTracking.RefreshFolderSizesJob) is not supported. ---> Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(System.Func`2[System.Collections.Generic.IEnumerable`1[RedGate.Deploy.Agent.FolderTracking.FolderReferences],RedGate.Deploy.Agent.FolderTracking.ReferencedFolderTracker], RedGate.Deploy.Agent.FolderTracking.FolderReferencesRepository)' on type 'PersistentFolderTracker'. ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: e. Path '', line 0, position 0.
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.JsonTextReader.ReadInternal()
at Newtonsoft.Json.JsonTextReader.Read()
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at RedGate.Deploy.Agent.FolderTracking.FolderReferencesRepository.Load()
at RedGate.Deploy.Agent.FolderTracking.PersistentFolderTracker..ctor(Func`2 folderLoader, FolderReferencesRepository folderReferencesRepository)
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>b__0()
at Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator)
at Autofac.Core.Resolving.InstanceLookup.Execute()
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope,
________
Cheers,
Raghunandan

Comments

  • See if this helps.

    extract from eventvwr

    2014-08-20 18:58:45,928 [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()
    ________
    Cheers,
    Raghunandan
  • Another event log... which just occurred for your reference

    2014-08-20 18:59:16,537 [10] ERROR RedGate.Deploy.Agent.Services.Jobs.JobRunner [(null)] - Error while executing job: This job type (RedGate.Deploy.Agent.FolderTracking.RefreshFolderSizesJob) is not supported.
    System.NotSupportedException: This job type (RedGate.Deploy.Agent.FolderTracking.RefreshFolderSizesJob) is not supported. ---> Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(System.Func`2[System.Collections.Generic.IEnumerable`1[RedGate.Deploy.Agent.FolderTracking.FolderReferences],RedGate.Deploy.Agent.FolderTracking.ReferencedFolderTracker], RedGate.Deploy.Agent.FolderTracking.FolderReferencesRepository)' on type 'PersistentFolderTracker'. ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: e. Path '', line 0, position 0.
    at Newtonsoft.Json.JsonTextReader.ParseValue()
    at Newtonsoft.Json.JsonTextReader.ReadInternal()
    at Newtonsoft.Json.JsonTextReader.Read()
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
    at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
    at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
    at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
    at RedGate.Deploy.Agent.FolderTracking.FolderReferencesRepository.Load()
    at RedGate.Deploy.Agent.FolderTracking.PersistentFolderTracker..ctor(Func`2 folderLoader, FolderReferencesRepository folderReferencesRepository)
    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>b__0()
    at Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator)
    at Autofac.Core.Resolving.InstanceLookup.Execute()
    at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters)
    at Autofac.Core.Resolving.InstanceLookup.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters)
    at Autofac.Core.Activators.Reflection.AutowiringParameter.<>c__DisplayClass2.<CanSupplyValue>b__0()
    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.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
    at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
    at Autofac.Features.Indexed.KeyedServiceIndex`2.get_Item(TKey key)
    at RedGate.Deploy.Agent.Services.Jobs.JobRunner.GetExecutorFor(Type jobType)
    --- End of inner exception stack trace ---
    at RedGate.Deploy.Agent.Services.Jobs.JobRunner.GetExecutorFor(Type jobType)
    at RedGate.Deploy.Agent.Services.Jobs.JobRunner.ExecuteJob(IJob job, String& errorMessage, ILogScope additionalLogTarget)


    For more information, see Help and Support Center at
    ________
    Cheers,
    Raghunandan
  • Those two different error logs are unrelated.

    The message about failing to load SQLite.Interop.dll as a plugin is not a problem, although upgrading to the latest version of the Deployment Agent (2.4.16.109) should stop it happening again.

    The other message indicates a problem with the Agent's FolderReferences.json file which is used to keep track of old deployment locations (to allow the 'purge old deployments' feature to work). The file can be found in the root of the Agent's applications directory, which is normally C:\ProgramData\Red Gate\DeploymentAgent\Applications. Renaming the file and restarting the Red Gate Deployment Agent service should allow the Agent to start normally.

    I'm not sure how the FolderReferences.json file got corrupted though. Would you be able to post the current contents of that file (i.e. before renaming and restarting) to this thread to help me work out what's happened?
    Development Lead
    Redgate Software
  • Hello Mike Upton,
    many thanks for your response.

    I agree both are different but from the same server.

    We were running out of time and the admin has replaced the C drive from the backup (taken regularly) and post that the server is working as expected :roll:

    I am afraid in this case I will not be able to share the file. Any similar symptoms further, I shall do the needful immediately.
    ________
    Cheers,
    Raghunandan
Sign In or Register to comment.