Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008225opensim[REGION] OpenSim Corepublic2017-07-31 17:072017-08-01 11:54
Reportercolosi 
Assigned To 
PrioritynoneSeverityblockReproducibilityalways
StatusnewResolutionnot fixable 
PlatformOS*nixOS Version
Product Version0.9.0 
Target VersionFixed in Version 
Summary0008225: Upgrade of .NET MySql Connector to v 6.9.9 doesn't handle unix sockets in ConnectionString
DescriptionThis is a bug in the version of the MySql connector which to my knowledge still exists in 6.10.0, but when it is fixed, we should upgrade this again.

The MySql connector ignores the Protocol = unix component of the ConnectionString, treats the socket like it's a url and tries to do a DNS lookup which fails and causes a crash. This bug has been reported here: https://bugs.mysql.com/bug.php?id=84255 [^]
Steps To ReproduceIn the [DatabaseService] section of StandaloneCommon.ini or the equivalent robust/hg ini, set the ConnectionString to use 'Protocol = unix' and 'Data Source = <unix socket path>' like the following:
ConnectionString = "Data Source=/Applications/MAMP/tmp/mysql/mysql.sock;Protocol=unix;Database=osdb;User ID=osuser;Password=mySecPW;Old Guids=true;"
Additional InformationThis is the stack trace produced:

[SERVICE BASE]: Failed to load plugin OpenSim.Region.Framework.Interfaces.ISimulationDataStore from OpenSim.Data.MySQL.dll with args Data Source=/Applications/MAMP/tmp/mysql/mysql.sock;Protocol=unix;Database=osdb;User ID=osuser;Password=mySecPW;Old Guids=true;System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. ---> System.Net.Sockets.SocketException: Could not resolve host '/Applications/MAMP/tmp/mysql/mysql.sock'
  at System.Net.Dns.Error_11001 (System.String hostName) <0x30ff4b0 + 0x0006b> in <filename unknown>:0
  at System.Net.Dns.GetHostByName (System.String hostName) <0x30fd608 + 0x00057> in <filename unknown>:0
  at System.Net.Dns.GetHostEntry (System.String hostNameOrAddress) <0x30fd478 + 0x0008b> in <filename unknown>:0
  at MySql.Data.Common.MyNetworkStream.GetHostEntry (System.String hostname) <0x30fbdc8 + 0x0002b> in <filename unknown>:0
  at MySql.Data.Common.MyNetworkStream.CreateStream (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings, Boolean unix) <0x30fbc50 + 0x0003f> in <filename unknown>:0
  at MySql.Data.Common.StreamCreator.GetUnixSocketStream (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings) <0x30fbb88 + 0x00027> in <filename unknown>:0
  at MySql.Data.Common.StreamCreator.GetStream (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings) <0x30fba28 + 0x0004b> in <filename unknown>:0
  at MySql.Data.MySqlClient.NativeDriver.Open () <0x30fb000 + 0x00027> in <filename unknown>:0
  --- End of inner exception stack trace ---
  at MySql.Data.MySqlClient.NativeDriver.Open () <0x30fb000 + 0x000f3> in <filename unknown>:0
  at MySql.Data.MySqlClient.Driver.Open () <0x2e45850 + 0x00039> in <filename unknown>:0
  at MySql.Data.MySqlClient.Driver.Create (MySql.Data.MySqlClient.MySqlConnectionStringBuilder settings) <0x2e41770 + 0x00136> in <filename unknown>:0
  --- End of inner exception stack trace ---
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) <0x1a56c50 + 0x0007b> in <filename unknown>:0
  at System.Reflection.MonoCMethod.DoInvoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) <0x1a56ae0 + 0x000c6> in <filename unknown>:0
  at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) <0x1a56d00 + 0x00041> in <filename unknown>:0
  at System.RuntimeType.CreateInstanceImpl (BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Threading.StackCrawlMark& stackMark) <0x1887740 + 0x00549> in <filename unknown>:0
TagsNo tags attached.
Git Revision or version number52d4cf692caf4907e22089733fea080a081e3233
Run ModeStandalone (1 Region)
Physics EngineBulletSim
EnvironmentMono / OSX
Mono VersionOther
Viewer
Attached Files

- Relationships

-  Notes
(0032231)
UbitUmarov (administrator)
2017-08-01 05:34

.NET MySql Connector to v 6.9.9 is the most recent version that still supports servers 5.0
https://dev.mysql.com/doc/connector-net/en/connector-net-versions.html [^]
and from bug report you show, is not clear 6.10 did fix it.
at this point, you can use another version, either the one provided in 0.8.2 or
one from: https://dev.mysql.com/downloads/connector/net/ [^]
(0032232)
colosi (reporter)
2017-08-01 11:53

I switched to using a tcp port on localhost, so this is working for me now; but I wanted it documented in case anyone else runs into it. Now that I've found workaround and you've mentioned another, I'll lower the priority. Hopefully, at some point, they'll release a new version where this is fixed and we can upgrade then. Nothing to do until then.

- Issue History
Date Modified Username Field Change
2017-07-31 17:07 colosi New Issue
2017-07-31 17:47 colosi Git Revision or version number => 52d4cf692caf4907e22089733fea080a081e3233
2017-07-31 17:47 colosi Priority low => normal
2017-08-01 05:34 UbitUmarov Note Added: 0032231
2017-08-01 11:53 colosi Note Added: 0032232
2017-08-01 11:54 colosi Priority normal => none
2017-08-01 11:54 colosi Resolution open => not fixable


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker