Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.
[SOLVED] Changing Admin passwd leads to "Timeout trying to lock table "USERS"; SQL statement:"
-
I've just changed the admin passwd on a new installation.
When trying to relogin I see this in the log's
SELECT id,username,password,email,phone,disabled,homeUrl,lastLogin,receiveAlarmEmails,receiveOwnAuditEvents,timezone,muted,permissions,name,locale,tokenVersion,passwordVersion FROM users WHERE LOWER(username)=LOWER(?) [50200-196] org.springframework.dao.CannotAcquireLockException: PreparedStatementCallback; SQL [SELECT id,username,password,email,phone,disabled,homeUrl,lastLogin,receiveAlarmEmails,receiveOwnAuditEvents,timezone,muted,permissions,name,locale,tokenVersion,passwordVersion FROM users WHERE LOWER(username)=LOWER(?)]; Zeitüberschreitung beim Versuch die Tabelle "USERS" zu sperren Timeout trying to lock table "USERS"; SQL statement: SELECT id,username,password,email,phone,disabled,homeUrl,lastLogin,receiveAlarmEmails,receiveOwnAuditEvents,timezone,muted,permissions,name,locale,tokenVersion,passwordVersion FROM users WHERE LOWER(username)=LOWER(?) [50200-196]; nested exception is org.h2.jdbc.JdbcSQLException: Zeitüberschreitung beim Versuch die Tabelle "USERS" zu sperren Timeout trying to lock table "USERS"; SQL statement: SELECT id,username,password,email,phone,disabled,homeUrl,lastLogin,receiveAlarmEmails,receiveOwnAuditEvents,timezone,muted,permissions,name,locale,tokenVersion,passwordVersion FROM users WHERE LOWER(username)=LOWER(?) [50200-196]
And the UI shows:
An error occurred while logging in - Internal Server Error
-
Huh. Well, I guess you should probably post
SELECT * FROM USERS
and post that from theh2-web-console.sh
(disinfect whatever personal data is there) or move your existing Mango/databases/mah2.h2.db with Mango off and then start Mango on a fresh database. Or perhaps their were other errors in your bootup. -
@mircsicz Were you using the H2 web console at the time? It's possibly related to that.
-
@phildunlap There's no user other than admin... And as this is only a side effect and a testing setup I prefer to focus on the XML import... But I'll look into it as soon as the import work's
@Jared-Wiltshire No, I've a tmux session on the server where I start and stop the H2-web-console.sh script... And while changing that passwd it was definetly off!
-
I did another test:
- created another superadmin user
- changed "admin" passwd
- tried to relogin with both user's
both failed and the error in the log is:
org.springframework.web.context.request.async.WebAsyncManager.WEB_ASYNC_MANAGER=org.springframework.web.context.request.async.WebAsyncManager@4ef58d08 javax.servlet.error.status_code=500 javax.servlet.error.exception_type=class org.springframework.dao.CannotAcquireLockException javax.servlet.http.HttpServletResponse=org.springframework.security.web.context.HttpSessionSecurityContextRepository$SaveToSessionResponseWrapper@28c26f74 _csrf=org.springframework.security.web.csrf.DefaultCsrfToken@12b6570 javax.servlet.error.message=org.springframework.dao.CannotAcquireLockException: PreparedStatementCallback; SQL [SELECT id,username,password,email,phone,disabled,homeUrl,lastLogin,receiveAlarmEmails,receiveOwnAuditEvents,timezone,muted,permissions,name,locale,tokenVersion,passwordVersion FROM users WHERE LOWER(username)=LOWER(?)]; Zeitüberschreitung beim Versuch die Tabelle "USERS" zu sperren Timeout trying to lock table "USERS"; SQL statement: SELECT id,username,password,email,phone,disabled,homeUrl,lastLogin,receiveAlarmEmails,receiveOwnAuditEvents,timezone,muted,permissions,name,locale,tokenVersion,passwordVersion FROM users WHERE LOWER(username)=LOWER(?) [50200-196]; nested exception is org.h2.jdbc.JdbcSQLException: Zeitüberschreitung beim Versuch die Tabelle "USERS" zu sperren Timeout trying to lock table "USERS"; SQL statement: SELECT id,username,password,email,phone,disabled,homeUrl,lastLogin,receiveAlarmEmails,receiveOwnAuditEvents,timezone,muted,permissions,name,locale,tokenVersion,passwordVersion FROM users WHERE LOWER(username)=LOWER(?) [50200-196]
Resetting the admin passwd in H2-web-console and all is fine again:
UPDATE USERS SET PASSWORD = '{NONE}admin' WHERE USERNAME = 'admin'
-
Well so it does. This was a bug with changing the password of the current user getting a database transaction stuck. This has been fixed and an update is released. Thanks for bringing this to our attention.
-
I Installed the update and can approve that changing the passwd now works for me ;-)