Project

General

Profile

Actions

Bug #24757

closed

Unable to log in - Server error

Added by Nicolas Ecarnot 8 months ago. Updated 8 months ago.

Status:
Released
Priority:
N/A
Category:
-
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:
Yes

Description

Hello,

[8.1.0]

We only have 5 local accounts defined in /opt/rudder/etc/rudder-users.xml as administrators rights.
Today, one user tried to log in and the Server error appeared, though it was working for my account.

/var/log/rudder/webapp/2024_04_19.stderrout.log is showing the following error :

2024-04-19 14:40:00+0200 INFO  application - Rudder authentication attempt for principal 'user01' with backend 'file': success
2024-04-19 14:40:00+0200 INFO  compliance - [metrics] global compliance (number of components): 23957 [p:0 s:17919 r:224 e:0 u:0 m:0 nr:210 na:5604 rd:0 c:0 ana:0 nc:0 ae:0 bpm:0]
2024-04-19 14:40:00+0200 INFO  net.liftweb.http.LiftServlet - Request for /rudder/secure/ failed SystemError(Error when retrieving information for previous session for 'user01',doobie.util.invariant$NonNullableColumnRead: SQL `NULL` read at column 7 (JDBC type Char) but mapping is to a non-Option type; use Option here. Note that JDBC column indexing is 1-based.)
zio.FiberFailure: SystemError(Error when retrieving information for previous session for 'user01',doobie.util.invariant$NonNullableColumnRead: SQL `NULL` read at column 7 (JDBC type Char) but mapping is to a non-Option type; use Option here. Note that JDBC column indexing is 1-based.)
        at zio.interop.ZioMonadErrorE.raiseError.trace(cats.scala:628)
        at cats.Monad.map(Monad.scala:35)
        at zio.interop.ZioMonadError.tailRecM.loop(cats.scala:604)
        at cats.Monad.map(Monad.scala:35)
        at zio.interop.ZioMonadError.tailRecM.loop(cats.scala:604)
        at cats.Monad.map(Monad.scala:35)
        at zio.interop.ZioMonadError.tailRecM.loop(cats.scala:604)
        at cats.Monad.map(Monad.scala:35)
        at zio.interop.ZioMonadError.tailRecM.loop(cats.scala:604)
        at cats.Monad.map(Monad.scala:35)
        at zio.interop.ZioMonadError.tailRecM.loop(cats.scala:604)
        at cats.free.Free.foldMap(Free.scala:166)
        at zio.interop.ZioMonadError.tailRecM.loop(cats.scala:604)
        at cats.effect.kernel.Resource.fold(Resource.scala:173)
        at com.normation.rudder.db.Doobie.transactIOResult(Doobie.scala:92)
        at com.normation.zio.ZioRuntime.unsafeRun(ZioCommons.scala:445)
2024-04-19 14:40:00.764:WARN :oejs.HttpChannel:qtp985397764-712: /rudder/secure/

I then re-initialized the pwd for another admin user, restarted jetty, then hit the same issue with this other account. My colleague tried as well, and was able to connect. I tried another time and this time, it did work. Useless to say that we patiently waited for jetty to restart, we did purge the cookies and sessions of our browser, tried from different browsers and tried hidden-session browser way.


Related issues 1 (0 open1 closed)

Has duplicate Rudder - Bug #24755: In case a NULL was introduced earlier in sessionid, login is impossibleResolvedClark ANDRIANASOLOActions
Actions #1

Updated by Alexis Mousset 8 months ago

Did you install a pre-release of the 8.1 version or did you upgrade from 8.0 to 8.1.0?

This error is known but was not supposed to happen after the rc1 version.

Actions #2

Updated by Alexis Mousset 8 months ago

You should be able to fix the problem in the database by running, on the Rudder server:

sudo psql -h localhost rudder rudder

then:

update usersessions set tenants = 'all' where tenants is null; 
Actions #3

Updated by Nicolas Ecarnot 8 months ago

Alexis Mousset wrote in #note-1:

Did you install a pre-release of the 8.1 version or did you upgrade from 8.0 to 8.1.0?

This error is known but was not supposed to happen after the rc1 version.

Hi Alexis,

I did upgrade from 8.0 to 8.1.0

Nicolas

Actions #4

Updated by Nicolas Ecarnot 8 months ago

Alexis Mousset wrote in #note-2:

You should be able to fix the problem in the database by running, on the Rudder server:

[...]

then:

[...]

Hey : working fine !!!
You're the man, Alexis!

Actions #5

Updated by Clark ANDRIANASOLO 8 months ago

  • Status changed from New to In progress
  • Assignee set to Clark ANDRIANASOLO
Actions #6

Updated by Clark ANDRIANASOLO 8 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Clark ANDRIANASOLO to François ARMAND
  • Pull Request set to https://github.com/Normation/rudder/pull/5618
Actions #7

Updated by Clark ANDRIANASOLO 8 months ago

  • Status changed from Pending technical review to Pending release
Actions #8

Updated by Clark ANDRIANASOLO 8 months ago

  • Has duplicate Bug #24755: In case a NULL was introduced earlier in sessionid, login is impossible added
Actions #9

Updated by François ARMAND 8 months ago

  • Fix check changed from To do to Checked
Actions #10

Updated by Vincent MEMBRÉ 8 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 8.1.1 which was released today.

Actions

Also available in: Atom PDF