Bug #79149 Connecting MySQL Fabric through Connector/NET 6.9.8
Submitted: 6 Nov 2015 5:54 Modified: 17 Dec 2015 8:30
Reporter: Samira Kumar Dash Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:MySQL 5.7 OS:Windows
Assigned to: CPU Architecture:Any

[6 Nov 2015 5:54] Samira Kumar Dash
Description:
Hello, 

I am going to create a HA group of servers with MySQL Fabric and our applications are developed in C-Sharp (.Net). 

As per the instruction provided in the documentation of Connector/net for Fabric support, I am getting error while connecting to Fabric. Let me explain you the step-wise. 

Server Setup - Faric with MySQL 5.7.9
Connector/NET Version - 6.9.8.0
Visual Studio 2012

Application Development: 

1. Create a Solution in C-Sharp .NET
2. Add reference of Dlls(mysql.data.dll and mysql.fabric.plugin.dll)
3. Create app.config file with below mentioned tags. 

<configuration>
  <configSections>
   <section name="MySQL" type="MySql.Data.MySqlClient.MySqlConfiguration, MySql.Data, 
     Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
  </configSections>
  <MySQL>
   <Replication>
    <ServerGroups>
     <Group name="Fabric" groupType="MySql.Fabric.FabricServerGroup, MySql.Fabric.Plugin">
      <Servers>
       <Server name="fabric" connectionstring="server=xxx.xx.xx.xxx;port=32275;uid=admin;password=xxxxxxxx;"/>
      </Servers>
     </Group>
    </ServerGroups>
   </Replication>
  </MySQL>
 </configuration>

4. Create a Method (RunFabricTest) and execute it on Button click. 

public const string connectionstring="server=fabric;uid=software;password=xxxxxxxx;";

Button Click Event:

MySqlConnection conn = new MySqlConnection(connectionstring);
conn.SetFabricProperties(groupId: "CSFAB1", mode: FabricServerModeEnum.Read_Write);
try
{
    conn.open();
}
catch (Exception ex)
{
    MessageBox.Show(ex.Message)
}

Error Generated as: 

The type initializer for 'MySql.Data.MySqlClient.Replication.ReplicationManager' threw an exception.

1. Server debugging mode is also enabled. (Got review from some forums)

Please try to provide solution on this connection issue. It will be very much helpful for us. 

Regards
Samira Kumar Dash

How to repeat:
Just run the code again.
[6 Nov 2015 16:43] Chiranjeevi Battula
Hello Samir Dash,

Thank you for the bug report.
Could you please provide exact error message/screenshot to confirm this issue at our end?

Thanks,
Chiranjeevi.
[7 Nov 2015 4:03] Samira Kumar Dash
Hi Chiranjeevi, 

The exact error message is coming as:

The type initializer for 'MySql.Data.MySqlClient.Replication.ReplicationManager' threw an exception.

Thanks
Samira Kumar Dash
[9 Nov 2015 4:53] Samira Kumar Dash
Hello Chiranjeevi, 

I am eagerly waiting for your response. 

Thanks
Samira Kumar Dash
[10 Nov 2015 10:04] Chiranjeevi Battula
Hello Samir Dash,

Thank you for your feedback.
Could you please provide full stack trace (full exception) to see where is happening the issue?.

Thanks,
Chiranjeevi.
[10 Nov 2015 10:35] Samira Kumar Dash
Hello Chiranjeevi, 

Please find the below given StackTrace Exception details. 

at MySql.Data.MySqlClient.Replication.ReplicationManager.IsReplicationGroup(String groupName) 
at
MySql.Data.MySqlClient.MySqlConnection.Open() at RunFabricTest.Form1.myFabricTest() in C:\Fabric\RunFabricTest\Form1.cs:line 36

Thanks
Samira Kumar Dash
[12 Nov 2015 12:14] Samira Kumar Dash
Hello Chiranjeevi, 

This is just to follow-up on the issue. Please let me know if you have identified the issue with the details I have provided on 10-Nov-15 or you need any more details from me. 

This is a case of stopper to implement Fabric. Please guide to move forward. 

Thanks
Samira Kumar Dash
[12 Nov 2015 13:13] Chiranjeevi Battula
Hello Samira Kumar Dash,

Thank you for your feedback.
Could you please provide full log file (please make it as private if you prefer) to confirm this issue at our end?

Thanks,
Chiranjeevi.
[12 Nov 2015 13:31] Samira Kumar Dash
Hello Chiranjeevi, 

Thanks for your quick response. 

Whenever I am following up on this issue, you are asking for additional information from me rather providing any reason or solution. 

I do not have any log file for this error and unable to understand as what type of log file you are looking. Please suggest. 

Thanks
Samira Kumar Dash
[14 Nov 2015 8:43] Samira Kumar Dash
Hello Chiranjeevi, 

Please update if you have identified any issue. 

Thanks
Samira Kumar Dash
[16 Nov 2015 10:44] Samira Kumar Dash
Hello, 

Please update on its progress. 

Thanks
Samira Kumar Dash
[3 Dec 2015 4:25] Samira Kumar Dash
Hello, 

Is there anyone who is working on this request? Should I consider it as closed from your end and we should not expect there will be any solution to this query. 

Thanks
Samira Kumar Dash
[17 Dec 2015 8:06] Chiranjeevi Battula
Hello Samira Kumar Dash,

Thank you for your feedback.
I could not repeat the issue on Visual Studio 2013 (C#.Net) with  MySQL 5.7.10 and 5.6.28 and Connector/Net 6.9.8 versions.
If you can provide more information, feel free to add it to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.

Thanks,
Chiranjeevi.
[17 Dec 2015 8:26] Samira Kumar Dash
Hello Chiranjeevi, 

Thanks for your response. Can you do me a favor. Is it possible for you to provide me the sample project (solution) so that I can verify again with our servers. 

Thanks
Samira Kumar Dash
[17 Dec 2015 8:30] Samira Kumar Dash
Hello Chiranjeevi, 

Please help me to modify the status as opened because I am getting only two status (Can't Repeat and Closed). 

Thanks
Samira Kumar Dash