Session Issue - Unknown column

Moderator: crythias

Locked
Sayannara
Znuny advanced
Posts: 118
Joined: 22 May 2012, 12:37
Znuny Version: OTRS 7.06
Real Name: Yann
Company: FVE
Contact:

Session Issue - Unknown column

Post by Sayannara »

Hello,

as many in this forum I have a session issue after the migration of OTRS version 3.1.11 from Windows to Opensesuse.
I found a solution but not sure it's "clean".

After the import of my mysql database, I cannot log into OTRS...

It is definitly a database issue.

Code: Select all

mysqlcheck --check otrs
All tables OK

Code: Select all

$Self->{SessionModule} = 'Kernel::System::AuthSession::FS';
Works fine (but only for a workaround)

when login with DB (check especially this)
[Tue Nov 24 09:47:57 2015][Error][Kernel::System::AuthSession::DB::CreateSessionID][226] Unknown column 'session_value' in 'field list', SQL: 'INSERT INTO sessions (session_id, session_value) VALUES (?, ?)'

Here is the output of my current Windows installation

Code: Select all

mysql> SHOW COLUMNs from sessions;
+---------------+--------------+------+-----+---------+-------+
| Field         | Type         | Null | Key | Default | Extra |
+---------------+--------------+------+-----+---------+-------+
| session_id    | varchar(150) | NO   | PRI | NULL    |       |
| session_value | text         | NO   |     | NULL    |       |
+---------------+--------------+------+-----+---------+-------+
Here is the output of my dev Opensuse installation

Code: Select all

MariaDB [otrs]> SHOW COLUMNS FROM sessions;
+------------+--------------+------+-----+---------+----------------+
| Field      | Type         | Null | Key | Default | Extra          |
+------------+--------------+------+-----+---------+----------------+
| id         | bigint(20)   | NO   | PRI | NULL    | auto_increment |
| session_id | varchar(100) | NO   | MUL | NULL    |                |
| data_key   | varchar(100) | NO   | MUL | NULL    |                |
| data_value | text         | YES  |     | NULL    |                |
| serialized | smallint(6)  | NO   |     | NULL    |                |
+------------+--------------+------+-----+---------+----------------+

According to the output I should have in my sessions table a column "session_value" right ?
  1. Is the rpm different than the .exe within Windows ? This is the same DB and same OTRS version... What's wrong... ? omg
  2. If I use the file system to store sesssions and I upgrade OTRS will the issue still be there ?
Well I altered the table sessions and add the session_value and tried login again I got that error this time
[Tue Nov 24 10:48:44 2015][Error][Kernel::System::AuthSession::DB::CreateSessionID][226] Field 'data_key' doesn't have a default value, SQL: 'INSERT INTO sessions (session_id, session_value) VALUES (?, ?)'
I then changed to finaly get my table with these settings:

Code: Select all

MariaDB [otrs]> SHOW COLUMNS froM sessions;
+---------------+--------------+------+-----+---------+----------------+
| Field         | Type         | Null | Key | Default | Extra          |
+---------------+--------------+------+-----+---------+----------------+
| id            | bigint(20)   | NO   | PRI | NULL    | auto_increment |
| session_id    | varchar(100) | NO   | MUL | NULL    |                |
| data_value    | text         | YES  |     | NULL    |                |
| serialized    | smallint(6)  | NO   |     | 0       |                |
| session_value | text         | NO   |     | NULL    |                |
| data_key      | varchar(100) | NO   |     | 0       |                |
+---------------+--------------+------+-----+---------+----------------+
And it works.... I can login in OTRS...

If I upgrade later will I have problem with these changes ?
Centos 7 / OTRS::ITSM 6 Business Solutions / MariaDB / Apache
Sayannara
Znuny advanced
Posts: 118
Joined: 22 May 2012, 12:37
Znuny Version: OTRS 7.06
Real Name: Yann
Company: FVE
Contact:

Re: Session Issue - Unknown column

Post by Sayannara »

For an unkown reason my dump was corruped. I created a new one and everything was fine. :D
Centos 7 / OTRS::ITSM 6 Business Solutions / MariaDB / Apache
Locked