Troubleshooting agent connectivity issues

RRidoutRRidout Posts: 3 New member


We've installed SQL Clone this week, but struggling to get agents on various machines (both servers and laptops) to generate an image, either from local backup files or from SQL Server directly

The error message we see on the Clone dashboard is:

"Could not communicate with agent. Check that the agent is started on [machine name] and is connected to the SQL Clone Server"

The machines are all showing green glyphs on the dashboard, and all the agents are running under Windows accounts with local admin rights. I've tried switching to running the agent under SQL Server authentication and getting the same error

From the agent logs, this seems to be the first line with reference to an agent connection error, but I'm none the wiser what to do to fix the problem:

2018-03-15 16:35:25.171 +00:00 [Error] Agent connection error
Newtonsoft.Json.JsonSerializationException: Cannot create and populate list type System.Collections.Generic.IReadOnlyCollection`1[System.String]. Path 'sourceLocationResourceNames'.
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewList(JsonReader reader, JsonArrayContract contract, Boolean& createdFromNonDefaultCreator)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.Linq.JToken.ToObject(Type objectType, JsonSerializer jsonSerializer)
   at Newtonsoft.Json.Linq.JToken.ToObject[T](JsonSerializer jsonSerializer)
   at Microsoft.AspNet.SignalR.Client.HubProxyExtensions.Convert[T](JToken obj, JsonSerializer serializer)
   at Microsoft.AspNet.SignalR.Client.HubProxyExtensions.<>c__DisplayClass2_1`1.<On>b__1()
   at Microsoft.AspNet.SignalR.Client.HubProxyExtensions.ExecuteCallback(String eventName, Int32 actualArgs, Int32 expectedArgs, Action action)
   at Microsoft.AspNet.SignalR.Client.Hubs.Subscription.OnReceived(IList`1 data)
   at Microsoft.AspNet.SignalR.Client.Hubs.HubProxy.InvokeEvent(String eventName, IList`1 args)
   at Microsoft.AspNet.SignalR.Client.HubConnection.OnMessageReceived(JToken message)
   at Microsoft.AspNet.SignalR.Client.Connection.<>c__DisplayClass161_0.<Microsoft.AspNet.SignalR.Client.IConnection.OnReceived>b__1()

On the SQL Clone Server itself, the logs are showing connection errors from each machine, so they would seem to all be connected and talking to each other, so not sure what the problem is?

I've checked settings.json as suggested in this post (https://documentation.red-gate.com/clone2/troubleshooting/installation-issues/an-agent-doesn-t-work-after-using-the-serverurl-command-line-flag-during-installation-unauthorized-received-from-server) and it is correctly pointing to port 14146 for agent connections

Any help appreciated




Best Answer

  • Options
    ChrisHurleyChrisHurley Posts: 54 Silver 2
    Hi! This error occurs because your agent machine has an old version of Newtonsoft.Json.dll in the Global Assembly Cache (GAC). The .NET runtime loads this preferentially over the DLL shipped with SQL Clone, and this version doesn't support deserialization of IReadOnlyCollection.

    This DLL will have been added to the GAC by another product. We've heard this problem a few times, but we're not sure which software might be responsible - any suggestions you might be able to give would be useful! This could be resolved either by removing this DLL from the GAC so that the version we ship is loaded (although this may affect the software that installed it there) or updating the version in the GAC to at least version 8.0.2.


  • Options
    RRidoutRRidout Posts: 3 New member

    Thanks Chris

    We use Newtonsoft.Json.dll in some SSIS packages, so it would have been installed to support those. Will try updating the version in the GAC to a later version and see if that fixes things



  • Options
    RRidoutRRidout Posts: 3 New member


    Waded through the GAC this morning, and eventually got the old version removed and latest version installed and things now work! :)

    Thanks for your speedy response


Sign In or Register to comment.