Tech Off Thread

35 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Conenction forcibly closed? SQL 2005

Back to Forum: Tech Off
  • User profile image
    qwert231

    Why are my customers getting this error?
    System.Data.SqlClient.SqlException: A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

  • User profile image
    qwert231

    Yea... jitters, this whole job gives me jitters.

    What are some ways we can cut these down from 10 times a day to maybe 1 or 2 times a day.

  • User profile image
    John Galt

    My solution, because this happens all of the time with Norton or Macaffee installed on machines was to put a try catch on all database commands and then retry the command if I get this error (there is a specific SQL Error that you can catch.)

    Not pretty, but it works... OR just uninstall the virus that is Norton and Macaffee and goto AVG which doesnt' screw with your tcpip stack and use Windows defender and the built in firewall in XP which is a hell of a lot easier.

  • User profile image
    W3bbo

    qwert231 wrote:
    Yea... jitters, this whole job gives me jitters.

    What are some ways we can cut these down from 10 times a day to maybe 1 or 2 times a day.


    I'm no expert on SQL Server connectivity, but tried using named pipes instead?

  • User profile image
    qwert231

    I thought Named Pipes was only for apps on the same server. However, I have turned on Named Pipes.

    (No apps other than SQL run on this server.)

  • User profile image
    qwert231

    System.Data.SqlClient.SqlException: A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
     
    System.Data.SqlClient.SqlException: A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)


    More errors. Could this be due to a cheap network hub between the computers?

  • User profile image
    phreaks

    qwert231 wrote:
    
    System.Data.SqlClient.SqlException: A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
     
    System.Data.SqlClient.SqlException: A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)


    More errors. Could this be due to a cheap network hub between the computers?


    Neither of the pc's are wireless right?

    Good, had to get that out of the way first.

    Now, on your client machines, you don't have Netware/IPX enabled right? If so, disable them.

    Have you updated the NIC drivers?

    Have you explicitly set the transport in the connection string?
    http://support.microsoft.com/kb/q238949/

    try those.

  • User profile image
    W3bbo

    qwert231 wrote:
    
    System.Data.SqlClient.SqlException: A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
     
    System.Data.SqlClient.SqlException: A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)


    More errors. Could this be due to a cheap network hub between the computers?


    SQL Server 2005 Express limitation?

    As for the cheap network hub...y'never know, but why are you using a hub in the first place? Swap it for a decent (gigabit) switch, you'll certainly get an improvement, regardless of wether it fixes these TCP issues or not.

  • User profile image
    Pace

    I second webbo on this one...

    Hubs are dinosaurs that should be extinct by this time... 

    Im a SQL dba/dev and given this situation the server config is the last thing I would touch as you do know it works. Its just not reliable which to me would point elsewhere, I would start with the hardware.

  • User profile image
    qwert231

    Swapping for a Gigabit switch today. We'll see if that helps.

  • User profile image
    Dr Herbie

    qwert231 wrote:
    Why are my customers getting this error?
    System.Data.SqlClient.SqlException: A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)


    What a coincidence -- we're getting this too, on Windows2000 and SQLServer 2000.

    We haven't got to the bottom of it yet, if we do I'll post our cure.

    Customer's network monitoring software doesn't report any errors.  Database is running in a cluster.
    Some references found from Googling to failover handling causing this error for connectrion pools.
    No evidence of failover occurring.
    Some references found from Googling to overloaded servers causing this error.
    Some references found to DNS attack prevention in Windows Server 2003 (obscure registry setting requires change to switch it off).

    It's kept two of us busy for most of today.

    Herbie

  • User profile image
    blowdart

    qwert231 wrote:
    Why are my customers getting this error?
    System.Data.SqlClient.SqlException: A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)


    Generic TCP error I'm afraid, not a SQL problem. Sounds like connectivity jitters.

  • User profile image
    qwert231

    Ok, Status update.

    Still have these issues.

    Here's what we tried so far:
    Swapped the hub for a gigabit switch.
    Turned off Autoclose. (This was causing the server to do a CheckDB once an hour, and the SQL log also showed 'DBXXX starting...' several times a minute.

    And yet, we still get these errors.

    Neither is wire-less. We're using TCP transport only because we are going over the network.

  • User profile image
    blowdart

    qwert231 wrote:
    

    Neither is wire-less. We're using TCP transport only because we are going over the network.


    Anything useful in the SQL log or event log on the sever?

    What happens if you telnet to port 1433 on the server?

  • User profile image
    qwert231

    I've got no messages in the SQL Server log since it was started. (We rebooted today about noon.)

    I go to command prompt and do:

    telnet 192.168.0.250 1433 and get a black screen with a blinking cursor.

  • User profile image
    blowdart

    qwert231 wrote:
    

    I've got no messages in the SQL Server log since it was started. (We rebooted today about noon.)

    I go to command prompt and do:

    telnet 192.168.0.250 1433 and get a black screen with a blinking cursor.



    Well the connection is there then, it will time out eventually. Any software firewalls in the way? Or weird routing?

  • User profile image
    qwert231

    Routing... hmm....
    K... we have a switch. We have 4 plugs into the switch. The PIX firewall, 2 from the webserver (on of those has the IP our FTP site looks for, one has the IP our site looks for), and the 4th is the SQL server.

  • User profile image
    blowdart

    qwert231 wrote:
    Routing... hmm....
    K... we have a switch. We have 4 plugs into the switch. The PIX firewall, 2 from the webserver (on of those has the IP our FTP site looks for, one has the IP our site looks for), and the 4th is the SQL server.


    Nothing weird there, and the route isn't going through the PIX either.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.