Can't connect to Custom DA server

I have built a custom DA server.

I am trying to use the Delphi File | New | Data Abstract | VCL Application wizard to create a new “Client for an existing custom Data Abstract Server”

I can connect to an instance of my custom server running on a local machine (http://localhost:80/Bin)

However, when I try to access the same custom server when it is installed on my Windows 2016 server running IIS I get a “Connection test failed due to timeout” error message. If I browse to http://hostname/path/ I get the info page served to me and when I go to http://hostname/path/Bin I get the correct information sent back. When browsing there is no noticeable delay in receiving the response from the server.

Any suggestions as to what the issue might be?

Thanks

Hello

At first double-check that your channel type is selected correctly (ie that you don’t try to connect to a super-http server using http client channel or vice versa).
Then try to connect to your server using url like http://ip address here/bin (not http://hostname here/bin) to ensure that IPv4 is used for communications (it might be that your hostname is resolved as IPv6 address while server binds only IPv4)

Hope that helps

Server type is TROWinHttpServer
Selected channel type is Http

Tried with ip address instead of hostname and still got the “Connection test failed due to timeout” error message.

On which exactly step do you get this message? Could you show the screenshots?

Wizard should show completely different error if the remote server is not accessible at all (**Server connection test failed… No connection could be made because the target machine actively refused it **)

The error you see is raised only when it is possible to connect to the server but it is not possible to fetch RODL information from it. One of the possible reasons for this is that server sends back RODL response but doesn’t close the connection, so the Project Wizard cannot understand that the server did already send all the data.

If I run the same standalone server locally it works fine.

Could there be a firewall issue? Can you load the URL ok in a browser, form the same machine?

Hi Marc,

Yes I can load the URL in a browser.

Also, I am running it on Port 80 using Http.sys under Windows.

Can http://192.38.92.228/dbapi/rodl be accessed as well from the client host?

Are there any proxy servers on the route to that server?

There are no proxy servers involved.

When I try to go to http://192.38.92.228/dbapi/rodl (in a browser) I get mixed results. Sometimes it displays (slower than I would expect) and sometimes it gives me the following message.

192.38.92.228 took too long to respond.
Search Google for dbapi rodl
ERR_CONNECTION_TIMED_OUT

I tried changing the port to 8080 and the problem went away. I am assuming now that something in IIS may be interfering. Would that be an accurate guess?

Ok.

This explains the error you got (RODL is downloaded from that url)

Considering that you did mention that http://192.38.92.228/dbapi/bin did work without any issues it seems to be something in the IIS configuration (or firewall?) passing request to .../bin but rejecting request to .../rodl

This is clearly not a server channel issue (otherwise it wouldn’t work locally and wouldn’t work via port 8080)

Any suggestions on what to look for?

Also if I want to register that url with http.sys in order to see if that fixes it what would the command be to do so?

My ultimate goal is to use ISAPI, but I have not yet gotten that to work. The ISAPI dll won’t load no matter what I try.

Hi,

.../rodl url is required only for develop’s purposes and it isn’t needed in end-user configuration.

have you read the Tutorial: DataSnap Application Using an ISAPI DLL Server article?
it describes how to setup IIS for ISAPI DLL Server.
Steps the same except that they use ISAPI DataSnap application.

Ok, I had already followed that guide and it won’t load.

I then created a new DataSnap ISAPI dll and it works fine.

Then tried deploying the DA ISAPI dll to the same location and it won’t load at all.

Both were compiled as 32-bit dlls. (I would rather have 64-bit, and did figure out how to deploy 64-bit datasnap.)

I must be missing something in my ISAPI dll (or am missing some required files.) What files need to be deployed with the DA ISAPI dll?

Thanks

Ok, I now have the ISAPI loading correctly.

I had missed modifying the following in TServerDataModule.OnCreate

{$IF NOT Defined(ISAPI_SERVER)}
Server.Active := true;
{$ENDIF}

I now have the ISAPI (32-bit & 64-bit) dll loading correctly, but the same “Connection test failed due to timeout” error occurs.

Not sure what the issue might be.

Pardon me if this is a redundant question and I missed it being asked/answered earlier, but what is the network situation between the server, and the client machine? Same local network? a remote server? Can you load access there .rodl URL in a browser locally on the machine where IIS is running?

At this stage, it has to be either a IIS issue or a problem with the network (firewalls, proxies, VPNs, or whatever might be in-between).

If you add some additional dispatchers (say, a soap and or json message dispatcher, or maybe a custom html, can you access those URLs, r do they also fail? ie

http://192.38.92.228/dbapi/ - I gather works
http://192.38.92.228/dbapi/rodl - I gather fails

what about

http://192.38.92.228/dbapi/bin
http://192.38.92.228/dbapi/soap
http://192.38.92.228/dbapi/json
http://192.38.92.228/dbapi/your-custom-html

whether this also work or also fail might shed some light into whether all subparts fail, or its something specific to “rodl”.

Grasping at straws a bit here, I know :frowning:

Hi Marc,

The server is a remotely hosted Windows Server 2016 VPS.

The primary client is a vmware virtual machine running RAD Studio 10.3.3, Although the host machine has the same issue.

Accessing the rodl url works everywhere I have tried it.

I will try the remaining items you have suggested and let you know.

1 Like

I tried adding all of the endpoints suggested and they can all be accessed from a browser.

I have asked my hosting provider to see what they can figure out as it seems to be an issue with IIS…

Ok, so all paths work, except ./rodl. That’s super weird. Is there anything in the IIS logs files for your requests (both the ones that work and/or the one that fails)?