RO server put in invalid state by clients?

I am running into stability issues with a RO DA TCP server.

The service appears to work perfectly from localhost but when connecting from another LAN machine the indy TCP component does not return any data.

Typically my first call is a getRODLLibrary which will execute
IndyClient.Connect in TROCustomIndyTCPChannel.IntDispatch
but then the request of size 4
IndyClient.IOHandler.Write(aRequest, aRequest.Size, True);
will result in
IndyClient.IOHandler.ReadStream(aResponse);
throwing an exception.

My RO TCP server is written in .NET
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
ApplicationServer server = new ApplicationServer(“OffNetServer”);

  var schemaLoader = new SchemaLoader("genericdb.daSchema");
  var container = new SimpleContainer();
  container.RegisterSDK(server.NetworkServer);
  container.RegisterDataAbstract();
  container.RegisterSingleton<ISchemaLoader>(schemaLoader);
  container.RegisterSingleton<ISchemaProvider, SchemaProvider>();
  container.RegisterServices();
  server.DependencyResolver = container;

  server.NetworkServer.ServerChannel = new RemObjects.SDK.Server.IpTcpServerChannel();
  server.NetworkServer.Port = 7789;
  int maxMesSize = int.MaxValue;
  BinMessage message = new BinMessage();
  message.MaxMessageSize = maxMesSize;
  message.MaxDecompressedMessageSize = maxMesSize;
  server.NetworkServer.RegisterServerMessage(message);
  server.Run(args);

My client is in delphi
afbeelding

and connects using
Self.ClientChannel.TargetUrl := ‘tcp://:7789/bin’;

I don’t think the issue is related to my client code however since I can reproduce the issue in the Visual Studio UI.

When I perform ‘Update Interface File(s)’ of the remoteRODL file I sometimes get an error (first time?)

This is the Visual Studio Output:
Cannot read RODL library from source tcp://localhost:7789/bin. Cannot load RODL from provided server Uri. Too few bytes read from stream (29116 expected but 0 read)
Updated OffNetServer_Intf.cs
Updated OffNetServer_Intf.cs
Updated OffNetServer_Intf.cs
Updated OffNetServer_Intf.cs
Cannot read RODL library from source tcp://w8pro64:7789/bin. Cannot load RODL from provided server Uri. Too few bytes read from stream (29116 expected but 24576 read)
Cannot read RODL library from source tcp://w8pro64:7789/bin. Cannot load RODL from provided server Uri. Too few bytes read from stream (29116 expected but 24576 read)
Cannot read RODL library from source tcp://w8pro64:7789/bin. Cannot load RODL from provided server Uri. Too few bytes read from stream (29116 expected but 28672 read)
Cannot read RODL library from source tcp://w8pro64:7789/bin. Cannot load RODL from provided server Uri. Too few bytes read from stream (29116 expected but 12288 read)

I am using delphi version 10.0.0.1537 and .NET version 10.0.0.1521
Any idea what the issue could be? How this can be debugged?

Hello

This is interesting.
It is clear that the response is not a set of random bytes, as the response size is being read from the channel and looks reasonable.
The first thing to check - please double-check that there is nothing else listening on this port.

Then try to load a RODL from a simple app. Create a new RO SDK server application and set its startup code to

using RemObjects.SDK.Server;
using System;

namespace ROServer4
{
    static class Program
    {
        public static int Main(string[] args)
        {
            ApplicationServer server = new ApplicationServer("ROServer4");

            server.NetworkServer.ServerChannel = new IpTcpServerChannel();
            server.NetworkServer.Port = 8099;

            server.Run(args);
            return 0;
        }
    }
}

Regards

I can reproduce the issue with a simple RO service.
I believe the issue is related to the RODL size (maybe a small read timeout)
I padded the RODL service with some documentation.

You can find the code attached.
RODL.7z (63.3 KB)

Updated testRODL_Intf.cs
Cannot read RODL library from source tcp://w7pro64:7499. Cannot load RODL from provided server Uri. Too few bytes read from stream (120355 expected but 69632 read)

Hello

Unfortunately I cannot reproduce the issue, even on your testcase (clean Win-11 VM)
Please try to use different port. It seems some application is listening to this port too.

Regards