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

execute statement on external doesn't find Firebird 2.5 database [CORE4395] #4717

Closed
firebird-automations opened this issue Apr 20, 2014 · 19 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Volker Rehn (vr2_s18)

Trying to access a 2.5 database through a remote execute statetement, Firebird 3 doesn't find the database, neither aliased nor with the full file name. Test case: Set up two Firebird servers 2.5.2 port 3050 and Firebird 3 alpha2 on a different port, then run this query from a Firebird 3 database: The 2.5 employee database is there and is aliased in 2.5 aliases.conf, no problem connecting to it using any tool. Execute block below runs without a problem from another database of the 2.5 server.

EXECUTE BLOCK
RETURNS (
LOCATION VARCHAR(15)
)
AS
declare sql varchar(100);
begin
sql = 'select location from department';
for execute statement :sql
on external 'localhost/3050:employee'
as user 'sysdba' password 'masterke'
into :location
do
suspend;
end;

gives

Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.Execute statement error at attach :
335544344 : I/O error during "CreateFile (open)" operation for file "localhost/3050:employee"
335544734 : Error while trying to open file
3 : Das System kann den angegebenen Pfad nicht finden. (system can't find given path, vr)
Data source : Firebird::localhost/3050:employee.

exchanging alias for full file name
on external 'localhost/3050:C:\Program Files (x86)\Firebird\Firebird_2_5\examples\empbuild\employee.fdb'
results in

Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.Execute statement error at attach :
335544344 : I/O error during "CreateFile (open)" operation for file "localhost/3050:C:\Program Files (x86)\Firebird\Firebird_2_5\examples\empbuild\employee.fdb"
335544734 : Error while trying to open file
123 : Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch. (wrong syntax for file name, directory name or drive, vr)
Data source : Firebird::localhost/3050:C:\Program Files (x86)\Firebird\Firebird_2_5\examples\empbuild\employee.fdb.

Best regards, Volker

Commits: 3d94386 FirebirdSQL/fbt-repository@3c21a7d

====== Test Details ======

2 dimitr (?): is it possible to do on test host ? (I mean: when some test is running on FB 3.0 - does any FB 2.5 instance is active at the same time ? what's its port number ?)

@firebird-automations
Copy link
Collaborator Author

Modified by: Volker Rehn (vr2_s18)

description: Trying to access a 2.5 database through a remote execute statetement, Firebird 3 doesn't find the database, neither aliased nor with the full file name. Test case: Set up two Firebird servers 2.5.2 port 3050 and Firebird 3 alpha2 on a different ports, then run this query from a Firebird 3 database: The 2.5 employee database is there and is aliased in 2.5 aliases.conf, no problem connecting to it using any tool.

EXECUTE BLOCK
RETURNS (
LOCATION VARCHAR(10)
)
AS
declare sql varchar(100);
begin
sql = 'select location from department';
for execute statement :sql
on external 'localhost/3050:employee'
as user 'sysdba' password 'masterke'
into :location
do
suspend;
end;

gives

Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.Execute statement error at attach :
335544344 : I/O error during "CreateFile (open)" operation for file "localhost/3050:employee"
335544734 : Error while trying to open file
3 : Das System kann den angegebenen Pfad nicht finden. (system can't find given path, vr)
Data source : Firebird::localhost/3050:employee.

exchanging alias for full file name
on external 'localhost/3050:C:\Program Files (x86)\Firebird\Firebird_2_5\examples\empbuild\employee.fdb'
results in

Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.Execute statement error at attach :
335544344 : I/O error during "CreateFile (open)" operation for file "localhost/3050:C:\Program Files (x86)\Firebird\Firebird_2_5\examples\empbuild\employee.fdb"
335544734 : Error while trying to open file
123 : Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch. (wrong syntax for file name, directory name or drive, vr)
Data source : Firebird::localhost/3050:C:\Program Files (x86)\Firebird\Firebird_2_5\examples\empbuild\employee.fdb.

Best regards, Volker

=>

Trying to access a 2.5 database through a remote execute statetement, Firebird 3 doesn't find the database, neither aliased nor with the full file name. Test case: Set up two Firebird servers 2.5.2 port 3050 and Firebird 3 alpha2 on a different ports, then run this query from a Firebird 3 database: The 2.5 employee database is there and is aliased in 2.5 aliases.conf, no problem connecting to it using any tool.

EXECUTE BLOCK
RETURNS (
LOCATION VARCHAR(15)
)
AS
declare sql varchar(100);
begin
sql = 'select location from department';
for execute statement :sql
on external 'localhost/3050:employee'
as user 'sysdba' password 'masterke'
into :location
do
suspend;
end;

gives

Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.Execute statement error at attach :
335544344 : I/O error during "CreateFile (open)" operation for file "localhost/3050:employee"
335544734 : Error while trying to open file
3 : Das System kann den angegebenen Pfad nicht finden. (system can't find given path, vr)
Data source : Firebird::localhost/3050:employee.

exchanging alias for full file name
on external 'localhost/3050:C:\Program Files (x86)\Firebird\Firebird_2_5\examples\empbuild\employee.fdb'
results in

Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.Execute statement error at attach :
335544344 : I/O error during "CreateFile (open)" operation for file "localhost/3050:C:\Program Files (x86)\Firebird\Firebird_2_5\examples\empbuild\employee.fdb"
335544734 : Error while trying to open file
123 : Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch. (wrong syntax for file name, directory name or drive, vr)
Data source : Firebird::localhost/3050:C:\Program Files (x86)\Firebird\Firebird_2_5\examples\empbuild\employee.fdb.

Best regards, Volker

@firebird-automations
Copy link
Collaborator Author

Modified by: Volker Rehn (vr2_s18)

environment: Win7 64, Firebird 2.5.2 port 3050, Firebird 3 alpha2 port 3053, both running as services. Firebird 3 uses firebird.conf modified with AuthServer = Legacy_Auth, AuthClient = Legacy_Auth, UserManager = Legacy_UserManager, CryptPlugin = or CryptPlugin = Arc4, WireCrypt = Disabled => Win7 64, Firebird 2.5.2 port 3050, Firebird 3 alpha2 port 3053, both running as services. Firebird 3 firebird.conf modified: AuthServer = Legacy_Auth, AuthClient = Legacy_Auth, UserManager = Legacy_UserManager, CryptPlugin = or CryptPlugin = Arc4, WireCrypt = Disabled

@firebird-automations
Copy link
Collaborator Author

Modified by: Volker Rehn (vr2_s18)

description: Trying to access a 2.5 database through a remote execute statetement, Firebird 3 doesn't find the database, neither aliased nor with the full file name. Test case: Set up two Firebird servers 2.5.2 port 3050 and Firebird 3 alpha2 on a different ports, then run this query from a Firebird 3 database: The 2.5 employee database is there and is aliased in 2.5 aliases.conf, no problem connecting to it using any tool.

EXECUTE BLOCK
RETURNS (
LOCATION VARCHAR(15)
)
AS
declare sql varchar(100);
begin
sql = 'select location from department';
for execute statement :sql
on external 'localhost/3050:employee'
as user 'sysdba' password 'masterke'
into :location
do
suspend;
end;

gives

Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.Execute statement error at attach :
335544344 : I/O error during "CreateFile (open)" operation for file "localhost/3050:employee"
335544734 : Error while trying to open file
3 : Das System kann den angegebenen Pfad nicht finden. (system can't find given path, vr)
Data source : Firebird::localhost/3050:employee.

exchanging alias for full file name
on external 'localhost/3050:C:\Program Files (x86)\Firebird\Firebird_2_5\examples\empbuild\employee.fdb'
results in

Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.Execute statement error at attach :
335544344 : I/O error during "CreateFile (open)" operation for file "localhost/3050:C:\Program Files (x86)\Firebird\Firebird_2_5\examples\empbuild\employee.fdb"
335544734 : Error while trying to open file
123 : Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch. (wrong syntax for file name, directory name or drive, vr)
Data source : Firebird::localhost/3050:C:\Program Files (x86)\Firebird\Firebird_2_5\examples\empbuild\employee.fdb.

Best regards, Volker

=>

Trying to access a 2.5 database through a remote execute statetement, Firebird 3 doesn't find the database, neither aliased nor with the full file name. Test case: Set up two Firebird servers 2.5.2 port 3050 and Firebird 3 alpha2 on a different ports, then run this query from a Firebird 3 database: The 2.5 employee database is there and is aliased in 2.5 aliases.conf, no problem connecting to it using any tool. Execute block below runs without a problem from another database of the 2.5 server.

EXECUTE BLOCK
RETURNS (
LOCATION VARCHAR(15)
)
AS
declare sql varchar(100);
begin
sql = 'select location from department';
for execute statement :sql
on external 'localhost/3050:employee'
as user 'sysdba' password 'masterke'
into :location
do
suspend;
end;

gives

Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.Execute statement error at attach :
335544344 : I/O error during "CreateFile (open)" operation for file "localhost/3050:employee"
335544734 : Error while trying to open file
3 : Das System kann den angegebenen Pfad nicht finden. (system can't find given path, vr)
Data source : Firebird::localhost/3050:employee.

exchanging alias for full file name
on external 'localhost/3050:C:\Program Files (x86)\Firebird\Firebird_2_5\examples\empbuild\employee.fdb'
results in

Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.Execute statement error at attach :
335544344 : I/O error during "CreateFile (open)" operation for file "localhost/3050:C:\Program Files (x86)\Firebird\Firebird_2_5\examples\empbuild\employee.fdb"
335544734 : Error while trying to open file
123 : Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch. (wrong syntax for file name, directory name or drive, vr)
Data source : Firebird::localhost/3050:C:\Program Files (x86)\Firebird\Firebird_2_5\examples\empbuild\employee.fdb.

Best regards, Volker

@firebird-automations
Copy link
Collaborator Author

Modified by: Volker Rehn (vr2_s18)

description: Trying to access a 2.5 database through a remote execute statetement, Firebird 3 doesn't find the database, neither aliased nor with the full file name. Test case: Set up two Firebird servers 2.5.2 port 3050 and Firebird 3 alpha2 on a different ports, then run this query from a Firebird 3 database: The 2.5 employee database is there and is aliased in 2.5 aliases.conf, no problem connecting to it using any tool. Execute block below runs without a problem from another database of the 2.5 server.

EXECUTE BLOCK
RETURNS (
LOCATION VARCHAR(15)
)
AS
declare sql varchar(100);
begin
sql = 'select location from department';
for execute statement :sql
on external 'localhost/3050:employee'
as user 'sysdba' password 'masterke'
into :location
do
suspend;
end;

gives

Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.Execute statement error at attach :
335544344 : I/O error during "CreateFile (open)" operation for file "localhost/3050:employee"
335544734 : Error while trying to open file
3 : Das System kann den angegebenen Pfad nicht finden. (system can't find given path, vr)
Data source : Firebird::localhost/3050:employee.

exchanging alias for full file name
on external 'localhost/3050:C:\Program Files (x86)\Firebird\Firebird_2_5\examples\empbuild\employee.fdb'
results in

Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.Execute statement error at attach :
335544344 : I/O error during "CreateFile (open)" operation for file "localhost/3050:C:\Program Files (x86)\Firebird\Firebird_2_5\examples\empbuild\employee.fdb"
335544734 : Error while trying to open file
123 : Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch. (wrong syntax for file name, directory name or drive, vr)
Data source : Firebird::localhost/3050:C:\Program Files (x86)\Firebird\Firebird_2_5\examples\empbuild\employee.fdb.

Best regards, Volker

=>

Trying to access a 2.5 database through a remote execute statetement, Firebird 3 doesn't find the database, neither aliased nor with the full file name. Test case: Set up two Firebird servers 2.5.2 port 3050 and Firebird 3 alpha2 on a different port, then run this query from a Firebird 3 database: The 2.5 employee database is there and is aliased in 2.5 aliases.conf, no problem connecting to it using any tool. Execute block below runs without a problem from another database of the 2.5 server.

EXECUTE BLOCK
RETURNS (
LOCATION VARCHAR(15)
)
AS
declare sql varchar(100);
begin
sql = 'select location from department';
for execute statement :sql
on external 'localhost/3050:employee'
as user 'sysdba' password 'masterke'
into :location
do
suspend;
end;

gives

Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.Execute statement error at attach :
335544344 : I/O error during "CreateFile (open)" operation for file "localhost/3050:employee"
335544734 : Error while trying to open file
3 : Das System kann den angegebenen Pfad nicht finden. (system can't find given path, vr)
Data source : Firebird::localhost/3050:employee.

exchanging alias for full file name
on external 'localhost/3050:C:\Program Files (x86)\Firebird\Firebird_2_5\examples\empbuild\employee.fdb'
results in

Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements.Execute statement error at attach :
335544344 : I/O error during "CreateFile (open)" operation for file "localhost/3050:C:\Program Files (x86)\Firebird\Firebird_2_5\examples\empbuild\employee.fdb"
335544734 : Error while trying to open file
123 : Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch. (wrong syntax for file name, directory name or drive, vr)
Data source : Firebird::localhost/3050:C:\Program Files (x86)\Firebird\Firebird_2_5\examples\empbuild\employee.fdb.

Best regards, Volker

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Can you try with fresh snapshot? Currently in trunk external statement successfully connects to 2.5 server. Moreover, you may use default firebird.conf for it (certainly with one provided by you it works too). I've tried on linux but I do not think there is something OS-dependent here.

@firebird-automations
Copy link
Collaborator Author

Commented by: Volker Rehn (vr2_s18)

Worse. With build 31074 I can't even connect to a ODS12 database using Flamerobin, which worked before with build 30809 alpha2. I get unknown isc error 335545049 and 335545081. I can retreive the server info, but not much more.

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Sooner of all due to ODS change (ODS may get changed at any moment before beta release). Recreate your database and try again.

@firebird-automations
Copy link
Collaborator Author

Commented by: Volker Rehn (vr2_s18)

Ok. The execute block runs fine from within isql.
But if the "hosting" database is connected using Flamerobin or php, it fails, with the error msg above. The remote execute statement depends on how the "hosting" database was connected, it seems to inherit something it cannot use here. From Firebird 3's perspective, these are all legacy clients, maybe that's a lead.

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

I've tried using flamerobin with both 2.5 and 3.0 clients. Certainly client does not affect how does server talk to another server, i.e. everything works for me.

@firebird-automations
Copy link
Collaborator Author

Commented by: Volker Rehn (vr2_s18)

No luck here. I succeeded doing external statement from 2.5 to 3, but not from 3 to 2.5. I need to copy your setup in detail.
What was your setup? Did you test on Windows? Use the default firebird.conf for Firebird 3 or where did you change it? Both Firebirds on the same machine? Running as services? Does it matter which fbclient is used for attachment to Firebird 3? Can you attach to Firebird 3 employee with Flamerobin with no changes to firebird.conf?

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

> I succeeded doing external statement from 2.5 to 3, but not from 3 to 2.5. I need to copy your setup in detail.

In firebird 3 I was using default firebird.conf & databases.conf - no changes at all. Or firebird.conf, modified exactly according to your initial description.
In 2.5 the only change was prot number - 3060, required to run both servers on same machine.

> What was your setup? Did you test on Windows?

That's probably the main difference. I have only Linux. But it should make absolutely no difference on what OS does remote EXECUTE STATEMENT run.

> Use the default firebird.conf for Firebird 3 or where did you change it?

Tried both...

> Both Firebirds on the same machine?

yes

> Running as services?

that's Linux...

> Does it matter which fbclient is used for attachment to Firebird 3?

yes, in some aspects
if non-fb3 client is used, you can't use default firebird.conf - it will not work
but I have no idea how can it affect what happens later when connection to 2.5 is tried

> Can you attach to Firebird 3 employee with Flamerobin with no changes to firebird.conf?

Yes, certainly - provided I use it with fb3 client.

**********************

Looks like no matter of how strange it looks that the problem is another OS. From initial messages I see that FB3 server failed to establish network connection to FB2.5 and made attempt to open file containing host name which certainly failed.
If you try once more and have no success I will ask Vlad to try to reproduce your problem in windows.

@firebird-automations
Copy link
Collaborator Author

Commented by: Volker Rehn (vr2_s18)

Alex, thanks for the detailed response. I have tried everything I could think of - without success. Even registered FB3 with Windows Firewall although it is a local process. Maybe it is something silly I overlooked. We have some leads so far:

- FB3 can't resolve the network connection to FB2.5, instead it tries to open the connect string as a file
- FB3 *can* connect to FB2.5 if the SP is run from within isql (I have put the exec block code into a SP to make testing easier)
- only seems to occur on windows

I am using the 32Bit-Versions of FB2.5 and FB3 on a 64Bit Win7 machine, so that legacy clients can use fbclient. FB2.5 uses the standard port 3050, FB3 is on 3053

Yes please ask Vlad to try it on windows. When the remote execute statement was first introduced in FB2.5, I was in touch with Vlad and we did thorough testing.
@vlad: you are always welcome to email me directly for details. Once this is resolved, we can come back here with results, so the ticket is not cluttered with intermediate steps.

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Volker,
i already planned to look at it, don't worry :)

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Reproduced and investigated.

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

The reason of a bug was not loaded bultin plugins due to wrong choice of point where they are initialized. Currently that call is moved to first invocation of getPlugins(), which leaves no chance for such errors in the future. Difference between linux vs. windows was due to different platform-specific initialization code.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

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

resolution: Fixed [ 1 ]

Fix Version: 3.0 Beta 1 [ 10332 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Not enough information

Test Details: 2 dimitr (?): is it possible to do on test host ? (I mean: when some test is running on FB 3.0 - does any FB 2.5 instance is active at the same time ? what's its port number ?)

@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

2 participants