Invalid SessionID after Upgrade to 3.2.1

Moderator: crythias

Post Reply
mk_we
OTRS newbie
Posts: 3
Joined: 05 May 2010, 12:50
OTRS Version?: 2.4.7

Invalid SessionID after Upgrade to 3.2.1

Post by mk_we »

Hello,

after upgrade to 3.2.1 we cannot open CustomerFrontend anymore. We are using HTTPBasicAuth for CustomerLogin an receiving "Invalid SessionID" Error when opening CustomerFrontend.
In the logs the following error shows up:

[Error][Kernel::System::AuthSession::DB::CreateSessionID][Line:333]: Incorrect string value: '\x80\x02\x00\x00\x00\x08...' for column 'data_value' at row 1, SQL: 'INSERT INTO sessions (session_id, data_key, data_value, serialized) VALUES (?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?)'
[Notice][Kernel::System::AuthSession::DB::CheckSessionID] SessionID: '10fdf38ab40191c84e88804cfefeabac83' is invalid!!!

It seems to me, that this is an database related error. We're running opensuse and MySQL.

Any suggestions?
Thank you!

unixoid
OTRS newbie
Posts: 1
Joined: 09 Feb 2013, 18:27
OTRS Version?: 3.1.10

Re: Invalid SessionID after Upgrade to 3.2.1

Post by unixoid »

Hi!

We encountered the same problem. The problem is indeed in the DB. Table 'sessions' doesn't have required fields. I think that DB migrate script doesn't work properly.

To fix this you should exec this SQL (taken from otrs/scripts/database/otrs-schema.mysql.sql)

Code: Select all

CREATE TABLE sessions (
    id BIGINT NOT NULL AUTO_INCREMENT,
    session_id VARCHAR (100) NOT NULL,
    data_key VARCHAR (100) NOT NULL,
    data_value TEXT NULL,
    serialized SMALLINT NOT NULL,
    PRIMARY KEY(id),
    INDEX sessions_data_key (data_key),
    INDEX sessions_session_id_data_key (session_id, data_key)
);

folderol
OTRS newbie
Posts: 2
Joined: 21 Feb 2013, 13:56
OTRS Version?: 3.2.2

Re: Invalid SessionID after Upgrade to 3.2.1

Post by folderol »

After upgrading from OTRS 3.1.x to OTRS 3.2.2 Agent logins work but the Customer Frontend doesn't allow session creation anymore:

Code: Select all

[Thu Feb 21 11:31:16 2013][Error][Kernel::System::AuthSession::DB::CreateSessionID][333] Incorrect string value: '\x80\x00\x00\x00\x08C...' for column 'data_value' at row 1, SQL: 'INSERT INTO sessions (session_id, data_key, data_value, serialized) VALUES (?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?)'
However, the session table looks fine:

Code: Select all

CREATE TABLE sessions (
    id BIGINT NOT NULL AUTO_INCREMENT,
    session_id VARCHAR (100) NOT NULL,
    data_key VARCHAR (100) NOT NULL,
    data_value TEXT NULL,
    serialized SMALLINT NOT NULL,
    PRIMARY KEY(id),
    INDEX sessions_data_key (data_key),
    INDEX sessions_session_id_data_key (session_id, data_key)
);
When enabling the MySQL query log, the session creation query seems to contain non-escaped characters:
pasted-1361447083-509490.png
For the full query, see the file query.txt attached.
You do not have the required permissions to view the files attached to this post.

folderol
OTRS newbie
Posts: 2
Joined: 21 Feb 2013, 13:56
OTRS Version?: 3.2.2

Re: Invalid SessionID after Upgrade to 3.2.1

Post by folderol »

The issue is fixed by executing the following query on the OTRS database in effect changing the data_value text encoding to binary (it basically behaves as a blob field then).

Code: Select all

ALTER TABLE sessions MODIFY data_value TEXT CHARACTER SET binary;

BrianYin
OTRS newbie
Posts: 76
Joined: 29 Aug 2012, 10:12
OTRS Version?: 3.1.12

Re: Invalid SessionID after Upgrade to 3.2.1

Post by BrianYin »

i share the same problem
i can't login normally, the system said "Session invalid. Please log in again. " why's that?
how can i fix it?
Thanks!!
OTRS Version: 3.1.9
OS: windows 2003
ITSM 3.1.6
MySQL 5.xxx

Post Reply