Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firebird 3: unable to connect to localhost when pulling the network-plug [CORE5679] #5945

Closed
firebird-automations opened this issue Dec 13, 2017 · 8 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Rajko Thon (rthon)

Is related to CORE4563

Connecting to a FB3-Database via localhost works only as long as a network connection is available.
A disconnected machine is unable to connect to databases via isql or flamerobin.
Initial Ok-state:

SQL> connect localhost:k4.fdb user sysdba password masterkey;
Database: localhost:k4.fdb, User: SYSDBA
SQL> quit;

When the machine is disconnected from the network (network-cable plugged, Wifi off), the connection is no longer possible.

SQL> connect localhost:k4.fdb user sysdba password masterkey;
Statement failed, SQLSTATE = 08006
Unable to complete network request to host "localhost".
-Failed to locate host machine.
-The specified name was not found in the hosts file or Domain Name Services.

Although connection to 127 is still possible.
SQL> connect 127.0.0.1:k4.fdb user sysdba password masterkey;
Database: 127.0.0.1:k4.fdb, User: SYSDBA

Connecting via file access through the client library works too.

So:
Somehow FB3 seems to require a working network device to be able to connect to a database via localhost.
FB2.5 did not have this issue.
Maybe this is related to the new Providers mechanism in firebird.conf? (#⁠Providers = Remote,Engine12,Loopback)
The FB3-Server-process also seems to have issues terminating when it was started with Providers are selected explicitly.
Stating 127.0.0.1 as localhost in the hosts-file under C:\Windows\System32\drivers\etc does not seem to help.

@firebird-automations
Copy link
Collaborator Author

@firebird-automations
Copy link
Collaborator Author

Commented by: Rajko Thon (rthon)

Thanks for the helpful comment!
Indeed this behaviour seems rooted in the Windows Media Sense setting.
So turning it off is a workaround for me for now.

However, since I only became aware of the problem by switching to FB3
it remains that FB2.5 did something about it so that I never ever had to care about this issue.
I remain confident that you guys will manage to provide FB3 with some equivalent solution.
:-)

Thank you for the great work on FB anyway!

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Rajko,

Thank you for confirmation.

It seems that issue re-appears in FB3 because of its support of IPv6.
Firebird 2.5 does nothing "about it".

I think ticket should be closed as there is nothing we could do at Firebird side

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

Vlad,

Although I agree that the current issue is the result of different networking API calls required to support IPv6, which is outside of Firebird project control.

Issue CORE4563 (related to network stack changes for local host) could indirectly help in this case, as well as provide performance improvements to local host/loopback DB connections.

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

Link: This issue is related to CORE4563 [ CORE4563 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

Issue is result of Windows API functionality, outside of Firebird project control.

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Won't Fix [ 2 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant