Download it now!
Bug 85146 - FILEOPEN: Firebird connect to an existing Firebird database file fails: tries to connect to hostname
Summary: FILEOPEN: Firebird connect to an existing Firebird database file fails: tries...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
4.3.2.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-17 14:53 UTC by reinierolislagers
Modified: 2017-09-24 19:43 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample empty Firebird 2.5.0+ database (2.41 MB, application/octet-stream)
2014-10-18 02:33 UTC, reinierolislagers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description reinierolislagers 2014-10-17 14:53:55 UTC
(Enabled experimental support for Firebird; I know this feature may not be complete but the UI seems to support it so reporting anyway)

Using the wizard, connect to existing database, Firebird File

Datasource URL window appears. Click browse to choose a firebird .fdb file
The URL gets filled in like file:///D:/AUser/Documents/Firebird/thedb.fdb
The GUI asks you to save the .odb file, ok.

Next: error message: 
LibreOffice Base
The connection to the data source "test9" could not be established.

firebird_sdbc error:
*Unable to complete network request to host "MYCOMPUTER"1) 
*Failed to locate host machine
caused by
'isc_attach_database'

1) where MYCOMPUTER is the local hostname

As the string includes the host name, this suggests the driver is trying to connect to 
- a Firebird server via TCP/IP
rather than
- to the firebird file using the embedded client
(see also www.firebirdfaq.org/faq260/)
Comment 1 Julien Nabet 2014-10-17 22:00:21 UTC
Would it be possible you attach a simple, even an empty, Firebird file so we can try to reproduce quickly and easily?
Comment 2 reinierolislagers 2014-10-18 02:33:47 UTC
Created attachment 108019 [details]
Sample empty Firebird 2.5.0+ database

Empty Firebird file for testing. ODS version is 11.2 which means Firebird 2.5.0 and higher can open this. Verified with Firebird embedded 2.5.3.

LibreOffice ifbembed.dll shows version 2.5.2.x
Comment 3 Julien Nabet 2014-10-18 18:09:56 UTC
On pc Debian x86-64 with master sources updated yesterday, I could reproduce this too
warn:connectivity.firebird:3657:1:connectivity/source/drivers/firebird/Util.cxx:53: firebird_sdbc error:
*file /home/julien/compile-libreoffice/bugs/85146_firebird/TEST.FDB is not a valid database
caused by
'isc_attach_database'
Comment 4 Julien Nabet 2014-10-18 18:35:33 UTC
Hmm, I downloaded again the Firebird file, it's ok now.
BTW, it's ok with master sources updated yesterday + LO Debian package 4.3.2

I put it back Windows only.
Comment 5 Julien Nabet 2014-10-18 18:37:21 UTC
Just for the record, here's the value of m_sFirebirdURL in connectivity/source/drivers/firebird/Connection.cxx:205:
file:///home/julien/compile-libreoffice/bugs/85146_firebird/TEST.FDB
Comment 6 Alex Thurgood 2014-10-20 15:52:20 UTC
I can confirm on OSX 10.10 with LO 4322

Error message :

Error code 1
firebird_sdbc error:
I/O error during "open" operation for file
"localhost/Users/alex/fdbtest/fbtest.fdb"
Error while trying to open file
No such file or directory caused by 'isc_attach_database'
Comment 7 Alex Thurgood 2014-10-20 15:57:46 UTC
On

Version: 4.4.0.0.alpha0+
Build ID: d807cba9ee60cb1404b54addf9cd3e54de89f331

the ODB file is created and opens main window, but no tables are displayed.
Comment 8 Alex Thurgood 2014-10-20 16:01:34 UTC
Note that the setup doesn't ask for user id/pwd combo, nor is this requested when the odb is opened
Comment 9 Alex Thurgood 2015-01-03 17:41:18 UTC Comment hidden (no-value)
Comment 10 QA Administrators 2016-01-17 20:05:04 UTC Comment hidden (obsolete, spam)
Comment 11 collura 2016-06-28 04:05:57 UTC
bug still there.

fedora24 with libreoffice-base-1:5.1.4.2-3.fc24.x86_64

created a local database as embedded firebird, created table, added data to table, saved, closed, reopened, click on tables icon (no table list displays) and get error:


    The connection to the data source "<removed>" could not be established.

    Error code: 1

    firebird_sdbc error:
    *file /tmp/<removed>.tmp/firebird.fdb is not a valid database
    caused by 'isc_attach_database'
Comment 12 Julien Nabet 2016-06-28 05:08:34 UTC
Tamas: thought you might be interested in this one since it concerns Firebird.
Comment 13 Tamas Bunth 2016-07-01 11:51:12 UTC
It seems to me this bug will obsolete by upgrade to Firebird 3.0.

In Firebird 3.0 there are three providers:
http://firebirdsql.org/file/documentation/release_notes/html/en/3_0/rnfb30-engine.html#rnfb30-engine-modes

When a connection is made without a network protocol syntax, remote provider rejects, and Engine12 do the work for us.


I tested the issue with this patch on GNU/Linux:
https://gerrit.libreoffice.org/25673/

With configuration:
./autogen.sh --enable-firebird-sdbc --without-system-firebird

Making these steps:
1. Using the wizard, connect to existing database, Firebird File
2. Choosing a random .fdb file on my PC
3. The GUI asked to save the .odb file, ok.

The saving was successful.
Comment 14 Julien Nabet 2016-09-10 12:12:37 UTC
Since Firebird 3.0 is now present in master sources (future LO 5.3.0), let's put this one to FIXED.

reinierolislagers: don't hesitate to reopen this tracker if it still fails with master daily build (see http://dev-builds.libreoffice.org/daily/master/)
Comment 15 collura 2016-09-12 03:55:07 UTC
fyi,

https://wiki.documentfoundation.org/ReleasePlan/5.3#5.3.0_release :

Alpha1 	Week 42 , Oct 17, 2016 - Oct 23, 2016

Hard feature freezed & branched libreoffice-5-3  Week 47 , Nov 21, 2016 - Nov 27, 2016

Beta1 	Week 47 , Nov 21, 2016 - Nov 27, 2016

Beta2 (optional) Week 49 , Dec 5, 2016 - Dec 11, 2016

Hard English string & UI freeze Week 51 , Dec 19, 2016 - Dec 25, 2016

RC1 	Week 51 , Dec 19, 2016 - Dec 25, 2016

Hard code freeze & branch libreoffice-5-1-0 Week 2 , Jan 9, 2017 - Jan 15, 2017

RC2 	Week 2 , Jan 9, 2017 - Jan 15, 2017

RC3 	Week 4 , Jan 23, 2017 - Jan 29, 2017

Release 5.3.0 	Week 5 , Jan 30, 2017 - Feb 5, 2017
Comment 16 Sergio Reyes-Peniche 2017-07-04 20:13:38 UTC
Tested on both 5.3.4 RELEASE and 5.4.0 RC and the bug remains:

 >>> Making these steps:
 >>> 1. Using the wizard, connect to existing database, Firebird File
 >>> 2. Choosing a random .fdb file on my PC
 >>> 3. The GUI asked to save the .odb file, ok.
 >>> 
 >>> The saving was successful.

BUT, when I first try to use the .odb file, I still get this error:

The connection to the data source "New Database" could not be established.
firebird_sdbc error:
*Unable to complete network request to host "DOORS". 
*Failed to locate host machine.
*The specified name was not found in the hosts file or Domain Name Services.
caused by
'isc_attach_database'

AFAIK, if the protocol string the firebird engine receives is:

file:///E:/Working/somewhere/somefile.fdb

it shouldn't even try a network request and just use engine12.dll in embedded mode.
Comment 17 Alex Thurgood 2017-07-05 09:24:13 UTC
(In reply to Sergio Reyes-Peniche from comment #16)

Sergio, just so we are clear here :

> 
> AFAIK, if the protocol string the firebird engine receives is:
> 
> file:///E:/Working/somewhere/somefile.fdb
> 

The somefile.fdb file is a FB3.0 format database, right ? Please confirm.
Comment 18 Alex Thurgood 2017-07-05 09:31:03 UTC
(In reply to Sergio Reyes-Peniche from comment #16)

> 
> it shouldn't even try a network request and just use engine12.dll in
> embedded mode.

From this page :

https://firebirdsql.org/file/documentation/reference_manuals/user_manuals/html/qsg3-databases.html

Upon receiving a local connection string, the Firebird client will first attempt to make a direct, embedded connection to the database file, bypassing authentication but respecting the SQL privileges and restrictions of the supplied user and/or role name. That is, if the Engine12 provider is enabled in firebird.conf or databases.conf – which it is by default. If the database file exists but the connection fails because the client process doesn't have the required access privileges to the file, a client-server connection is attempted (by the Loopback provider), in this order:

    Using TCP/IP via localhost;

    On Windows: using WNET (NetBEUI), aka Named Pipes, on the local machine;

    On Windows: using XNET (shared memory) on the local machine.

Perhaps this is what you are seeing ?
Comment 19 Sergio Reyes-Peniche 2017-07-12 17:55:56 UTC
Yes, I tried with both the sample database file from my default Firebird 3 installation and a couple of files I created.

(In reply to Alex Thurgood from comment #17)
> (In reply to Sergio Reyes-Peniche from comment #16)
> 
> Sergio, just so we are clear here :
> 
> > 
> > AFAIK, if the protocol string the firebird engine receives is:
> > 
> > file:///E:/Working/somewhere/somefile.fdb
> > 
> 
> The somefile.fdb file is a FB3.0 format database, right ? Please confirm.
Comment 20 Sergio Reyes-Peniche 2017-07-12 18:06:39 UTC
I don't think it's an access privileges issue, my user account has administrative rights and I can connect locally to the file using isql and a couple of GUIs.

(In reply to Alex Thurgood from comment #18)
> (In reply to Sergio Reyes-Peniche from comment #16)
> 
> > 
> > it shouldn't even try a network request and just use engine12.dll in
> > embedded mode.
> 
> From this page :
> 
> https://firebirdsql.org/file/documentation/reference_manuals/user_manuals/
> html/qsg3-databases.html
> 
> Upon receiving a local connection string, the Firebird client will first
> attempt to make a direct, embedded connection to the database file,
> bypassing authentication but respecting the SQL privileges and restrictions
> of the supplied user and/or role name. That is, if the Engine12 provider is
> enabled in firebird.conf or databases.conf – which it is by default. If the
> database file exists but the connection fails because the client process
> doesn't have the required access privileges to the file, a client-server
> connection is attempted (by the Loopback provider), in this order:
> 
>     Using TCP/IP via localhost;
> 
>     On Windows: using WNET (NetBEUI), aka Named Pipes, on the local machine;
> 
>     On Windows: using XNET (shared memory) on the local machine.
> 
> Perhaps this is what you are seeing ?
Comment 21 Xisco Faulí 2017-09-24 19:43:21 UTC
Dear Sergio Reyes-Peniche,
This bug has been in RESOLVED FIXED status for more than 6 months.
If the issue is still reproducible with the latest version of LibreOffice from
https://www.libreoffice.org/download/libreoffice-fresh/, please report a new
issue in https://bugs.documentfoundation.org/enter_bug.cgi providing, if
needed, the steps and documents to reproduce it.
Thanks for your understanding and collaboration.
Closing as RESOLVED FIXED