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

Cannot connect to a database which have own security database without security3.fdb [CORE5032] #5319

Closed
firebird-automations opened this issue Nov 24, 2015 · 13 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Gabor Boros (gaborboros)

The whole databases.conf:

MYDB = /home/DB/MYDB.FDB
{
SecurityDatabase = MYDB
}

MYDB initialized correctly(users created) and works like a charm but only when security3.fdb exists and initialized. Got "Statement failed, SQLSTATE = 08006
Unable to complete network request to host..." error at remote connection (isql -user MYADMIN -password mypassword 192.168.0.1:MYDB). security3.fdb touched only by the installer(MYADMIN not exist in it), SYSDBA password is a random value and SYSDBA never used.

Commits: fde2d8f 3c3dbf6 FirebirdSQL/fbt-repository@61fba47 FirebirdSQL/fbt-repository@f290aaf

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Tried the following:

1. added appropriate lines to databases.conf - in my case it's as follows:

.... <std heading from install>
#⁠
#⁠ Live Databases:
#⁠
MYDB = /mnt/stg/MYDB.FDB
{
SecurityDatabase = MYDB
}

2. Created database.

#⁠ ./isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 'MYDB';
SQL> create user myadmin password 'mypassword';
SQL>

3. Started server.

4. Make sure that std security database is bad:

#⁠ ./isql -user sysdba -password masterkey localhost:employee
Statement failed, SQLSTATE = 28000
Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
-Install incomplete, please read the Compatibility chapter in the release notes for this version
Use CONNECT or CREATE DATABASE to specify a database
SQL>

5. Successfully attached to MYDB:

#⁠ ./isql -user myadmin -password mypassword 192.168.1.2:MYDB
Database: 192.168.1.2:MYDB, User: MYADMIN
SQL>

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

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

resolution: Cannot Reproduce [ 5 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Gabor Boros (gaborboros)

Rename security3.fdb to security3_fdb and try step 5 again. The result is:

Statement failed, SQLSTATE = 08006
Unable to complete network request to host "192.168.1.2".
-Failed to establish a connection.

Is this works as expected? The error message is correct?
Why security3.fdb needed because security database of MYDB is MYDB?

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

It works - no problems. But provided server is started _before_ renaming security db. Are you sure you have firebird server started? Try to switch to classic mode and repeat that test.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

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

resolution: Cannot Reproduce [ 5 ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: Gabor Boros (gaborboros)

I have more informations. With Super, Guardian restarting the server endless without any error in firebird.log(not exists and not created) if security3.fdb renamed, deleted or have wrong permissions before server started. Independently from security3.fdb exists in databases.conf or not. Same error with SuperClassic. No error with Classic, I can connect to MYDB without security3.fdb exists and the databases.conf contains only the MYDB alias(all other text removed from it before server start). So, the problem is Super* specific. Got same results with snapshot 3.0.0.32221 from today. Used Ubuntu 14.04.3 Live (ubuntu-14.04.3-desktop-amd64.iso) for the tests.

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Added analysis for a case of missing main security database.
Do not prevent server to start in that case.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

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

resolution: Fixed [ 1 ]

Fix Version: 3.0 RC2 [ 10048 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Gabor Boros (gaborboros)

The problem still exists with snapshot 3.0.0.32227.

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Please try tomorrow snapshot, should work

@firebird-automations
Copy link
Collaborator Author

Commented by: Gabor Boros (gaborboros)

Works like a charm with 3.0.0.32233. But see some installer trouble:

Please enter new password for SYSDBA user: blabla
use gsec -? to get help
Unable to complete network request to host "localhost".
Failed to establish a connection.
unable to open database

Starting Firebird server: Install completed

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test => Cannot be tested

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