occasional "The requested name is valid, but no data of the requested type was found"

M

martin

Hello,
Could someone here please explain the reason for the error in the
subject (the full error below)
I dont get this everytime and i've never gotten while debugging. The
code (also below)
which causes this is part of an ftp application (the guts of which i
got from some shared code)
that is scheduled to execute nightly.
Sometimes it will run for a few nights in a row without any problems
other times it just fails with that error. Please help.

Full error:

System.Net.Sockets.SocketException: The requested name is valid, but
no data of the requested type was found at
System.Net.Dns.GetHostByName(String hostName) at
System.Net.Dns.Resolve(String hostName) at
SenecaFTP.FtpClient.Login()

Offending code:

this.clientSocket = new
Socket( AddressFamily.InterNetwork,SocketType.Stream,
ProtocolType.Tcp );
addr = Dns.Resolve(this.server).AddressList[0]; -- failure point.
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

It seems an error with the Resolver. I have never seen this error before (I
do have several similar nightly jobs).

Why dont you do a search in a networking NG ;it does not have to be of .NET
I bet that this error comes from the unmanaged side.
 
T

Tom Spink

martin said:
Hello,
Could someone here please explain the reason for the error in the
subject (the full error below)
I dont get this everytime and i've never gotten while debugging. The
code (also below)
which causes this is part of an ftp application (the guts of which i
got from some shared code)
that is scheduled to execute nightly.
Sometimes it will run for a few nights in a row without any problems
other times it just fails with that error. Please help.

Full error:

System.Net.Sockets.SocketException: The requested name is valid, but
no data of the requested type was found at
System.Net.Dns.GetHostByName(String hostName) at
System.Net.Dns.Resolve(String hostName) at
SenecaFTP.FtpClient.Login()

Offending code:

this.clientSocket = new
Socket( AddressFamily.InterNetwork,SocketType.Stream,
ProtocolType.Tcp );
addr = Dns.Resolve(this.server).AddressList[0]; -- failure point.

Hi,

The error (to me) suggests a DNS resolution problem, i.e. the DNS server was
contacted successfully, but was unable to provide any DNS records for the
host, perhaps because the DNS server is not authoritative for the domain
and no cache records exist, or perhaps an inherent problem with the DNS
server itself.

If you can, try changing your DNS server to something else and run the tests
again.
 
C

Christof Nordiek

martin said:
Hello,
Could someone here please explain the reason for the error in the
subject (the full error below)
Offending code:

this.clientSocket = new
Socket( AddressFamily.InterNetwork,SocketType.Stream,
ProtocolType.Tcp );
addr = Dns.Resolve(this.server).AddressList[0]; -- failure point.

"The requested name is valid,"
I guess this means, the given name is a syntactically correct DNS-name.

"but no data of the requested type was found."
The name couldn't be resolved, because there is no entry in the responsible
DNS-server

Since I guess the server name is configured, and so it is unlikely, that it
can't be resolved occasionally, maybe it is a problem connecting the
DNS-Server.

Christof
 
M

Mustafa Radha

I had the same problem in another context. I was trying to log in to a service hosted at a VPN. I addressed the host by the machine's name, without any suffixes.

The problem appeared to be that although a DNS server was filled in, my machine appended the wrong suffix to the name of the server.

So if you're logging into a lan/vpn:

-make sure to have a local dns server available
-make sure you append the right suffix or configure your VPN connection to do it for you



martin wrote:

occasional "The requested name is valid, but no data of the requested type was found"
25-Jun-07

Hello
Could someone here please explain the reason for the error in th
subject (the full error below
I dont get this everytime and i've never gotten while debugging. Th
code (also below
which causes this is part of an ftp application (the guts of which
got from some shared code
that is scheduled to execute nightly
Sometimes it will run for a few nights in a row without any problem
other times it just fails with that error. Please help

Full error

System.Net.Sockets.SocketException: The requested name is valid, bu
no data of the requested type was found a
System.Net.Dns.GetHostByName(String hostName) a
System.Net.Dns.Resolve(String hostName) a
SenecaFTP.FtpClient.Login(

Offending code

this.clientSocket = ne
Socket( AddressFamily.InterNetwork,SocketType.Stream
ProtocolType.Tcp )
addr = Dns.Resolve(this.server).AddressList[0]; -- failure point.

Previous Posts In This Thread:

occasional "The requested name is valid, but no data of the requested type was found"
Hello
Could someone here please explain the reason for the error in th
subject (the full error below
I dont get this everytime and i've never gotten while debugging. Th
code (also below
which causes this is part of an ftp application (the guts of which
got from some shared code
that is scheduled to execute nightly
Sometimes it will run for a few nights in a row without any problem
other times it just fails with that error. Please help

Full error

System.Net.Sockets.SocketException: The requested name is valid, bu
no data of the requested type was found a
System.Net.Dns.GetHostByName(String hostName) a
System.Net.Dns.Resolve(String hostName) a
SenecaFTP.FtpClient.Login(

Offending code

this.clientSocket = ne
Socket( AddressFamily.InterNetwork,SocketType.Stream
ProtocolType.Tcp )
addr = Dns.Resolve(this.server).AddressList[0]; -- failure point.

Hi,It seems an error with the Resolver.
Hi

It seems an error with the Resolver. I have never seen this error before (I
do have several similar nightly jobs)

Why dont you do a search in a networking NG ;it does not have to be of .NET
I bet that this error comes from the unmanaged side


Re: occasional "The requested name is valid, but no data of the requested type was found"
martin wrote

Hi

The error (to me) suggests a DNS resolution problem, i.e. the DNS server wa
contacted successfully, but was unable to provide any DNS records for th
host, perhaps because the DNS server is not authoritative for the domai
and no cache records exist, or perhaps an inherent problem with the DN
server itself

If you can, try changing your DNS server to something else and run the test
again

--
Tom Spin
University of Edinburgh

Re: occasional "The requested name is valid, but no data of the requested type was found"
<snip

"The requested name is valid,
I guess this means, the given name is a syntactically correct DNS-name

"but no data of the requested type was found.
The name couldn't be resolved, because there is no entry in the responsible
DNS-server

Since I guess the server name is configured, and so it is unlikely, that it
can't be resolved occasionally, maybe it is a problem connecting the
DNS-Server.

Christof


Submitted via EggHeadCafe - Software Developer Portal of Choice
Migrating to VS.NET 2003: A Developer Perspective
http://www.eggheadcafe.com/tutorial...d8b-dcee506e7531/migrating-to-vsnet-2003.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top