I am trying to connect from a Windows 10 computer to a Firebird database server (port 3050) running on a Mac. This has been working fine until recently. I now only get intermittent access in a predictable way.

If I try to connect to the database on port 3050, I get an "Unable to connect to network host ..."

Unable to connect dialog

However, if I open a Windows Explorer window and try to navigate to the host as a UNC path (e.g. \\, I get a Windows Security prompt.

Windows Security prompt

I don't have to enter anything in this at all, or submit the dialogue, but after this point, I can connect to the database server on the Mac for about 30 seconds or so.

Connection established dialog

Could anyone explain this behaviour with a view to getting more reliable access to the database again?


After gaining access to the iMac, I seem to be able to reproduce the issue by putting the iMac to 'sleep'. After putting to 'sleep', I can't access the database, then trying to navigate using Windows Explorer to the mac, I can call it. To me, it seems as though Windows Explorer is doing something to 'wake-up' the mac - temporarily at least - but a standard call to the database on port 3050 doesn't wake it up? Further investigating...

  • There's a bit of confusing info here... Using explorer to connect establishes an SMB connection (ports 137-139 and 445) and this has nothing to do with your database port(s). Additionally, authentication would have nothing to do with network ports unless you were going through a firewall that required authentication. This is something you need to address with your network admin. – Allan Apr 9 '18 at 3:50
  • I agree, however it doesn't change the fact that 100% of the time, establishing the SMB connection then means that connecting to port 3050 is then possible, but only for 30 odd seconds or so. No firewall is involved. – Jayden Apr 9 '18 at 7:27
  • How are you confirming that it's connected? The dialog box or can you actually make a connection with the database? – Allan Apr 9 '18 at 13:03
  • I can actually make a connection with the database - including querying tables and returning data. – Jayden Apr 9 '18 at 19:11
  • Do you have access to that Mac server? – Allan Apr 9 '18 at 20:16

The issue appears to have been caused by the Mac going into Sleep mode.

It appears as though trying to connect using Windows Explorer from a Windows machine is issuing a Wake On Lan request, which wakes the target Mac for 30 seconds or so. During this 'wake' period I was then able to connect.

By implementing a Wake On Lan request from my application, I now seem to be able to reliably connect again to the target mac.

I would not have expected the target 'server' to be put into sleep mode, however, because we don't control the environment in which our software operates, we need to account for all possibilities really.

Because the target mac and windows computers are on different sub-nets, I've only been able to issue the wake on lan directly to the target mac's IP address, rather than completing a broadcast wake on lan.

I was able to modify the code available here to transmit the WOL to the target mac.


Understanding that until I read this I never even knew there was a DB on the Mac called "Firebird." I am approaching this as a Windows support tech of a number of years and what this sounds like it might be. This will be a bit general and only point in a possible direction.

The first error message could be so many different things you could write a book. But the second error message may be pointing in a new direction: authentication.

With the Mac all you need to provide is a username and a password and you are in and depending on how you are authenticating you may not need to authenticate at all. Windows Does Not Work Like That.

Windows is all about authentication even if that authentication is (username) guest and (password) 1234. Oh wait did I mention that Windows expects the username to be in the form of "DOMAIN\Username." Domain could be the name of the user in an Active Directory domain or it could be just the name of the PC you are connecting to.

If you need to log into a domain-connected Windows PC computer as a "Local" user (EG not authenticated via an AD Domain) you need to enter the name of the computer (sometimes called a NetBIOS name) a backslash and the username. This is so Windows knows where to authenticate, locally or in the domain. This can be annoying especially if you don't immediately recall the NetBIOS name of the PC you need to log into.

So how would you log into that Mac from a Windows PC and tell the Windows PC to authenticate from the Mac's user list? Like this:


Where MACNAME is the name of the Mac listed in the sharing Preference pane at the top next to Computer Name. Note that keeping the name short and free of spaces will help you here.

And the password being the password of the user on that Mac.

So to connect to that Mac reliably over a network connection from that PC you would map the network drive and check the box to authenticate using different credentials. In the first box you would enter the computer name of the Mac, a backslash "\" and a username with the appropriate permissions on that Mac (also remember that spaces in computer names and passwords on Windows is verboten!.

And put the password in the password field. If you have entered the right info you should connect to the Mac and be able to Explore it's file system on the PC.

This is a long explanation to make sure you understand what is going on in the background when Windows authenticates. I believe (remembering my limited knowledge here...) that it is possible that you need to authenticate to the Firebird database in a similar fashion from the PC. IMHO.

Also you may want to contact the folks who support Firebird and see if I am totally full of little red ants or not and find out how you would authenticate in this fashion from a Windows PC.

  • Hi Steve, thanks for your input, unfortunately I think you are way off the mark. I don't even need to authenticate with the mac in order for the database to begin accepting connections. See my additional info in the question - which I've now tracked down to what I think is the sleep mode of the mac ... ?? – Jayden May 7 '18 at 20:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .