IP Server DLL Registration problem

Greetings to everyone,

I've been through all the IP-Server and driver documentation and built the examples successfully using the following versions:

Clarion 11.1.13855
IP-Driver 11.1.13845
IP-Server 11.1.13845 on a test Windows Server 2022 (Standard) VM

All good so far.

Now I'm trying to implement this to a small existing solution with 6 TPS files defined in the dictionary, as well as a single InMemory table.

When trying to register an IP Server DLL via the Administrative Console it just times out and the IPREQ.exe process on the server becomes unresponsive.

I've scoured the Newsgroups for any potential tips and/or solutions to this problem, including the following:

The server.pem and client.pem files are in the necessary folders.
All the DLL's on the server side match the DLL's from the Clarion 11.1 bin folder.
I've registered the InMemory Cached Table for IPDRV template as per the InMemory documentation.

IP_TemplateRegistry01

IP_TemplateRegistry02

The solutions all build successfully, but I can't get past registering the IP Server DLL on the server side.

Any other ideas or suggestions I can try?

Your second screenshot narrows it down: the "Read timed out" box carries the title Select Data Managers. So the wait is not in registering your DLL - it happens one step earlier, while the server puts together the list of DLLs you can choose from.

How the server builds that list

  1. It looks through the folder IPREQ.exe runs from, and every folder below it, for .dll files.
  2. Each DLL that is not registered yet is loaded into the server, checked for the entry points a Data Manager has, and unloaded again.
  3. The DLLs that pass go into the Select Data Managers list.

Loading a DLL runs its startup code. The server is a Windows service with no desktop, so a DLL whose startup code waits for something - a message box nobody can see and answer, a file or a path that does not exist on the server - holds the list back. The Administrative Console waits 20 seconds and then shows Read timed out, and the server stays busy with that DLL, which is the unresponsive IPREQ.exe you see.

The examples register because their folders hold only what they need. I describe this from the server's source; I have not reproduced your setup, so which DLL is the one that waits is for you to find.

What to try

  1. Stop the SoftVelocity IP Data Server service (or end IPREQ.exe if it no longer answers).
  2. Leave in the server folder, and the folders below it, only your Data Manager DLL and the runtime DLLs it needs: ClaRUN.dll, the file driver DLLs for your tables (ClaTPS.dll and ClaMEM.dll for TopSpeed and In-Memory), plus the files the server came with. Move every other DLL somewhere outside that folder.
  3. Start the service and choose Register Data Managers again.

If the list now appears, one of the DLLs you moved away was the one waiting; they can stay out, the server does not need them.

If it still times out with only those files, the Data Manager DLL itself is waiting in its startup code. Things to look at in it:

  • global embeds that run at program start, and the CONSTRUCT of global objects
  • anything there that opens a window or shows a MESSAGE
  • anything that opens or loads a table at startup - with the In-Memory Cached Table template I would check when the cache is filled

To see which DLL the server is busy with: run Process Explorer as administrator on the server while IPREQ.exe is stuck, select IPREQ.exe and open the lower pane in DLL view (Ctrl+D). A DLL of yours in that list is the one that was loaded and never unloaded.

Two things that would help if it does not start working: the list of all *.dll files in the server folder (and its subfolders), and whether IPREQ.exe uses CPU while it is stuck or sits at zero.

Thanks for the info. It helped in tracking down the root cause.

We had a StringTheory object defined in the dictioary globals.

Then in the IP Manager DLL Global Embeds, an Include for StringTheory.

I've instead removed the Global from the dictionary and the Include from the Data Manager DLL, and defined it in the apps Data DLL instead.

It's all compiling, and the Data Manager DLL now appears and registers correctly on the server side.

Thanks very much for the guidance.

You are welcome. From your report we learned that we needed easier diagnostics so the next IPDS release has: <this is an excerpt from new help/docs>:

The IP Data Server can keep a log of what it does: when it started and on which ports, the certificate it loads, the data managers it looks at and registers, every client that connects, leaves or is refused, and, when you ask for it, one line for every request of a client with the time it took. The log is off until you switch it on, and a server without the log runs as it always did.

The settings

level = errors
Problems, and the start and the stop of the server. The log stays small, so this level can be left on all the time.

level = connections
Also the data managers the server looks at and registers, and every client that connects, leaves or is refused. This is the level to start with, and the one that is used when the file names no level.

level = requests
Also one line for every request of a client. Use it for a slow application or to see what a client did last; the log grows quickly on a busy server.

log = name
The log file. A name without a path is created in the folder of IPREQ.EXE; a path must name a folder that exists. Without this line the log is ipreq.log. The log is kept when the service is restarted: new lines are added to it.

size = n
The largest size of the log in megabytes; 20 without this line. When the log is full it is kept as ipreq.old.log, in place of an earlier one, and a new log is started. The most recent lines are always on disk, and the two files never take more than twice the size you set. size = 0 sets no limit.

Reading the log
Every line starts with the date and time and a number, and the text follows. The number is the connection: all lines of one client carry the same number, so on a busy server you can pick one client out by searching for it. A line that reports a problem starts with ERROR

When the log helps

A client cannot connect. The log shows the ports the server listens on, a certificate that could not be loaded, and the reason for each connection it refuses.

A data manager is missing from the Select Data Managers list, or the list does not appear. The log names every DLL the server looked at and says why one was left out.

The application is slow over the IP driver. Each request line carries the time the server spent on the request and the time the client and the network took before it.

The server stops answering after hours or days. Leave the log on: it is limited in size, every line is written to the file at once, and the last lines show the last thing the server did.