"Socket Error # 10054 Connection reset by peer" error in TidHTTPServer

I have been playing around with TidHTTPServer from Indy 10.5.8.0  (supplied 
with RAD XE2).

     I am not using any IO handlers, nor am I assigning a stream to 
Response.ContentStream.  I am just returning some text back in 
Response.ContentText.  I am Using IE 8.0 as my web browser, everything works 
fine until I close the browser, then I get the exception EIdSocketError 
"Socket Error#10054 Connection Reset By Peer."  If I click on continue, the 
program continues to execute.  The curious thing though,  the exception only 
throws when I close the Browser with my server's page being the only page 
being loaded up.  If I have another web page loaded in another tab, I 
receive no error when I close out my server's page, and no error when I 
close the browser.
    I would welcome any suggestions on how to trap or prevent this exception 
from occurring.  I read the earlier thread from back in September between 
Remy and Mirco Malagoli, but not sure where to insert a try-catch block at. 
I tried using the OnException event, but execution never got there.
0
David
9/27/2011 5:58:44 PM
embarcadero.cppbuilder.socket 566 articles. 0 followers. Follow

3 Replies
1610 Views

Similar Articles

[PageSpeed] 52

"David Pratt" <djp32563@yahoo.com> wrote in message 
news:405548@forums.embarcadero.com...

> I am Using IE 8.0 as my web browser, everything works fine
> until I close the browser, then I get the exception EIdSocketError "Socket 
> Error#10054 Connection Reset By Peer."

That is perfectly normal behavior.  Let TIdHTTPServer handle the exception 
internally for you.  Just because an exception is raised does not mean an 
error occured.  Indy uses exceptions extensively for intenral notifications 
as well as errors.

> If I click on continue, the program continues to execute.

Exactly, so do not worry about it.  You are only seeing the exception 
because you are running inside the debugger.  You will not see the exception 
when running outside of it.

> The curious thing though,  the exception only throws when I
> close the Browser with my server's page being the only page
> being loaded up.  If I have another web page loaded in another
> tab, I receive no error when I close out my server's page, and
> no error when I close the browser.

How the browser decides to close its connections is its own choice.  The 
fact that you are getting a socket error code simply means the browser is 
not closing the connection as gracefully as it should be, that's all.

>    I would welcome any suggestions on how to trap or prevent
> this exception from occurring.

You don't need to at all.  It is normal behavior from TIdHTTPServer's 
perspective.

-- 
Remy Lebeau (TeamB)
0
Remy
9/28/2011 12:09:38 AM
I Had the same issue. It seems to appear when I'm behind some kind of firewall.
I just set the passive property to TRUE and... voila. works flawlessly
Hope it works


> {quote:title=David Pratt wrote:}{quote}
> I have been playing around with TidHTTPServer from Indy 10.5.8.0  (supplied 
> with RAD XE2).
> 
>      I am not using any IO handlers, nor am I assigning a stream to 
> Response.ContentStream.  I am just returning some text back in 
> Response.ContentText.  I am Using IE 8.0 as my web browser, everything works 
> fine until I close the browser, then I get the exception EIdSocketError 
> "Socket Error#10054 Connection Reset By Peer."  If I click on continue, the 
> program continues to execute.  The curious thing though,  the exception only 
> throws when I close the Browser with my server's page being the only page 
> being loaded up.  If I have another web page loaded in another tab, I 
> receive no error when I close out my server's page, and no error when I 
> close the browser.
>     I would welcome any suggestions on how to trap or prevent this exception 
> from occurring.  I read the earlier thread from back in September between 
> Remy and Mirco Malagoli, but not sure where to insert a try-catch block at. 
> I tried using the OnException event, but execution never got there.
0
Manuel
8/9/2013 2:24:21 AM
Manuel wrote:

> I Had the same issue. It seems to appear when I'm behind some
> kind of firewall. I just set the passive property to TRUE and... voila.
> works flawlessly

There is no Passive property in TIdHTTPServer.  You are probably thinking 
of TIdFTP instead.

--
Remy Lebeau (TeamB)
0
Remy
8/9/2013 2:49:10 AM
Reply:

Similar Artilces:

Delphi XE HTTP: error "Socket Error #10054 Connection reset by peer" [Edit]
Communication type is set to HTTP, LifeCycle is set to Invocation. Invocation represents a stateless connection, but when the network connection drops, the client throws the error "Socket Error #10054 Connection reset by peer". Are there any other properties to set up apart from LifeCycle? Hi Irina, > Communication type is set to HTTP, LifeCycle is set to Invocation. > > Invocation represents a stateless connection, but when the network connection drops, the client throws the error "Socket Error #10054 Connection reset by peer". Are there any other proper...

Trial run test failed with Error "IO::Socket::INET: connect: A socket operation is already in progress."
Dear, I'm a newbie of perl-ldap. After the module Net::LDAP 0.32 had been = installed successfully, I downloaded a testing script from the = search.cpan.org example: [Quote] #!/usr/bin/perl -w use Net::LDAP; $ldap =3D Net::LDAP->new ( "ldap.bigfoot.com" ) or die "$@"; $userToAuthenticate =3D "scott"; $passwd =3D "123456"; $mesg =3D $ldap->bind ( version =3D> 3 ); # use for searches $mesg =3D $ldap->bind ( "$userToAuthenticate", =09 password =3D> "$passwd"...

upgrade error:"CONNECTIVITY ERROR:DB-Library: "SQL Server connection timed out."
PLEASE HELP OH WISE SYBASE GURUS! upgrading 11.9.2 to 12.0. unloaded software. rebooted server. selected "upgrade server" in Configure Sybase Servers window. typed in sa password. got "CONNECTIVITY ERROR: DB-Library: "SQL Server connection timed out." -- Chuck Boyce chuck_boyce@operamail.com http://www.geocities.com/chuck_boyce_jr/ Yahoo Messenger ID: chuck_boyce_jr http://messenger.yahoo.com AOL Instant Messenger ID: sg95m476 http://www.aol.com/aim/ ICQ Messenger ID: 41449031 http://www.icq.com ...

"Unknown socket failure" error when using "send/retrieve"
Setup my GW 7 client to work with a gmail POP3 server. When I hit "Send Retrieve mail", I get the following: 12:03:29 Send/Retrieve OBI Test 12:03:51 Unknown socket failure Please help. Aablaev, It appears that in the past few days you have not received a response to your posting. That concerns us, and has triggered this automated reply. Has your problem been resolved? If not, you might try one of the following options: - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp - Check all of the other support tools and options avail...

Datasnap "connection reset by peer" error on iOS?
Hi, i use 3 tier application on iOS. iOS client, windows server and SQL server. i use datasnap tcp/ip for client-server connection. Everything good but after program goes to background, connection broken and iOS application gives "connection reset by peer" error. How could i solve this? - is there a way detect application goes to background? - is there a way detect connection broken and reconnect without gives an error? Thanks. ...

Socket Error #10054. Connection reset by peer.
Hello I use Intraweb Ultimate 12.2.8 with Delphi XE2 Update 4. Not always but mostly I get an Exception EIdSocket Error when I show a new IWForm (or going back to the existing). Text: Socket Error #10054. Connection reset by peer. I'm not sure where to look. I write a database application with Oracle and Odac components from DevArts and I use also TMS Intraweb components. Any Idea how I can find out ? Thank you Christian > {quote:title=Christian Bugge wrote:}{quote} > Hello > I use Intraweb Ultimate 12.2.8 with Delphi XE2 Update 4. > > Not always but mostly I get an Exception EIdSocket Error when I show a > new IWForm (or going back to the existing). > Text: > Socket Error #10054. Connection reset by peer. > > I'm not sure where to look. I write a database application with Oracle > and Odac components from DevArts and I use also TMS Intraweb components. > > Any Idea how I can find out ? > > Thank you > Christian I guess you only receive this exception when debugging inside Delphi IDE? If so, please read this article: http://www.swissdelphicenter.ch/en/showarticle.php?id=1 This is the same "non issue". It is a normal exception raised by Indy library, but it is treated and should be ignored. Best regards >> {quote:title=Christian Bugge wrote:}{quote} >> Hello >> I use Intraweb Ultimate 12.2.8 with Delphi XE2 Update 4. >> >> No...

Delphi XE2, datasnap "Socket error 10061 connection refused"?
I cannot get it a datasnap application to work when a server app is installed on another Windows computer. It works fine on the when both client and server run on the same system. I have opened the port I am using in the Firewall on both computers. Any ideas? Thank you, Andre Hi Andrzej, > I cannot get it a datasnap application to work when > a server app is installed on another Windows computer. > It works fine on the when both client and server run on > the same system. I have opened the port I am using > in the Firewall on both computers. Which protocol a...

"Socket error # 10061 Connection refused" in a Firemonkey Android app
Goodmorning everybody, I'm developping a Client/Server Android (version 4.1) application with Delphi XE5 and Indy Componant v10.6 When I run the app on the tablet, the IdTCPServer is correctly activated (see the server code below) but when I try to reach it from the PC app with an IdTCPClient (see the client code below), I get this exception "Socket error # 10061 Connection refused" !!! SERVER CODE (running on the tablet) Server.Bindings.Add.IPVersion:=Id_IPv4; Server.DefaultPort:=9000; Server.Active:=true; CLIENT CODE (running on PC) Client.Host:='192.168.241.101'; Client.Port:=9000; Client.Connect; Client.IOHandler.WriteLn(msg); Client.Disconnect; I tried THE SAME server code in a Desktop app and it works fine ! when I connect the client no exception is raised from the Client PC; I get an exception when i try to connect the Client PC to the Server Tablet. Any help please ? Thanks in advence. KAABECHE wrote: > When I run the app on the tablet, the IdTCPServer is correctly > activated (see the server code below) but when I try to reach it > from the PC app with an IdTCPClient (see the client code below), > I get this exception "Socket error # 10061 Connection refused" !!! Does the server app have the INTERNET permission assigned? Are you sure the tablet's Internet connection has 192.168.241.101 assigned to it? Is the tablet connected to your LAN using USB, WiFi or Bluetooth? -- Rem...

Handling Indy10 exceptions
Hi there everyone, I am using Indy10 TCP Server/Client and I'm thinking of a way to handle an exception of type socket error #10054 - connection reset by peer. This sort of error can happen accidentally for example if the client computer experiences a sudden power failure or the client program is "killed" in the Task Manager. Server side, I have a listview that shows all connected clients. So whenever a socket error #10054 happens, the server MUST remove the client from the listview and return the client's database connection to a connection pool. That is what I've ...

"Error Group: WINSOCK" "Error Code:11004"
Hi Just setup iPrint on the server and tried to install the printer to the laptop and got the following message: Error code:11004 Error message: Winsock 11004 - The DNS name has been found in the database, but its associated data is not correct. Error group: WINSOCK Error code:11004 Anyone know what associated data it is referring to? Thanks in advance -- iangh2 A quick Google found this on http://www.sockets.com/err_lst1.htm WSANO_DATA (11004) Valid name, no data record of requested type Berkeley description: The requested name is valid, but does not hav...

"client socket shut down" error
Hi all, i have a database transaction that is failing on the client side intermittently in our application, so far only at one point in the code. at the times when this occurs, the following message can be seen in DBConsole: Connection terminated abnormally; client socket shut down Disconnected TCPIP client's AppInfo: HOST=CSM;OS=Windows XP Build 2600 Service Pack 2;PID=0xbb8;THREAD=0xbbc;... the error comes with 3 minutes of the last successful update using the same database connnection. The error appears to be triggered when the code attempts to re-use an existing P...

Error when connect to openLDAP "Unknown error (0x80005000)"
 am getting  fallowing Error when connect to openLDAP.. Any Idea?   string ldapPath = "ldap://localhost/ou=people,dc=guest,dc=org"; string filter = "(ObjectClass=*)"; DirectoryEntry de = new DirectoryEntry(ldapPath,"cn=XXX,dc=guest,dc=org","xxxx",AuthenticationTypes.None); using (DirectorySearcher searcher = new DirectorySearcher()) { searcher.SearchRoot = de; searcher.Filter = filter; searcher.ReferralChasing = ReferralChasingOption.All; searcher.SearchScope = SearchScope.Subtree; SearchResultCollection results = searcher.FindAll(); I a...

"Error establishing an encrypted connection. Error code -5891"
Why do I get this frequently when trying to access secure sites? If I use Opera or even IE, I connect just fine. I am using FF v. 1.5.0.4 build 2006050817. I have "Use TSL 1.0", "Use SSL 2.0" and "Use SSL 3.0" all checked in my options. Am I doing or not doing something to cause this? Thank you, BP On Thu, 15 Jun 2006 11:24:36 -0400, BP, That's Me! wrote: >Why do I get this frequently when trying to access secure sites? If I >use Opera or even IE, I connect just fine. > >I am using FF v. 1.5.0.4 build 2006050817. > >I ...

[PAClient Error] Error: E0009 Socket Error # 10054
I'm running Windows 7 using Fusion 5 on a Macbook Pro (OSX Maveric). I have recently been able to run and debug to my iPhone and to the iOS Simulator. When returning to my projects I'm no longer able to deploy my projects. (Only changes may be some updates to Windows 7). The Connection to the PAServer is successful and deploying a test project directly from XCode also works. The deployment stops at MyProject.dSYM. In fact Delphi deploys all files except MyProject.dSYM and MyProject if unchecked in the Deployment manager. What am I missing Br Petter It turned out tha...

"Error on page" error?
Hello, I have recently set up Webaccess and it seems mostly to behave ok, at least when accessing it internally (on the LAN) but when accessed remotely, two things occur: Sometimes, when clicking on any of the links, I will get a "page not found" error. Then if I reload the page, it will load quite happily. The more annoying thing, though, is when I click on "Compose ...", Search Address Books" or "Search in Mailbox" I get a message on the status bar that says "Error on page" and nothing loads. I found nothing in the KB on this one...

"submit" to Access DB returns "connection closed"error
The error when I submit data  is as follows: Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.Source Error: Line 17: Dim comDatabase As New System.Data.OleDb.OleDbCommand(strSQL, conDatabase) Line 18: Line 19: comDatabase.ExecuteNonQuery() Line 20:...

[wxperl-users] From whence "Wx::App Error" "Fatal error: exiting"?
This is a multi-part message in MIME format. ------_=_NextPart_001_01C48798.98A9B782 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I tried to send this message some months ago (early May), but for some reason at that time I was unable to send to the wxPerl mailing list. It seems to be working now, so . . . I'm stumbling around trying to find a single, fail-free method for exiting a running wxPerl app that may or may not have open frames. The Perl functions "exit" and "die" seem vulnerable to problem...

when i log in, i get the "An error has occurred while establishing a connection to the server" error.
My website online but when i enter log in details I get the following page.    Server Error in '/' Application. An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more in...

Sub Partition that reports "ERROR: Could not connect to server,Error : -602"
I have a Sub Partition that reports "ERROR: Could not connect to server, Error : -602". Funny thing is one server reports three errors and two other only report one error. The servers not seen (connected to) are in other sub partitions of the Root. Basically I have a Root Partition and four Sub Partitions to the Root. ************************************************************************** NetWare DSRepair 10550.93. DS.NLM 10552.79 Tree name: MYTREE_NAME Server name: .LAUNCHPAD.MYOUNAME.MYONAME NetWare 1602.00 Directory Services Repair 1...

Http/OpenSSL "EIdSocketError Socket Error # 0"
I'm using TIdHttp and TIdSSLIOHandlerSocketOpenSSL to get a a few results from a website, but after upgrading from Indy#10.2.52 to the latest tiburon release i'm getting a "EIdSocketError Socket Error # 0" after the tidhttp code "if not Response.KeepAlive then Disconnect;" I traced it back to a changed TIdSSLSocket.Recv and TIdSSLSocket.Send. Both now return a -1 if it wasn't a OPENSSL_SSL_ERROR_ZERO_RETURN. I replaced the -1 with the real error and that did solve my problem but i have no idea why it was there in the first place. Remy, could you chec...

FDMonitor.exe: Socket Errors and "Encounter EOF"
Hi! We use Delphi XE5. I have a few questions. a) We are facing lot of troubles with the FDMonitor utility. We Think it's a great tool for working and we need it. We did everything, following the documentation, for the SQl Monitor starts to working normally. It works. May be in the future, FDmonitor.exe be an internal component with events for using with applications. While we are tracing, we have frecuent errors like this: ESocketError Windows socket error: an existing connection was forcible closed by the remote host (10054), on API 'send' After that,...

Get "connection was reset" error on FT.com
Name: David Rademeyer Email: daviddotrademeyeratdukedotedu Product: Gran Paradiso Summary: Get "connection was reset" error on FT.com Comments: Every time I try to read stories on FT.com, I get a "The connection was reset" error page. This does not happen on any other website, or even on the front page(s). I started getting this error in Firefox 2, which is why I tried out Gran Paradiso, but now it's started again. Clearing cache, etc, or restarting Firefox do not fix the problem. Browser Details: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-...

How to Solve "The underlying connection was closed: An unexpected error occurred on a receive." Error
Hi When i want to invoke a web service method the Error happen and it says "The underlying connection was closed: An unexpected error occurred on a receive." I search on this and someone suggest to use webRequest.KeepAlive = False in GetWebRequest override method and i write this code in my refrence.vb file Protected Overrides Function GetWebRequest(ByVal uri As Uri) As System.Net.WebRequest Dim webRequest As System.Net.HttpWebRequest = MyBase.GetWebRequest(uri) webRequest.KeepAlive = False webRequest.ProtocolVersio...

superreview requested: [Bug 390160] "Out of memory" and " Nothing active on context" errors in Error console
Blake Kaplan <mrbkap@gmail.com> has asked Brendan Eich <brendan@mozilla.org> for superreview: Bug 390160: "Out of memory" and "Nothing active on context" errors in Error console https://bugzilla.mozilla.org/show_bug.cgi?id=390160 Attachment 274726: Proposed fix https://bugzilla.mozilla.org/attachment.cgi?id=274726&action=edit ------- Additional Comments from Blake Kaplan <mrbkap@gmail.com> This patch should fix this bug by not calling JS_GetScopeChain if there's no JS on the stack. ...

Web resources about - "Socket Error # 10054 Connection reset by peer" error in TidHTTPServer - embarcadero.cppbuilder.socket

Resources last updated: 2/21/2016 12:09:41 PM