[ZBX-10471] "Session terminated, re-login, please." immediately after login Created: 2016 Feb 29  Updated: 2017 May 30  Resolved: 2016 Mar 01

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 3.0.1
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Thomas Stein Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Bildschirmfoto 2016-03-01 um 09.07.35.png     PNG File zabbix-sessions.png     PNG File zabbix.png    

 Description   

Hello.

I am in the process to upgrade a 1.8 installation to 3.0. I managed to upgrade the database from 1.8 to 2.0 to 2.2 to 3.0. There were a few partitions missing in the history table but i was able to fix them. So far so good. Zabbix Server 3.0.1 starts without complaining but i'm not able to see any graphs because immediately after login i get: "Session terminated, re-login, please". Login works because if i use wrong credentials zabbix complains about them. Some ideas how to solve this would be really appreciated.

thanks and cheers
t.



 Comments   
Comment by richlv [ 2016 Feb 29 ]

do you happen to have multiple zabbix frontends on the same host open ?

Comment by Thomas Stein [ 2016 Feb 29 ]

Hi.

I changed:

if (!$userInfo)

{ self::exception(ZBX_API_ERROR_PARAMETERS, _('Tha Session terminated, re-login, please.')); }

in include/classes/api/services/CUser.php. Now the error is "Tha Session terminated, re-login, please".

So obviously something went wrong here. Can i create a valid user via mysql cli somehow?

thanks and cheers
t.

Comment by Thomas Stein [ 2016 Feb 29 ]

Hi richlv.

Only one Zabbix Frontend Installation on that host.

Comment by richlv [ 2016 Feb 29 ]

which browser ? could this be a duplicate of ZBX-8546 ?

Comment by Thomas Stein [ 2016 Feb 29 ]

I tried Firefox and Chrome current versions. Unchecking the Remember me for 30 days does not help in my case. As you can see
i have the zabbix cookie (attached screen).

Comment by Thomas Stein [ 2016 Feb 29 ]

Oh and the very same sessionid shows in the sessions table line two:

mysql> select * from sessions;
+----------------------------------+--------+------------+--------+
| sessionid                        | userid | lastaccess | status |
+----------------------------------+--------+------------+--------+
| 68ad8ead9714577fca23bf5dc2e3d768 |      2 | 1456777614 |      1 |
| 762d1777d0fe7cfbd2a36578e141fd91 |      2 | 1456778034 |      0 |
| 8afed3fdfee0dc9ae4ed70a09880f066 |      2 | 1456777625 |      0 |
| 97e5b42b911111ffd0dbf589c183e158 |      2 | 1456778040 |      0 |
| beb78911334df8ddd63738a33ff5909c |      2 | 1456777768 |      0 |
+----------------------------------+--------+------------+--------+
5 rows in set (0.00 sec)
Comment by Oleksii Zagorskyi [ 2016 Mar 01 ]

The "status" columns means:
0, ZBX_SESSION_ACTIVE - Session active
1, ZBX_SESSION_PASSIVE - Session is not active

userid=2 must be "guest"
Records only for userid=2 should indicate that you never logged in as not guest.
At least it looks like so.

I'd try to clean out current frontend folder and fill it by frontend sources again to make sure everything is correct with zabbix code after the upgrade.
Then would try to compare db schema for current upgraded database and new one created from 3.0 schema sources.

And we are not sure that upgrade itself was performed correctly, so it could be a support case ...

Comment by Thomas Stein [ 2016 Mar 01 ]

Hello Oleksiy.

Thanks for your answer. You are right, userid 2 is guest. Just checked that. So it seems i can not login at all.

What puzzles me is if i enter a wrong password for the admin user i get: "Login name or password is incorrect." If i enter the correct password i end up with current situation.

As for the frontend folder. It's already a fresh frontend install.

Comparing the db schema seems to be a good idea. Can you give me a hand here? I already tried to import the users and users_groups table from a fresh 3.0 install. This leads to another error. See screen.

thanks and cheers
t.

Comment by Oleksii Zagorskyi [ 2016 Mar 01 ]

I did a quick upgrade test 1.8 ->(patch) 2.0 ->(automatic) 3.0, and everything is ok.

To check schema - basically you need to export 2 databases using "mysqldump --no-data DBNAME" and then compare generated files using diff etc.

Something indeed went wrong with your upgrade.

That was bad idea to mix DB data from different sources.
Sorry, this is a bug tracker, see other options to get community help http://zabbix.org/wiki/Getting_help

Comment by Oleksii Zagorskyi [ 2016 Mar 01 ]

I'm closing this issue for now as cannot reproduce.
Feel free to reopen if you will be able to prove that there indeed a bug.

Comment by Thomas Stein [ 2016 Mar 01 ]

Hello Oleksiy.

I'm redoing the hole thing now. First step is upgrading from 1.8.22 to 2.0.16. The database upgrade will take around 11 hours so i will get back to you tomorrow.

thanks and cheers
t.

Comment by Thomas Stein [ 2016 Mar 01 ]

It's possible i need support after upgrading from 1.8.to 2.0.

Comment by Thomas Stein [ 2016 Mar 01 ]

Hello.

This warnings/errors i had too the first time i did an db upgrade.

mysqltest mysql # time ./upgrade -p -D zabbix_server --force
 WARNING: backup your database before performing upgrade

 This is an UNSUPPORTED Zabbix upgrade script from 1.8 to 2.0 for MySQL
 It does the following things:
  1. Updates indexes that might require changes;
  2. Patches the database from 1.8 schema to 2.0 schema;
  3. Adds 'Disabled' and 'Debug' usergroup if any missing;
  4. Checks for hosts not belonging to any group and adds them to one if any found.

 Usage: pass required MySQL parameters to this script (like database, user, password etc).

Continue ? (y/n) y
Patching the database
Enter password: 
ERROR 1005 (HY000) at line 47: Can't create table 'zabbix_server.#sql-d68_91' (errno: 150)
ERROR 1506 (HY000) at line 51: Foreign key clause is not yet supported in conjunction with partitioning
ERROR 1005 (HY000) at line 168: Can't create table 'zabbix_server.#sql-d68_91' (errno: 150)
ERROR 1005 (HY000) at line 195: Can't create table 'zabbix_server.#sql-d68_91' (errno: 150)
ERROR 1005 (HY000) at line 213: Can't create table 'zabbix_server.#sql-d68_91' (errno: 150)
ERROR 1005 (HY000) at line 214: Can't create table 'zabbix_server.#sql-d68_91' (errno: 150)

I let it run for now.

thanks and cheers
t.

Comment by Oleksii Zagorskyi [ 2016 Mar 01 ]

I've asked to reopen issue if you will be able to prove that there indeed is a bug.
We will appreciate your understanding that this is a bug report tracker, but not a place to discuss user problems.

CLOSED again.

Comment by Andrey Melnikov [ 2016 Mar 01 ]

Easy to reproduce - simple revoke INSERT access to auditlog table.
SQL error message lost inside frontend calls, user always see "Session terminated, re-login, please.".

Generated at Wed Jun 25 07:45:48 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.