Im using Delphi XE 5/6, default Indy version, Windows 7. IdMappedPortTCP (component put on Form) redirect local stream from FFmpeg to Twitch.tv and always near 2 hours of streaming i have IdMappedPortTCP1ExceptionSocket Error # 10053
Software caused connection abort. Tried TCPRelay and no problems so i guess something must be wrong in my app. Thanks for suggestions.
10053 is a network error. Most likely a firewall or router is cutting the connection after it is idle for too long. I would try using Indy's TIdEventStream class as explained in the answer to this post:
How to avoid getting an error 10053 (WSAECONNABORTED) if a HttpGet operation in Android is lasting too long?
Related
I am encountering some problems using some code that worked for ages involving Indy and the download of a web page. I use RAD Studio 10.2 Tokyo.
The web page is as follows:
https://donet.rfi.it/RFIPlatform/showDoc.do?compartimentoHidden=AN&docTypeHidden=CC
The code I am using is part of an application which has the same code since 2011 and it always worked well. The code is as follows:
IDHTTP1.Get('https://donet.rfi.it/RFIPlatform/showDoc.do?compartimentoHidden=AN&docTypeHidden=CC');
I am getting a "Connection Reset by Peer 10054" error since the website went down, some days ago, and when it came up again, the code did not work anymore.
The aforementioned web page can be called from the browser, can even be downloaded with WGET, but Indy is failing.
I tried to play with various options (Cookie Handling, Handle Redirects, HTTPOptions, etc...) and I also updated the SSL libraries to 1.0.2q (Indy cannot use OpenSSL 1.1.0 yet), but the whole thing just doesn't want to work.
Can someone help me figure out what is going on? It has to be for sure something on the website, since the code I use is the same since 2011 and it has always worked. And before that, the same code worked in a similar application since 2008.
Indy's TIdSSLIOHandlerSocketOpenSSL component enables only TLS 1.0 by default. The website in question (https://donet.rfi.it) does not accept TLS 1.0 anymore (probably why it went offline, to update its software), it will accept only TLS 1.1+ now.
TIdHTTP is able to successfully establish a TCP/IP connection to donet.rfi.it:443, but as soon as TIdSSLIOHandlerSocketOpenSSL sends a TLS 1.0 handshake request, the server forcibly closes the TCP connection. You are getting the "connection reset by peer" error while TIdSSLIOHandlerSocketOpenSSL is trying to read the server's handshake response.
You need to configure TIdSSLIOHandlerSocketOpenSSL to enable TLS 1.1 and/or 1.2. You can do that via its SSLOptions.SSLVersions property. Then TIdHTTP.Get() will work again (I tested it).
I am trying to consume a REST service on Amazon with Delphi XE6. At design time I add TRestClient, TRestRequest, TRestResponse components and set BaseURL property. When I execute the request, I get the following error:
While trying to execute the request the following error occured: REST request failed: Error connecting with SSL.
error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure
Tried searching google, there were some suggestions to update Indy libraries, but something went horribly wrong and I had to spent some hours uninstalling everything Delphi related and reinstall.
So, it would be much appreciated if someone could guide me to right direction about how to resolve this error.
Maybe I can bypass TRest* components and use Indy components directly but I am not very experienced about which Indy components I would need.
Thanks in advance.
as the subject says, just close a DS App with 1 open connection and it hangs.
The issue is related to procedure TIdScheduler.TerminateAllYarns;because it get into an infinite loop trying to close all yarns.
The issue is similar to this reported by another user.
http://www.codenewsfast.com/cnf/article/0/permalink.art-ng2026q2000
Regards,
Same problem for me too. I've implemented a DataSnap CallBack example in Delphi XE3 and Delphi 10 Seattle: both hangs if one or more client are connected to the server.
But they hangs only when I close directly the server Windows application.
Try calling before:
ServerContainer1.DSServer1.Stop;
It works for me.
I am using indy's tcp server / client and everything works fine(fixed a few bugs),but there is one bug that is bugging me.
When I freeze all the threads & then kill the process of the tcp client the server crashes and keeps raising that error^ nonstop in the tcpserver.
Is there a way to handle that error in Delphi 6 and other socket errors and prevent the server from crashing(I am using delphi 6 / windows 8 64-bits(probably not needed but I never tested it on my win 7 so...)/ indy 9 / Indy TCP Server & Client)?
Your server is not crashing. EIdSocketError is a perfectly normal exception for TIdTCPServer to encounter when a client connection is closed/lost. That is normal behavior. TIdTCPserver will handle it internally for you and close the socket if the exception escapes into the server (which you should allow it to do - if you catch it yourself, re-raise it after you are done with it). The only reason you see the exception at all is because the debugger reports it before your app sees it. Simply press F9 to let the debugger pass it to the app for normal handling, or else configure the debugger to ignore Indy EIdException-based exceptions.
And please make sure you use a more recent version of Indy than that installed in D7 (you need to remove the old version first). There are crashing threading bugs < 9.0.18
Hello : This is an important issue about Datasnap XE2 Tcp transport
I have an old problem , I asked for it before here, but no reply
DataSnap XE2 , Disconnecting with second connection in the same client :
Simple Datasnap server , simple client , ( just call reverse method ) , after few seconds the server destroy one or all the servermethods class , the datasnapserver is tcp protocol , lifecycle=Session , statefull server.
I test the same binary exe on another machines , and another OS ,and I Notice these :
1- The same problem occured when running the server on a computer which linked to router some with WiFi (with / without dhcp ) all OS ( server2003, Win7 ,Winxp ) give the same problem
2- When running the same server on Virtual Machines (all OS ) no problem at all , I use the Oracle Virtual Box , WHY !
3- In Server implemntation I Change the TCP Transport to http Transport , then i have no problem at all !.
4- I test and try every thing possible ( Networking configuration , Reformating , Fresh OS -- all windows versions -- ) the problem on tcp server transport still
5- It occures after (20 seconds -2 minutes ) after calling the client method some times in both connections .
6- I made and test new tcp server (not datasnap) and worked fine , but DataSnapXE2 TCP server made that problem
Is there some thing to do , I Just need to know why , I need expectations to test , I try almost every thing possible
I use C++Builder XE2 , no updates , all updates available have nothing about this problem
I also rebuild in Delphi XE2 , the smae problem
is there somebody know why , good advise , please reply
Note : DataSnap 2010 , same code , works fine !!
Thank you for your reply in advanced
There is something really wrong with the clientdataset in XE2 which all the follow problems:
Socket Server (scktsrvr) terminated due to too many data coming in from .data or as olevariant.
Catastrophic Failure of no reason in XE2. Same code works in D2010 simply will not work
in XE2
You will not be able to move your existing DATASNAP from D2010 or XE to XE2. Even if you
have a complete rewrite from scratch you will get problems.
New Datasnap or Old Datasnap better think twice before moving or wait until bug in XE2 will be settled.