Error submitting agent key generated from SQL Data Sync web portal to SQL Data Sync Agent Client (Preview)

Hi,

Ive installed SQL Data Sync Agent Client (Preview) on my database server to try out SQL Azure Data Sync Service. Using the agent access key generated from SQL Data Sync web portal, Ive attempted to submit this key to SQL Data Sync Agent Client. After selecting OK, I receive the following error:

Please enter a valid agent key to proceed. The key must be generated from SQL Data Sync web portal.

In the event log the following error is logged:

id:LocalAgentHost_Exception, rId:, sId:00000000-0000-0000-0000-000000000000, traceLevel:Error, agentId:00000000-0000-0000-0000-000000000000, agentInstanceId:7dfe16ca-80da-46e1-8bf2-fd7aca9f326c, version:4.0.89.0, e:'Type=System.ServiceModel.Security.MessageSecurityException,Message=An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.,Source=mscorlib,StackTrace=

Server stack trace:

   at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.ProcessReply(Message reply, SecurityProtocolCorrelationState correlationState, TimeSpan timeout)

   at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.Request(Message message, TimeSpan timeout)

   at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)

   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)

   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)

   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:

   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

   at Microsoft.SqlAzureDataSync.LocatorServiceApi.ILocatorAgentServiceApi.GetScaleUnitForAgentV2()

   at Microsoft.SqlAzureDataSync.LocatorServiceApi.LocatorServiceAgentProxy.<>c__DisplayClass4.<GetScaleUnitForAgentV2>b__3()

   at Microsoft.SqlAzureDataSync.ClientServerCommon.ClientProxyBase`1.ExecuteRequest(Action serviceCall)

   at Microsoft.SqlAzureDataSync.LocatorServiceApi.LocatorServiceAgentProxy.GetScaleUnitForAgentV2()

   at Microsoft.SqlAzureDataSync.LocalAgentHost.AgentConfigDataManager.DownloadAndCacheServiceUrisFromLocator(Guid agentId, String agentKey),'

'Type=System.ServiceModel.FaultException,Message=An error occurred when verifying security for the message.,Source=,StackTrace=,', methodName:AgentConfigDataManager.DownloadAndCacheServiceUrisFromLocator, message:Microsoft SQL Data Sync Windows service was unable to download information from SQL Data Sync Locator Service. Please generate a new agent key and resubmit. Exception: Please enter a valid agent key to proceed. The key must be generated from SQL Data Sync web portal., eType:'Type=System.ServiceModel.Security.MessageSecurityException', eMessage:'Message=An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.', eTypeInner:'Type=System.ServiceModel.FaultException', eMessageInner:'Message=An error occurred when verifying security for the message.'

Followed by:

id:LocalAgentHost_Exception, rId:, sId:00000000-0000-0000-0000-000000000000, traceLevel:Error, agentId:00000000-0000-0000-0000-000000000000, agentInstanceId:7dfe16ca-80da-46e1-8bf2-fd7aca9f326c, version:4.0.89.0, e:'Type=System.ServiceModel.Security.MessageSecurityException,Message=An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.,Source=mscorlib,StackTrace=

Server stack trace:

   at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.ProcessReply(Message reply, SecurityProtocolCorrelationState correlationState, TimeSpan timeout)

   at System.ServiceModel.Channels.SecurityChannelFactory`1.SecurityRequestChannel.Request(Message message, TimeSpan timeout)

   at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)

   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)

   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)

   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:

   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

   at Microsoft.SqlAzureDataSync.LocatorServiceApi.ILocatorAgentServiceApi.GetScaleUnitForAgentV2()

   at Microsoft.SqlAzureDataSync.LocatorServiceApi.LocatorServiceAgentProxy.<>c__DisplayClass4.<GetScaleUnitForAgentV2>b__3()

   at Microsoft.SqlAzureDataSync.ClientServerCommon.ClientProxyBase`1.ExecuteRequest(Action serviceCall)

   at Microsoft.SqlAzureDataSync.LocatorServiceApi.LocatorServiceAgentProxy.GetScaleUnitForAgentV2()

   at Microsoft.SqlAzureDataSync.LocalAgentHost.AgentConfigDataManager.DownloadAndCacheServiceUrisFromLocator(Guid agentId, String agentKey)

   at Microsoft.SqlAzureDataSync.LocalAgentHost.ClientUXService.SubmitAgentKey(String agentIdKey),'

'Type=System.ServiceModel.FaultException,Message=An error occurred when verifying security for the message.,Source=,StackTrace=,', methodName:ClientUXService.SubmitAgentKey, message:Unable to authenticate agent key with the SQL Data Sync. Please check Event Log for details and try again. Exception: Please enter a valid agent key to proceed. The key must be generated from SQL Data Sync web portal., eType:'Type=System.ServiceModel.Security.MessageSecurityException', eMessage:'Message=An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.', eTypeInner:'Type=System.ServiceModel.FaultException', eMessageInner:'Message=An error occurred when verifying security for the message.'

Followed by id:

LocalAgentHost_Info, rId:, sId:00000000-0000-0000-0000-000000000000, traceLevel:Error, agentId:00000000-0000-0000-0000-000000000000, agentInstanceId:7dfe16ca-80da-46e1-8bf2-fd7aca9f326c, version:4.0.89.0, methodName:ClientUXService.SubmitAgentKey, message:Please enter a valid agent key to proceed. The key must be generated from SQL Data Sync web portal.

My server id is: y2sj6bb8ph

Region: North Europe

Time / Date: 20:12:04 (18/04/13) also tried several times yesterday evening (17/04/2013 20:45 to 21:45)

Tracing Id: Dont have a trace id but agent instance id is: 7dfe16ca-80da-46e1-8bf2-fd7aca9f326c

Server: Windows Server 2012 Data Center

SQL Server: SQL Server 2012

Additionally I have:

  • Followed SQL Data Sync Troubleshooting guide
  • Checked firewall configuration (outbound connection port 443 enabled)
  • Security on Client Azure Sync Service
  • Can access https://locator.sync.azure.com/LocatorServiceApi.svc
  • SQL Azure Data Sync Client Version in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\SQL Azure Data Sync\Version is 4.0.89.0

Although this shouldnt be an issue, my local database server is on a Hyper-V VM

Any help appreciated.

Thanks,
Sama

April 18th, 2013 11:46pm

Hi Samad,

Could you please provide your subscription ID (including the location information) under which the local agent is registered?

Another thing you may try is to re-generate the agent key on the portal & re-start your local agent (it's a windows service).

Regards.

Chao

Free Windows Admin Tool Kit Click here and download it now
April 22nd, 2013 6:03am

Hi Chao,

My subscription ID is: a5a429a8-e470-4312-a3a9-14b3bc551c27 and my local agent is regsitered in North Europe.

I have re-generated the agent key several times and re-started Microsoft Data Sync Service. Unfortunately I still receive the same error message.

Thanks,
Samad

April 22nd, 2013 2:28pm

Hi Samad,

Is your local agent installed on the Hyper-V VM or it's installed on a physical machine? This error just looks like the agentID and key are not matched. If your local agent is installed by copy the VHD file, this may happen. Could you please provide the part in your generated key before ":" ?

I am not sure whether you try this. If not, maybe you can try the steps below:

1. Delete the sync agent on portal.

2. Un-install the local agent.

3. Re-create a new sync agent on portal, re-install the local agent on your local machine .

4. Generate key for the new agent and submit.

Regards.

Chao

Free Windows Admin Tool Kit Click here and download it now
April 23rd, 2013 8:58am

Hi Chao,

My Azure acount is currently disabled. I trying to sort it out with the billing team and will get back to you.

Yes, SQL Data Sync Service is installed and running on a Hyper-V VM.

I did try the additional steps you have listed above.

Thanks,

Samad

April 23rd, 2013 3:12pm

Hi Chao,

As requested, I have deleted the sync agent on the portal, uninstall the local agent, recreated a new sync agent on my portal, reinstalled the local agent on my hyper-vm vm and submitted a new generated key. I still receive the same error.

Part of the generate key before ':' is 4cd26bf5-f14a-40bb-9c4a-f425facd9917.

Hyper-vm is Windows Server 2012 Data Center and SQL Server 2012.

Thanks,

Samad

Free Windows Admin Tool Kit Click here and download it now
April 25th, 2013 10:50pm

Hi Chao,

Is there any update?

Thanks,

Samad

May 12th, 2013 2:22pm

Sorry for the late response Samad. The support bandwidth for Data Sync is very limit so that there might be some delay. We will take a look at that get back to you. At the same time, is it possible that you can try to use local agent on physical machine instead of HyperV VM?

Free Windows Admin Tool Kit Click here and download it now
May 15th, 2013 6:47am

Suspect the issue is caused by something inconsistent in the VM which the SDS Agent Client was installed. Could you try to setup a new VM and install a new SDS Agent Client on the new setup VM to see if the same error still report or not?
May 19th, 2013 10:54am

Hi,

I've created a brand new Hyper-V VM, again with Windows Server 2012 and SQL Server 2012.

Installed SQL Data Sync Agent, re-generated an agent key and I still receive the same error message.

I'm unable to test this on a physical machine.

Thanks,
Samad

Free Windows Admin Tool Kit Click here and download it now
June 5th, 2013 12:23am

Hi Chao,

I'm guessing I will need to what for the next refresh for this issue to be resolved?

Thanks,
Samad

June 22nd, 2013 7:31pm

can you try setting your VM's timezone to be the same as the Azure Data Center where you're hosting the SQL Data Sync service?
Free Windows Admin Tool Kit Click here and download it now
June 24th, 2013 4:07am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics