You are not logged in.
Pages: 1
Hello to all.
Usecase.
An intranet mORMot2 interface-based server. Many clients.
The intranet cannot be reached from the outside.
So, an external replication slave cannot reach this (master) database.
I want this database mirrored on an external (same as above) mORMot2 database (located at AWS).
This database can already be reached by clients in readonly-mode.
So, I need to push changes from intranet master to external AWS.
I have tried to use the normal (working) client, created inside of the intranet server, to push towards the external AWS database. But this gives a socket error (socket closed #5).
Any ideas ?
Offline
Perhaps the socket is closed by the HTTP server because the payload is too big.
It is difficult to investigate without further information.
What is the exact error context in the logs, on both client and server sides?
Offline
Some additional info.
The server tries to send data towards the remote server through its own client.
This errors with message
ENetSock on SockInReadLn [#5 Closed]
Location
procedure DoInputSock(r: PTextRec; const ctx: ShortString; notvoid: boolean);
var
res: integer;
begin
res := InputSock(r^);
if res <> NO_ERROR then
However, very remarkable.
I I perform some kind of action within the first few (2-3) seconds after the start of the server, the remote database is reached by the client inside the server and updated with the changes.
So, all works as expected, but only for the first few seconds after start of the server with the build-in client.
Edit: all running on Windows 11. Latest mORMot.
Last edited by DonAlfredo (2025-09-27 06:12:00)
Offline
Normal (embedded) client: fClient := TRestHttpClient.CreateWithOwnModel(uri.Address, uri.Port,'root',true);
Gives error.
Also (embedded) tried: fClient := TRestHttpClient.CreateWithOwnModel(uri.Address, uri.Port,'root',true,'','',30000,30000,30000);
Gives same error.
Again. Remarkable.
If I send something to the remote server time after time within a couple of seconds, all ok. If I wait for 3-4 seconds: socket error.
Inside of TSChannelNetTls.Receive:
if read = 0 then
result := nrClosed
Edit: the remote server response contains a keep-alive-timeout of 5 seconds.
Last edited by DonAlfredo (2025-09-27 08:14:11)
Offline
Please consider this issue as a non-issue. As the same is happening with a direct client connection towards the external database. So, this is not caused by embedding a client into a server.
Sorry about the noise !
Offline
Pages: 1