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

only old URL format allows to connect to Firebird 2.0.x SS on Linux [JDBC96] #134

Closed
firebird-automations opened this issue Feb 12, 2007 · 9 comments

Comments

@firebird-automations
Copy link

Submitted by: Pascal Pelous (ppelous)

Running Firebird SS 2.0.0 (or 2.0.1) on Linux
Trying to connect using Jaybird 2.1.1 for JDK 1.5 and the Standard format (= jdbc:firebirdsql:[//host[:port]/]<database>)
as seen in documentation (http://www.firebirdsql.org/index.php?op=devel&sub=jdbc&id=faq#6) and receive following error:

>java -cp c:\docs\QA\jdbc\jaybird-full-2.1.1.jar;. jdbcTest "jdbc:firebirdsql://192.168.1.121:3050/opt/fb_data/xythos.fdb" sysdba masterkey
Compatible Driver Found: org.firebirdsql.jdbc.FBDriver
Exception caught trying to get connection: GDS Exception. 335544344. I/O error for file %.0s"open"
null
Error while trying to open file
null
Reason: I/O error for file %.0s"open"
null
Error while trying to open file
null

Notes:
* Connection works using this URL when I use Firebird CS.

* I was able to connect to Firebird SS using old URL format i.e. jdbc:firebirdsql:[host[/port]:]<database>
>java -cp c:\docs\QA\jdbc\jaybird-full-2.1.1.jar;. jdbcTest "jdbc:firebirdsql:192.168.1.121/3050:/opt/fb_data/xythos.fdb" sysdba masterkey
Compatible Driver Found: org.firebirdsql.jdbc.FBDriver
Connection created: org.firebirdsql.jdbc.FBConnection

@firebird-automations
Copy link
Author

Commented by: Roman Rokytskyy (rrokytskyy)

Very strange. First of all, Jaybird makes no difference between CS and SS - it simply does not know this. Also it should make no difference between the old and new URL, but I can accept that there is a bug in the parser... I will check it, but frankly I have no idea where to start.

@firebird-automations
Copy link
Author

Modified by: Roman Rokytskyy (rrokytskyy)

priority: Major [ 3 ] => Minor [ 4 ]

@firebird-automations
Copy link
Author

Commented by: Wade Chandler (wadechandler)

I have just experienced this on OpenSuSE 10.3. I knew the server was running fine as I could do a:
connect 'localhost:/path/to/db' user 'username' password 'password';

and connect fine from isql.

In JayBird I was trying to use:
jdbc:firebirdsql://localhost:3050/var/firebird/databases/database.fdb

but found only:
jdbc:firebirdsql:localhost/3050:/var/firebird/databases/database.fdb

would work. If I did not use this format of the URL then I would get the exact error reported here. I am using the SS server as well, and I know I can connect to it using the old format. It seems to me to track down the error one needs to debug through the code and see what parameters remain after the URL is parsed and what is used to make the actual connection. I'll see if I can do this at some point.

@firebird-automations
Copy link
Author

Modified by: Roman Rokytskyy (rrokytskyy)

Fix Version: Jaybird 2.2 [ 10053 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

A similar error was raised in Firebird-Support today (although there changing the url did not help).

I took another look at the code and the original issue reported has to do with the fact that the URL specification is:

jdbc:firebirdsql://host:port/path-to-db

If on a Unix/Linux environment the path is /opt/firebird/database.fdb the resulting URL should be:
jdbc:firebirdsql://localhost:3050//opt/firebird/database.fdb (note the two slashes after the port)

The perceived differences between SuperServer and Classic could be the result from different RootDirectory settings in firebird.conf (default is root (/))

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

assignee: Roman Rokytskyy [ rrokytskyy ] => Mark Rotteveel [ avalanche1979 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Added explicit warning in releasenotes that the databasepath should include the root slash (/) in the path for Linux.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

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

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

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