We had a customer call up that encountered a problem when trying to create a new database for their Report Server through the Reporting Services Configuration Manager. This is what they saw:
When we clicked on the Error link, we saw the following details:
System.Net.Sockets.SocketException: No such host is known
at System.Net.Dns.GetAddrInfo(String name)
at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
at ReportServicesConfigUI.RSDatabase.IsLocalDbServer(String dbServer)
The server name that we had specified was in the format of SERVER,PORT. The reason was because there was a firewall in between the Report Server and the Database server. The Database server was a Named Instance and UDP 1434 was being blocked which is the port for SQL Browser. We use SQL Browser to convert the Named Instance name to the actual Port number, or named pipe, of the Named Instance. With SQL Browser not available, we have to specify the actual port number so that we can connect to the database.
From the screenshot above, it looks like we were able to connect to the database as “Running database script” was successful. Also the “Test Connection” button on the Database Server part of the wizard connected successfully. So, we got a dump of the error to see what was happening.
The first thing I did when I opened the dump was to load the .NET debugging extension that ships with the .NET Framework called SOS.
> .loadby sos mscorwks
You’ll also notice that we are on Thread 9. It put me to that thread automatically because it is a crash dump with a given exception. This makes it easy to find a starting place in your dump.
Next, I wanted to see if the exception in this dump matches what we saw in the Configuration Manager. We can do this by calling !printexception which will print the exception on the given thread you are on. You can also specify an address for the actual exception.
Exception object: 02a12c44
Exception type: System.Net.Sockets.SocketException
Message: No such host is known
So, this is our guy. Our call stack at this point is pretty much what we saw in the Exception Details within the Configuration Manager.
We see RSDatabase at the bottom which matches my IsLocalDbServer method call. We then see the raw string followed by the SocketException if we work our way up. Reviewing the IsLocalDbServer method, it does indeed not parse the string for the server name/port.
So, if you run into this exception, you may want to check what you are passing as your Server name. You will not be able to specify a port.
Adam W. Saxton | Microsoft SQL Server Escalation Services