Bug #24757
closedUnable to log in - Server error
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.
Updated by Alexis Mousset 7 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.
Updated by Alexis Mousset 7 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;
Updated by Nicolas Ecarnot 7 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
Updated by Nicolas Ecarnot 7 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!
Updated by Clark ANDRIANASOLO 7 months ago
- Status changed from New to In progress
- Assignee set to Clark ANDRIANASOLO
Updated by Clark ANDRIANASOLO 7 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
Updated by Clark ANDRIANASOLO 7 months ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|8ae541482d96121255b7a9f797074a06f34364bf.
Updated by Clark ANDRIANASOLO 7 months ago
- Has duplicate Bug #24755: In case a NULL was introduced earlier in sessionid, login is impossible added
Updated by Vincent MEMBRÉ 7 months ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 8.1.1 which was released today.