[Mono-bugs] [Bug 82110][Wis] New - TcpChannel constructor throws SocketException with DHCP on Mac OS X
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Jul 16 13:16:41 EDT 2007
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by robert at smallshire.org.uk.
http://bugzilla.ximian.com/show_bug.cgi?id=82110
--- shadow/82110 2007-07-16 13:16:41.000000000 -0400
+++ shadow/82110.tmp.9787 2007-07-16 13:16:41.000000000 -0400
@@ -0,0 +1,56 @@
+Bug#: 82110
+Product: Mono: Class Libraries
+Version: 1.2
+OS: Mac OS X 10.3
+OS Details: Mac OS 10.4 Tiger on Intel Mac Mini
+Status: NEW
+Resolution:
+Severity: Unknown
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: robert at smallshire.org.uk
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: TcpChannel constructor throws SocketException with DHCP on Mac OS X
+
+The following program, which simply constructs a TcpChannel object fails on
+Mono 1.2.4 with a SocketException.
+
+using System.Runtime.Remoting.Channels.Tcp;
+namespace Test {
+ class Program {
+ static void Main(string[] args) {
+ TcpChannel channel = new TcpChannel(1234);
+ }
+ }
+}
+
+Unhandled Exception: System.Net.Sockets.SocketException: No such host is known
+ at System.Net.Dns.hostent_to_IPHostEntry (System.String h_name,
+System.String[] h_aliases, System.String[] h_addrlist) [0x00000]
+ at System.Net.Dns.GetHostByName (System.String hostName) [0x00000]
+ at System.Net.Dns.Resolve (System.String hostName) [0x00000]
+ at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.Init
+(IServerChannelSinkProvider serverSinkProvider) [0x00000]
+ at System.Runtime.Remoting.Channels.Tcp.TcpServerChannel..ctor
+(IDictionary properties, IServerChannelSinkProvider serverSinkProvider)
+[0x00000]
+ at System.Runtime.Remoting.Channels.Tcp.TcpChannel.Init (IDictionary
+properties, IClientChannelSinkProvider clientSink,
+IServerChannelSinkProvider serverSink) [0x00000]
+ at System.Runtime.Remoting.Channels.Tcp.TcpChannel..ctor (Int32 port)
+[0x00000]
+ at TamGeoTest.Program.Main (System.String[] args) [0x00000]
+
+The problem is that GetHostByName fails with 'No such host is known' when
+my Mac is configured to use DHCP. If I add an explicit entry for my
+hostname and IP address into /etc/hosts then it works fine.
+
+Additional information:
+
+The same code works fine on both .NET and Mono on Windows with DHCP
+assigned addresses, and works fine with static IP addresses on the Mac and
+Solaris. DHCP on Solaris was not tested.
More information about the mono-bugs
mailing list