Network Error: a connection attempt failed

Network Error: a connection attempt failed

Postby newen76 » Fri 15 Aug 2008 18:27

I am getting an itermittent network error when using the OraDirect connection in Direct mode. The error I recieve is Network error: a connection attempt failed because the party did not properly respond after a period of time, or established connection failed to respond. I am able to ping the IP and also am able to Telnet when this error occurs. Like I said it works sometimes and I get this error other times. Any help would be greatly appreciated.

Thanks,
Nick
newen76
 
Posts: 3
Joined: Fri 15 Aug 2008 18:10

Re: Network Error: a connection attempt failed

Postby Daniel Dean » Mon 18 Aug 2008 09:16

newen76 wrote:I am getting an itermittent network error when using the OraDirect connection in Direct mode. The error I recieve is Network error: a connection attempt failed because the party did not properly respond after a period of time, or established connection failed to respond. I am able to ping the IP and also am able to Telnet when this error occurs. Like I said it works sometimes and I get this error other times. Any help would be greatly appreciated.

Thanks,
Nick


Hey man,
I had the same problem once, it had smth. 2 do with my network settings. :roll: What's your studio's version (2k5 or 2k8?) and Oracle's client/server? How do u wright server's name in "source->server": is it IP address or simply a server's name? (Might need 2 try both). What's your network type? Is it local? What's your Operating system? etc.... :p Plus it might also accure due to firewall settings (my friend once had smth. to do with that issue).
As a suggestion I'd recomnd you to read help documentation (switch to "index" and enter: "OracleConnection.Direct property" string) it might help in some way...
GL!
Daniel Dean
Devart Team
 
Posts: 6
Joined: Mon 18 Aug 2008 07:21

Postby Shalex » Tue 19 Aug 2008 08:01

Our advice is to try this ping procedure. It creates simple connection using .NET functions. It is considered if the procedure doesn't work there are network problems or it's something wrong with your computer settings.

private void Ping(string host, int port) {

if (host.Length == 0 || port == 0) {
MessageBox.Show("Hostname or port was not specified", "CoreLab Ping demo");
return;
}

TcpClient client = new TcpClient();

try {
tbLog.Text += string.Format("---------\r\nConnecting to '{0}:{1}'...\r\n", host, port);

if (Regex.IsMatch(host + ".", @"^(([0-9]){1,3}\.){4}$")) {
IPAddress ipAddress = IPAddress.Parse(host);
client.Connect(ipAddress, port);
}
else
client.Connect(host, port);

MessageBox.Show("Ready to check connection.\r\nWait few seconds and press 'OK' to ping the selected host.", "CoreLab Ping demo");
Application.DoEvents();
tbLog.Text += "Sending ping...\r\n";
client.GetStream().WriteByte(255);
client.GetStream().Flush();
tbLog.Text += "Connected.\r\n";
}
catch (Exception ex) {
tbLog.Text += "Error occured:\r\n" + ex.Message + "\r\n";
}
finally {
if (client != null)
client.Close();
}

tbLog.SelectionStart = tbLog.Text.Length - 1;
tbLog.ScrollToCaret();
}

private void Form1_Load(object sender, EventArgs e) {

Ping("db", 1521);
}
Shalex
Devart Team
 
Posts: 7344
Joined: Thu 14 Aug 2008 12:44

Postby newen76 » Wed 20 Aug 2008 19:52

Thanks! I will give that a try.
newen76
 
Posts: 3
Joined: Fri 15 Aug 2008 18:10


Return to dotConnect for Oracle