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?
0
Irina
11/16/2010 6:24:12 AM
embarcadero.datasnap 643 articles. 0 followers. Follow

6 Replies
4590 Views

Similar Articles

[PageSpeed] 45

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 properties to set up apart from LifeCycle?

I guess you could set the Connected property of the TSQLConnection 
component to True right before every call, and back to False right 
afterwards.

Are you callling server methods, or using a TDSProviderConnection at the 
client side?

Groetjes,
           Bob Swart

-- 
Bob Swart Training & Consultancy (eBob42.com) Forever Loyal to Delphi
Chairman Delphi Development Network (DDN) powered by SDN - www.sdn.nl
Embarcadero Technology Partner - Delphi & RAD Studio Reseller BeNeLux
http://twitter.com/eBob42 LinkedIn: http://nl.linkedin.com/in/drbob42
Delphi Win32 & .NET books on Lulu.com: http://stores.lulu.com/drbob42
Personal courseware + e-mail support http://www.ebob42.com/courseware
Blog: http://www.drbob42.com/blog - RSS: http://eBob42.com/weblog.xml
0
Bob
11/16/2010 6:27:06 AM
> I guess you could set the Connected property of the TSQLConnection 
> component to True right before every call, and back to False right 
> afterwards.
> 
> Are you callling server methods, or using a TDSProviderConnection at the 
> client side?

Both. Is there a way to intercept TDSProviderConnection calls via TSQLConnection?
0
Irina
11/16/2010 6:49:01 AM
Hi Irina,

>> Are you callling server methods, or using a TDSProviderConnection at the
>> client side?
>
> Both. Is there a way to intercept TDSProviderConnection calls via TSQLConnection?

If you're using a stateless mode (using PacketRecords property and 
OnBeforeGetRecords events), then you can try to close the TSQLConnection 
in the OnAfterGetRecords. Otherwise, you can close TSQLConnection right 
after you open the TClientDataSet.

Are you using an ISAPI server or a stand-alone HTTP server? I'm not 
seeing the socket error #10054, but would like to know how to 
"reproduce" it, so I can test what to do about it (for my book, which is 
almost finished and should be ready by tomorrow) ;-)

Groetjes,
           Bob Swart

-- 
Bob Swart Training & Consultancy (eBob42.com) Forever Loyal to Delphi
Chairman Delphi Development Network (DDN) powered by SDN - www.sdn.nl
Embarcadero Technology Partner - Delphi & RAD Studio Reseller BeNeLux
http://twitter.com/eBob42 LinkedIn: http://nl.linkedin.com/in/drbob42
Delphi Win32 & .NET books on Lulu.com: http://stores.lulu.com/drbob42
Personal courseware + e-mail support http://www.ebob42.com/courseware
Blog: http://www.drbob42.com/blog - RSS: http://eBob42.com/weblog.xml
0
Bob
11/16/2010 7:24:58 AM
> Are you using an ISAPI server or a stand-alone HTTP server? I'm not 
> seeing the socket error #10054, but would like to know how to 
> "reproduce" it, so I can test what to do about it (for my book, which is 
> almost finished and should be ready by tomorrow) ;-)

Stand-alone HTTP server.
0
Irina
11/17/2010 9:13:35 AM
> 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?

Misconseption. A stateless connection term is related to the server objects creation, not a client/server connection. So basically I can only simulate a client/server stateless connection by connection/disconnection sqlconnection.

Edited by: Irina Kushnirik on Nov 17, 2010 1:23 AM
0
Irina
11/17/2010 9:23:37 AM
Hi Irina,

> A stateless connection term is related to the server objects creation, not a client/server connection. So basically I can only simulate a client/server stateless connection by connection/disconnection sqlconnection.

AFAIK, that's correct.

Groetjes,
           Bob Swart

-- 
Bob Swart Training & Consultancy (eBob42.com) Forever Loyal to Delphi
Chairman Delphi Development Network (DDN) powered by SDN - www.sdn.nl
Embarcadero Technology Partner - Delphi & RAD Studio Reseller BeNeLux
http://twitter.com/eBob42 LinkedIn: http://nl.linkedin.com/in/drbob42
Delphi Win32 & .NET books on Lulu.com: http://stores.lulu.com/drbob42
Personal courseware + e-mail support http://www.ebob42.com/courseware
Blog: http://www.drbob42.com/blog - RSS: http://eBob42.com/weblog.xml
0
Bob
11/17/2010 1:58:20 PM
Reply:

Similar Artilces:

"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...

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. ...

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...

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 ...

"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...

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: "Query: dataset not in Edit mode": in delphi code for Rave Report [Edit]
I am trying to write a Delphi code (Delphi 2010) to print a rave report from the access database; I am using RVSystemprint method; q1 is a query name. I get error message " q1: dataset not in edit or insert mode", at the line: while not q1.Eof. Even though I added q1.Edit or q1.insert, it doesn't work. Database's readonly property is FALSE. What is missing in the code? Thanks. procedure TForm1.rsysPrint(Sender: TObject); begin with Sender as TBaseReport do begin ..... q1.Open; q1.Edit; q1.first; while not q1.Eof do begin ... end; .... ...

"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 ...

"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...

"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...

"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...

Web resources about - Delphi XE HTTP: error "Socket Error #10054 Connection reset by peer" [Edit] - embarcadero.datasnap

Resources last updated: 2/6/2016 3:17:04 AM