Jump to content
bobD

Strange IB connection issue

Recommended Posts

I have a licensed IB server on my home network, accessed both hardwired (desktop machines) and over the network wifi

On my laptop the connection is rock solid

On my wife's laptop my Delphi program will connect when the computer is first booted up, but then consistently fails after a couple of minutes

Same Delphi program, same build, same connection parameters. And as stated, it works on startup--just not later.

This only started about a week or so ago, and since everything else is pretty much identical, I'm suspecting the latest Windows update: my laptop is Win11 and hers is Win10.

Since my laptop always connects, I'm tending to rule out the server or connection settings...what else could it be?

I did set up a new rule in the Windows firewall to allow outbound connection from my Delphi program, but that had no effect.

I even tried turning the firewall off: again, no effect. I'm perplexed.

Anyone seen anything like this--connecting on a fresh boot, but then consistently failing?

bobD

 

Share this post


Link to post

I'll have to add some debugging code to the program to surface that. It's a straight db access program, so if it can't connect it simply tells the user that it can't find the database. It's my password manager, so not designed to be real helpful to an unauthorized user.

I'm still loooking at something external as the most likely issue, though. Both laptops are running the same build of my code ("UTC build date: Sat, 27 May 2023,  8:26 PM") and this is a very recent issue.

Interestingly enough, if I try to log in to the network server using the Emb. IBConsole program on her machine, I get a failure dialog message of:
    Unable to complete network request to host "<NAME>".
    Failed to locate host machine.
    The specified name was not found in the hosts file or Domain Name Services.

while doing so from my laptop works fine.

I have no idea why it suddenly can't find a database server it's been using for several years. 

bobD

Edited by bobD

Share this post


Link to post

This is probably name resolution problem. Check WINS, DNS etc. Do you have DHCP on server? Try connect app via IP.

Share this post


Link to post

Definitely a name resolution problem, and I'm still blaming the OS updates. I did originally (years ago--like D7 era) start with calling the server 192.168.~ rather than by name in the connection parameters, but the router at that time (w/ dynamic DHCP services) would periodically reassign IPs, so that proved less stable than the name approach.

Tentative solution for now:

I turned on network sharing and discovery and redefined the network as private. Then I put incoming traffic rules on the server firewall for interbase as a program, and to open port 3050 specifically. My wife's laptop now appears to have a stable connection.

Things I'm unhappy about;

i don't like discovery and sharing on. Seems like an obvious security hole to me, and since my own laptop had a stable db connection without it, it's obviously not the root issue.

It still bothers me that her machine could contact the database on start=up, but then lost it. That's just weird.

bobD

 

Share this post


Link to post

Check that the network card isn't powering down to save electricity.  Windows is starting to set that stuff on it's own after updates.  It now "shuts down" the monitor to save power after the screen saver is on after a few minutes, and there's no way to change that on, but a network card put to sleep can be overridden

Share this post


Link to post

If it's a dedicated db server, give it a fixed ip address outside the dhcp range, and call it with the ip address. I would not use the dns name if there's not an internal dns server on the network.

  • Like 1

Share this post


Link to post

"give it a fixed ip address outside the dhcp range"

Unfortunately for this issue, I live in a building where the unit routers are provided as pretty much closed systems. Just about the only thing I have access to is setting the wifi password. 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×