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

Linux server may reject connections with a transliteration error [CORE4639] #4953

Closed
firebird-automations opened this issue Dec 16, 2014 · 10 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @dyemanov

Attachments:
20180316 user1ok reboot user1error user2ok.pcapng

Example of failure:

SQL> connect 192.168.1.105:employee user sysdba password 123;
Statement failed, SQLSTATE = 08001
Invalid connection string
-Cannot transliterate character between character sets
-Invalid or incomplete multibyte or wide character

It happens when a connection is being established from a client host with non-ASCII (e.g. Cyrillic) name or with non-ASCII OS user name. This could be quite common in the Windows world.

Commits: 729ff61 FirebirdSQL/fbt-repository@cfe270b

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

TODO: make test after confirmation from Alex that CORE4760 is finally fixed.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

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

resolution: Fixed [ 1 ]

Fix Version: 3.0 Beta 2 [ 10586 ]

assignee: Dmitry Yemanov [ dimitr ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

Test Details: TODO: make test after confirmation from Alex that CORE4760 is finally fixed.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test => Deferred

Test Specifics: [Platform (Windows/Linux) specific]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Commented by: Ehmmm (ehmmm.firebird)

I'm afraid that something like this still occurs.

On Debian Stretch I have Firebird 3.0.4.32931 with some DB (in codepage win1250 but I think it isn't relevant).
It is not actually server but more likely client but capable enough to run Firebird, Apache/PHP, etc...
On Windows 7 I have FlameRobin 0.9.3 and two Windows users, one with diacritics "testěščřžýáíé" and one good old ascii "xj7".
(User in DB is "mmuser02".)

If I start FlameRobbin as the first user (testěščřžýáíé) and try to connect to DB then I get the mentioned error (Invalid or incomplete multibyte or wide character).
If I start FlameRobin as the second user (xj7) then I connect successfully.

And the most weird thing is that if I restart firebird on server (/etc/init.d/firebird restart) then I can connect even with the Windows user with diacritics.
Until I reboot the whole server. Then again I can't connect with the diacritics user. (?!)

I will try to attach Wireshark capture of the three connection tests:
[1] Firebird service was restarted and testěščřžýáíé can connect.
[2] Whole server was rebooted and test... can't connect.
[3] Immediately after this the second windows user (xj7) can connect.

@firebird-automations
Copy link
Collaborator Author

Commented by: Ehmmm (ehmmm.firebird)

Capture of tcp port 3050 communication.
Server is 192.168.253.1, Flamerobin is 10.149.81.6.
Three tcp connections.
Between the first and the second connection the whole server was rebooted.

@firebird-automations
Copy link
Collaborator Author

Modified by: Ehmmm (ehmmm.firebird)

Attachment: 20180316 user1ok reboot user1error user2ok.pcapng [ 13226 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Ehmmm (ehmmm.firebird)

And I forgot to mention that on couple other servers (with bit older Debian Stretch and bit older Firebird snapshot version) I don't have these problems.
But because after "/etc/init.d/firebird restart" everything works well then I'm worried that the trick is somewhere else.

@firebird-automations
Copy link
Collaborator Author

Commented by: Ehmmm (ehmmm.firebird)

I'll answer to myself.
It doesn't seem to be a bug in Firebird.
This discussion gave me a clue: CORE5775
I dumped locale from /etc/init.d/firebird and during the first start after reboot the LC_* variables are empty (more precisely there was "POSIX" in some of them). (?!)
I don't know why and I admit that this wasn't very clean installation of Debian (Jessie upgraded to Stretch, systemd downgraded to sysvinit).
So I added two lines:

export LC_ALL="en_US.UTF-8"
export LANGUAGE="en_US:en"

somewhere on top into /etc/init.d/firebird and it seems to work OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment