MySQL Forums
Forum List  »  Utilities

Fabric connection error - An item with the same key has already been added
Posted by: DINESH DHANABALAN
Date: June 13, 2016 09:57AM

Hi All, I have a mysql fabric POC set up, with 6 vmware machines running
windows server 2012 64bit, having 3 groups of 2 servers each. Also have 1 separate fabric server.
I am using the .net connector 6.9.8 and visual studio 15.
Following the example at https://dev.mysql.com/doc/connector-net/en/connector-net-programming-fabric.html

I was actually able to connect from visual studio and run the example creating a database , table and inserting a value, the very first time I ran the program.

The second time I try, I get the following error.


Outer exception
at MySql.Fabric.FabricServerGroup.GetServerList()
at MySql.Fabric.FabricServerGroup.GetServer(Boolean isMaster, MySqlConnectionStringBuilder settings)
at MySql.Data.MySqlClient.Replication.ReplicationManager.GetNewConnection(String groupName, Boolean master, MySqlConnection connection)
at MySql.Data.MySqlClient.MySqlConnection.Open()
at FabricTest.Program.RunFabricTest() in c:\users\dhanabdi\documents\visual studio 2015\Projects\Shard_test1\Shard_test1\Program.cs:line 97
at FabricTest.Program.Main(String[] args) in c:\users\dhanabdi\documents\visual studio 2015\Projects\Shard_test1\Shard_test1\Program.cs:line 28
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()


Innerexception - {"An item with the same key has already been added."}
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at MySql.Fabric.FabricServerGroup.GetShards()
at MySql.Fabric.FabricServerGroup.GetServerList()


Some Items I can glean from the exception detail window in Visual Studio.

MySQL.Fabric.FabricException - {"Unable to connect to Fabric server."}
Keys - {System.Collections.ListDictionaryInternal.NodeKeyValueCollection}
Innerexception - {"An item with the same key has already been added."}
Source - MySQL.Fabric.Plugin

I am sure its not authentication related, since I get a invalid username/password if I change id/password.

Looking at "netstat -a -b" I see a connection established at 32275, so looks like something it does after the connection is established but before the connect call is a success.

Appreciate any thoughts , inputs.

Options: ReplyQuote


Subject
Views
Written By
Posted
Fabric connection error - An item with the same key has already been added
1434
June 13, 2016 09:57AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.