Building a .NET4 app with RavenDB using Mono 2.10.8. When I try to do anything with an embedded document store on OSX, I get the following exception:
System.NotSupportedException: This platform is not supported
at System.Net.NetworkInformation.IPGlobalProperties.GetIPGlobalProperties () [0x00000] in <filename unknown>:0
at Raven.Database.Util.PortUtil.FindPort () [0x00000] in <filename unknown>:0
at Raven.Database.Util.PortUtil.GetPort (System.String portStr) [0x00000] in <filename unknown>:0
at Raven.Database.Config.InMemoryRavenConfiguration.Initialize () [0x00000] in <filename unknown>:0
at Raven.Database.Config.RavenConfiguration.LoadConfigurationAndInitialize (IEnumerable`1 values) [0x00000] in <filename unknown>:0
at Raven.Database.Config.RavenConfiguration..ctor () [0x00000] in <filename unknown>:0
at Raven.Client.Embedded.EmbeddableDocumentStore.get_Configuration () [0x00000] in <filename unknown>:0
Coming from the first place I try to open the embedded store and use it. I’ve looked at the source for the Mono implementation of IPGlobalProperties.GetIPGlobalProperties() and found:
public static IPGlobalProperties GetIPGlobalProperties ()
{
PlatformID platform = Environment.OSVersion.Platform;
if (platform != PlatformID.Unix)
{
return new Win32IPGlobalProperties();
}
if (Directory.Exists ("/proc"))
{
MibIPGlobalProperties mibIPGlobalProperties = new MibIPGlobalProperties ("/proc");
if (File.Exists (mibIPGlobalProperties.StatisticsFile))
{
return mibIPGlobalProperties;
}
}
if (Directory.Exists ("/usr/compat/linux/proc"))
{
MibIPGlobalProperties mibIPGlobalProperties = new MibIPGlobalProperties ("/usr/compat/linux/proc");
if (File.Exists (mibIPGlobalProperties.StatisticsFile))
{
return mibIPGlobalProperties;
}
}
throw new NotSupportedException ("This platform is not supported");
}
Now, I’m still learning the ins and outs of OSX system configuration (I’ve been a Windows guy my whole life), but I am pretty sure I haven’t done anything stupid to my system configuration. Which tells me that either this will never work on OSX in the current implementation of Mono, or I’ve got a big blind spot. The latter seems more likely, so help me out 🙂
If you’ll explicitly specify a port, you’ll be able to move beyond that, the default port is *, which means “find me one that is open”. Specify 8080 and see if this helps. Note that we aren’t supporting RavenDB Embedded on Mac.
You can run the RavenDB client on the Mac, though.