Issue Details (XML | Word | Printable)

Key: CORE-5679
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: Major Major
Assignee: Unassigned
Reporter: Rajko Thon
Votes: 0
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Firebird 3: unable to connect to localhost when pulling the network-plug

Created: 13/Dec/17 04:48 PM   Updated: 30/Jan/18 10:45 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Environment:
Windows 7 64bit, Firebird 3.02
Database access restricted to two locations in the file system via firebird.conf
Issue Links:
Relate
 

QA Status: No test


 Description  « Hide
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.


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order

Rajko Thon added a comment - 28/Jan/18 05:16 PM
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!

Vlad Khorsun added a comment - 28/Jan/18 10:00 PM
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

Sean Leyne added a comment - 29/Jan/18 07:31 PM
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 CORE-4563 (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.

Sean Leyne added a comment - 29/Jan/18 07:32 PM
Issue is result of Windows API functionality, outside of Firebird project control.