DataSnap XE2 , Disconnecting with second connection in the same client - delphi

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.

Related

Soap-server responds with error 12030 after requests over HTTPS

My Delphi 10.4 application uses a HTTPRIO-component to communicates with SOAP REST Server over HTTPS.
It is installed on more then 100 PC's, and it works fine almost everywhere.
However, I now have 2 clients that get the following error:
"Error sending data: (12030). De verbinding met de server is niet normaal beƫindigd"
(--> The connection to the server did not end normally )
The user has a Windows 7 Home Premium machine (I have Windows 10 Pro).
Firewall was disabled.
If I copy the complete application-dirctory with all the dll's to my machine everything works fine.
Where should I start looking for a solution?
Which properties of the HTTPRIO-component could have an effect on this behaviour? Or which dll's?
I checked the article Peter Wolf suggested but without succes. (The register-settings should be OK). All the registers are present with the right values, but the windows update could not be installed. Also downloading the stand-alone update KB3140245 fails. It juist says "failed".
any hints are welcome!
kind regards,
Dirk Janssens

Connecting to local server via dBExpress

My D7 dBExpress project is supposed to connect to a local Interbase XE7 server.
It has the usual DBX setup: SqlConnection, SqlQuery, DataSetProvider and
ClientDataSet and does a simple 'select * from mytable'.
Last time I used it, it was working fine, but today when I ran it inside the IDE,
I get an exception as I call
ClientDataSet1.Open;
in my FormCreate (that call is the entire code of the project, btw). The
exception is an EDatabaseError with msg "No mapping for Error Code Found." and happens in TSqlConnection.DoConnect
That sounds familiar - I got that error myself one time, when I went back to an IB project after a few weeks.
It turned out that in the meantime something had sneaked Firebird onto my machine and it had hijacked the port IB usually listens on, and it was actually this FB server which was rejecting the connection, not the Interbase one!
Take a look under Services to see whether there is an FB server running. If there are, close it down (and start the IB server if not already running, of course). Then try your DBX project again.
Somewhere in the IB docs, I found something which seemed to suggest there was a way of getting FB and IB servers to coexist, but to avoid falling into a similar trap another time, I wrote a couple of batch files to shut down one of them and start the other. One is called "UseIB" and contains:
net stop "Firebird server - DefaultInstance"
net start "InterBase XE7 Server gds_db"
The other one, "UseFB" just does the opposite, of course.

DataSnap VCL App server hangs if it is closed with open connections

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.

Datasnap Delphi XE7 - ApplyUpdates(0) issue

I have a datasnap server app developed originally with XE5 that was working fine with a client app on a mobile tablet accessing a Firebird database on a server. I have recompiled the code with XE7. The only change I had to make to the code to compile without any errors was to add DataSnap.DSProviderDataModuleAdapter to the uses of the methods unit. Have replaced the server app on the server (stop service/uninstall/reinstall/start service) and now I can no longer insert/update records in the database on the server. Whenever I reach the line of code to ApplyUpdates(0) I get the following error:
Remote Error: Access violation at address 0093CB3F in module Snackerservice.exe. Read of address 00000000.
Retrieving data from the database to display on the tablet is not a problem so the connection is working.
If I change the server app back to the one developed under XE5......all works fine again. The other strange thing is that there are no problems with the XE7 compiled app when using 'localhost' to access a copy of the database on my development machine......only when accessing through an IP connection to a server.
Can someone please help me solve this frustrating problem.
Bill Zwirs
To hopefully make it a little clearer, here is a bit of code that causes the issue:
iLic := ServerMethodsClient.Get_Licences;
iDev := ServerMethodsClient.Get_NumDevices;
if (iDev < iLic) then
begin
iDevID := ServerMethodsClient.Get_NewDevID;
MobClientDM.DevicesClient.Open;
MobClientDM.DevicesClient.Insert;
MobClientDM.DevicesClientDEVID.AsInteger:= iDevID;
MobClientDM.DevicesClientMACADDRESS.AsString := sMacAddress;
MobClientDM.DevicesClient.Post;
if (MobClientDM.DevicesClient.ChangeCount > 0) then
MobClientDM.DevicesClient.ApplyUpdates(0); ....................Error occurs here
end;
Problem solved at last.
When I installed the server app on the server I also added Midas.dll to the directory which worked fine until I compiled with XE7. So I have now included MidasLib in the uses clause of the server app and removed the Midas.dll file from the install directory. Compiled and installed and all works good again.
Hope this helps others who might have a similar problem.
Bill Zwirs

Delphi Indy IdMappedPortTCP

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?

Resources