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

Both client and server could not close connection after failed authentification [CORE4998] #5286

Closed
firebird-automations opened this issue Nov 9, 2015 · 12 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @hvlad

Reported by Dmitry Sibiryakov in fb-devel: "Exit from isql logs INET error on Windows after unsuccessful connection attempts" at 6 Nov 2015.
---
after executing following
script I'm getting in firebird.log number of "INET/inet_error: read errno = 10054" errors
equal to number of unsuccessful connection attempts.

connect localhost:test user sysdba password wrong_password;
connect localhost:test user sysdba password another_wrong_password;
connect localhost:test user sysdba password right_password;
exit;
---

The reason for INET errors is that nor client nor server not closed connection immediately after
failure and sockets are closed by OS when isql exits (in this sample).

Commits: d0768b2 FirebirdSQL/fbt-repository@cbd88db

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

Reproduced on 3.0.0.32136 RC1 with firebird.conf:
AuthServer = Legacy_Auth,Srp
AuthClient = Srp,Legacy_Auth

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

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

resolution: Fixed [ 1 ]

Fix Version: 3.0.0 [ 10048 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test => Deferred

Test Details: Can anyone show here firebird.conf which was used to reproduce this ticket issue ?
I don`t see any new massages in firebird.log on SS/SC/CS on build WI-V3.0.0.32140 by doing following:

C:\MIX\firebird\fb30Cs>isql -q
SQL> connect localhost:e30 user sysdba password qwe;
Statement failed, SQLSTATE = 28000
Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
SQL> connect localhost:e30 user sysdba password rty;
Statement failed, SQLSTATE = 28000
Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
SQL> connect localhost:e30 user sysdba password masterke;
Database: localhost:e30, User: SYSDBA
SQL> exit;

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

Test Details: Can anyone show here firebird.conf which was used to reproduce this ticket issue ?
I don`t see any new massages in firebird.log on SS/SC/CS on build WI-V3.0.0.32140 by doing following:

C:\MIX\firebird\fb30Cs>isql -q
SQL> connect localhost:e30 user sysdba password qwe;
Statement failed, SQLSTATE = 28000
Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
SQL> connect localhost:e30 user sysdba password rty;
Statement failed, SQLSTATE = 28000
Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
SQL> connect localhost:e30 user sysdba password masterke;
Database: localhost:e30, User: SYSDBA
SQL> exit;

=>

Can anyone show here firebird.conf which was used to reproduce this ticket issue ?
I don`t see any new messages in firebird.log on SS/SC/CS on build WI-V3.0.0.32140 by doing following:

C:\MIX\firebird\fb30Cs>isql -q
SQL> connect localhost:e30 user sysdba password qwe;
Statement failed, SQLSTATE = 28000
Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
SQL> connect localhost:e30 user sysdba password rty;
Statement failed, SQLSTATE = 28000
Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
SQL> connect localhost:e30 user sysdba password masterke;
Database: localhost:e30, User: SYSDBA
SQL> exit;

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

You should see not closed TCP\IP sockets at both isql.exe and firebird.exe until isql exits.

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Using CS you should see worker Fireird processes still running after failed login.

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

> Using CS you should see worker Fireird processes still running after failed login.

I do NOT see it:

C:\MIX\firebird\QA\fbt-repo\tmp>pslist 2>nul | findstr firebird
firebird 4612 8 7 87 1340 0:00:00.046 0:07:50.828

C:\MIX\firebird\QA\fbt-repo\tmp>C:\MIX\firebird\fb30Cs\isql -q
SQL> connect localhost:e30 user sysdba password qwe;
Statement failed, SQLSTATE = 28000
Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
SQL> shell pslist 2>nul | findstr firebird;
firebird 4612 8 7 87 1340 0:00:00.046 0:08:43.125
SQL> connect localhost:e30 user sysdba password rty;
Statement failed, SQLSTATE = 28000
Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
SQL> shell pslist 2>nul | findstr firebird;
firebird 4612 8 7 87 1340 0:00:00.046 0:08:52.343
SQL> connect localhost:e30 user sysdba password masterke;
Database: localhost:e30, User: SYSDBA
SQL> shell pslist 2>nul | findstr firebird;
firebird 4612 8 7 87 1340 0:00:00.046 0:08:59.656
firebird 1272 8 7 193 12680 0:00:00.109 0:00:01.968
SQL> exit;

C:\MIX\firebird\QA\fbt-repo\tmp>pslist 2>nul | findstr firebird
firebird 4612 8 7 87 1340 0:00:00.046 0:09:07.203

All other FB instances except CS were stopped, process 4612 is of Classic server, port #⁠ 3329.
And on all steps one may see only one line with 'firebird' (not taking in account successful login, of course).

What I've missed ?

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Use default security settings in firebird.conf

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

Test Details: Can anyone show here firebird.conf which was used to reproduce this ticket issue ?
I don`t see any new messages in firebird.log on SS/SC/CS on build WI-V3.0.0.32140 by doing following:

C:\MIX\firebird\fb30Cs>isql -q
SQL> connect localhost:e30 user sysdba password qwe;
Statement failed, SQLSTATE = 28000
Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
SQL> connect localhost:e30 user sysdba password rty;
Statement failed, SQLSTATE = 28000
Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
SQL> connect localhost:e30 user sysdba password masterke;
Database: localhost:e30, User: SYSDBA
SQL> exit;

=>

Can be reproduced only when AuthServer, AuthClient & WireCrypt have default values.
Currently these parameters are changed on host where fbtest is running.

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

> Use default security settings in firebird.conf

Reproduced, thanks.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Deferred => Done successfully

Test Details: Can be reproduced only when AuthServer, AuthClient & WireCrypt have default values.
Currently these parameters are changed on host where fbtest is running.

=>

Reproduced on 3.0.0.32136 RC1 with firebird.conf:
AuthServer = Legacy_Auth,Srp
AuthClient = Srp,Legacy_Auth

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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